summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2007-03-16 02:33:49 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2007-03-16 02:33:49 +0000
commit6626ad113ee5420201ea7c1f173f718978295eed (patch)
treedb5cc69ea9eeae6f7c508204cc30a4e17aa522bd
parent8f6b43f235c6ffc2db391ea62d124f88d1e610ba (diff)
downloadedk2-6626ad113ee5420201ea7c1f173f718978295eed.zip
edk2-6626ad113ee5420201ea7c1f173f718978295eed.tar.gz
edk2-6626ad113ee5420201ea7c1f173f718978295eed.tar.bz2
Perfect the msa of the following modules, DiskIo, Partition, English and Ebc.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2480 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--EdkModulePkg/Universal/Disk/DiskIo/Dxe/DiskIo.msa5
-rw-r--r--EdkModulePkg/Universal/Disk/DiskIo/Dxe/diskio.c8
-rw-r--r--EdkModulePkg/Universal/Disk/Partition/Dxe/ElTorito.c2
-rw-r--r--EdkModulePkg/Universal/Disk/Partition/Dxe/Gpt.c28
-rw-r--r--EdkModulePkg/Universal/Disk/Partition/Dxe/Mbr.c4
-rw-r--r--EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.c10
-rw-r--r--EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.msa18
-rw-r--r--EdkModulePkg/Universal/Disk/UnicodeCollation/English/Dxe/English.msa7
-rw-r--r--EdkModulePkg/Universal/Ebc/Dxe/Ebc.msa36
-rw-r--r--EdkModulePkg/Universal/Ebc/Dxe/EbcInt.c58
-rw-r--r--EdkModulePkg/Universal/Ebc/Dxe/Ia32/EbcSupport.c10
-rw-r--r--EdkModulePkg/Universal/Ebc/Dxe/Ipf/EbcSupport.c12
-rw-r--r--EdkModulePkg/Universal/Ebc/Dxe/x64/EbcSupport.c10
13 files changed, 95 insertions, 113 deletions
diff --git a/EdkModulePkg/Universal/Disk/DiskIo/Dxe/DiskIo.msa b/EdkModulePkg/Universal/Disk/DiskIo/Dxe/DiskIo.msa
index da66204..f5b93c8 100644
--- a/EdkModulePkg/Universal/Disk/DiskIo/Dxe/DiskIo.msa
+++ b/EdkModulePkg/Universal/Disk/DiskIo/Dxe/DiskIo.msa
@@ -7,7 +7,7 @@
<Version>1.0</Version>
<Abstract>Component description file for DiskIo module.</Abstract>
<Description>DiskIo driver that layers it's self on every Block IO protocol in the system.</Description>
- <Copyright>Copyright (c) 2006, Intel Corporation</Copyright>
+ <Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>
<License>All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -22,8 +22,9 @@
<OutputFileBasename>DiskIo</OutputFileBasename>
</ModuleDefinitions>
<LibraryClassDefinitions>
- <LibraryClass Usage="ALWAYS_CONSUMED">
+ <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="bda39d3a-451b-4350-8266-81ab10fa0523">
<Keyword>DebugLib</Keyword>
+ <HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>
</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>UefiDriverModelLib</Keyword>
diff --git a/EdkModulePkg/Universal/Disk/DiskIo/Dxe/diskio.c b/EdkModulePkg/Universal/Disk/DiskIo/Dxe/diskio.c
index 62ae6d2..d71e0aa 100644
--- a/EdkModulePkg/Universal/Disk/DiskIo/Dxe/diskio.c
+++ b/EdkModulePkg/Universal/Disk/DiskIo/Dxe/diskio.c
@@ -171,7 +171,7 @@ ErrorExit:
if (EFI_ERROR (Status)) {
if (Private != NULL) {
- gBS->FreePool (Private);
+ FreePool (Private);
}
gBS->CloseProtocol (
@@ -249,7 +249,7 @@ DiskIoDriverBindingStop (
}
if (!EFI_ERROR (Status)) {
- gBS->FreePool (Private);
+ FreePool (Private);
}
return Status;
@@ -474,7 +474,7 @@ DiskIoReadDisk (
Done:
if (PreData != NULL) {
- gBS->FreePool (PreData);
+ FreePool (PreData);
}
return Status;
@@ -722,7 +722,7 @@ DiskIoWriteDisk (
Done:
if (PreData != NULL) {
- gBS->FreePool (PreData);
+ FreePool (PreData);
}
return Status;
diff --git a/EdkModulePkg/Universal/Disk/Partition/Dxe/ElTorito.c b/EdkModulePkg/Universal/Disk/Partition/Dxe/ElTorito.c
index d740d24..5d2a07e 100644
--- a/EdkModulePkg/Universal/Disk/Partition/Dxe/ElTorito.c
+++ b/EdkModulePkg/Universal/Disk/Partition/Dxe/ElTorito.c
@@ -279,7 +279,7 @@ Returns:
}
}
- gBS->FreePool (VolDescriptor);
+ FreePool (VolDescriptor);
return Found;
}
diff --git a/EdkModulePkg/Universal/Disk/Partition/Dxe/Gpt.c b/EdkModulePkg/Universal/Disk/Partition/Dxe/Gpt.c
index 4b4910a..61a4ec5 100644
--- a/EdkModulePkg/Universal/Disk/Partition/Dxe/Gpt.c
+++ b/EdkModulePkg/Universal/Disk/Partition/Dxe/Gpt.c
@@ -310,19 +310,19 @@ Returns:
Done:
if (ProtectiveMbr != NULL) {
- gBS->FreePool (ProtectiveMbr);
+ FreePool (ProtectiveMbr);
}
if (PrimaryHeader != NULL) {
- gBS->FreePool (PrimaryHeader);
+ FreePool (PrimaryHeader);
}
if (BackupHeader != NULL) {
- gBS->FreePool (BackupHeader);
+ FreePool (BackupHeader);
}
if (PartEntry != NULL) {
- gBS->FreePool (PartEntry);
+ FreePool (PartEntry);
}
if (PEntryStatus != NULL) {
- gBS->FreePool (PEntryStatus);
+ FreePool (PEntryStatus);
}
return GptValid;
@@ -376,7 +376,7 @@ Returns:
PartHdr
);
if (EFI_ERROR (Status)) {
- gBS->FreePool (PartHdr);
+ FreePool (PartHdr);
return FALSE;
}
@@ -385,18 +385,18 @@ Returns:
PartHdr->MyLBA != Lba
) {
DEBUG ((EFI_D_INFO, " !Valid efi partition table header\n"));
- gBS->FreePool (PartHdr);
+ FreePool (PartHdr);
return FALSE;
}
CopyMem (PartHeader, PartHdr, sizeof (EFI_PARTITION_TABLE_HEADER));
if (!PartitionCheckGptEntryArrayCRC (BlockIo, DiskIo, PartHeader)) {
- gBS->FreePool (PartHdr);
+ FreePool (PartHdr);
return FALSE;
}
DEBUG ((EFI_D_INFO, " Valid efi partition table header\n"));
- gBS->FreePool (PartHdr);
+ FreePool (PartHdr);
return TRUE;
}
@@ -449,7 +449,7 @@ Returns:
Ptr
);
if (EFI_ERROR (Status)) {
- gBS->FreePool (Ptr);
+ FreePool (Ptr);
return FALSE;
}
@@ -458,11 +458,11 @@ Returns:
Status = gBS->CalculateCrc32 (Ptr, Size, &Crc);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "CheckPEntryArrayCRC: Crc calculation failed\n"));
- gBS->FreePool (Ptr);
+ FreePool (Ptr);
return FALSE;
}
- gBS->FreePool (Ptr);
+ FreePool (Ptr);
return (BOOLEAN) (PartHeader->PartitionEntryArrayCRC32 == Crc);
}
@@ -555,8 +555,8 @@ Returns:
);
Done:
- gBS->FreePool (PartHdr);
- gBS->FreePool (Ptr);
+ FreePool (PartHdr);
+ FreePool (Ptr);
if (EFI_ERROR (Status)) {
return FALSE;
diff --git a/EdkModulePkg/Universal/Disk/Partition/Dxe/Mbr.c b/EdkModulePkg/Universal/Disk/Partition/Dxe/Mbr.c
index f1b1de0..cf790d4 100644
--- a/EdkModulePkg/Universal/Disk/Partition/Dxe/Mbr.c
+++ b/EdkModulePkg/Universal/Disk/Partition/Dxe/Mbr.c
@@ -184,7 +184,7 @@ Returns:
if (DevicePathType (LastDevicePathNode) == MEDIA_DEVICE_PATH &&
DevicePathSubType (LastDevicePathNode) == MEDIA_HARDDRIVE_DP
) {
- gBS->CopyMem (&ParentHdDev, LastDevicePathNode, sizeof (ParentHdDev));
+ CopyMem (&ParentHdDev, LastDevicePathNode, sizeof (ParentHdDev));
} else {
LastDevicePathNode = NULL;
}
@@ -319,7 +319,7 @@ Returns:
}
Done:
- gBS->FreePool (Mbr);
+ FreePool (Mbr);
return Found;
}
diff --git a/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.c b/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.c
index b4207d4..86d1cfe 100644
--- a/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.c
+++ b/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.c
@@ -384,8 +384,8 @@ PartitionDriverBindingStop (
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
);
} else {
- gBS->FreePool (Private->DevicePath);
- gBS->FreePool (Private);
+ FreePool (Private->DevicePath);
+ FreePool (Private);
}
}
@@ -653,7 +653,7 @@ Returns:
Private->DevicePath = AppendDevicePathNode (ParentDevicePath, DevicePathNode);
if (Private->DevicePath == NULL) {
- gBS->FreePool (Private);
+ FreePool (Private);
return EFI_OUT_OF_RESOURCES;
}
@@ -693,8 +693,8 @@ Returns:
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
);
} else {
- gBS->FreePool (Private->DevicePath);
- gBS->FreePool (Private);
+ FreePool (Private->DevicePath);
+ FreePool (Private);
}
return Status;
diff --git a/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.msa b/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.msa
index 6c21dcf..3ed7fef 100644
--- a/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.msa
+++ b/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.msa
@@ -6,8 +6,11 @@
<GuidValue>1FA1F39E-FEFF-4aae-BD7B-38A070A3B609</GuidValue>
<Version>1.0</Version>
<Abstract>Component description file for Partition module.</Abstract>
- <Description>Partition driver that produces logical BlockIo devices from a physical BlockIo device.</Description>
- <Copyright>Copyright (c) 2006, Intel Corporation</Copyright>
+ <Description>Partition driver produces the logical BlockIo device
+ that represents the bytes Start to End of the Parent Block IO
+ device (one partition of physical BlockIo device,
+ which can be one of GPT, MBR, ElTorito partition).</Description>
+ <Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>
<License>All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -22,8 +25,9 @@
<OutputFileBasename>Partition</OutputFileBasename>
</ModuleDefinitions>
<LibraryClassDefinitions>
- <LibraryClass Usage="ALWAYS_CONSUMED">
+ <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="bda39d3a-451b-4350-8266-81ab10fa0523">
<Keyword>DebugLib</Keyword>
+ <HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>
</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>UefiDriverModelLib</Keyword>
@@ -71,12 +75,18 @@
<Protocol Usage="TO_START">
<ProtocolCName>gEfiDevicePathProtocolGuid</ProtocolCName>
</Protocol>
+ <Protocol Usage="BY_START">
+ <ProtocolCName>gEfiDevicePathProtocolGuid</ProtocolCName>
+ </Protocol>
+ <Protocol Usage="BY_START">
+ <ProtocolCName>gEfiBlockIoProtocolGuid</ProtocolCName>
+ </Protocol>
</Protocols>
<Guids>
<GuidCNames Usage="SOMETIMES_CONSUMED">
<GuidCName>gEfiPartTypeSystemPartGuid</GuidCName>
</GuidCNames>
- <GuidCNames Usage="ALWAYS_CONSUMED">
+ <GuidCNames Usage="SOMETIMES_CONSUMED">
<GuidCName>gEfiPartTypeUnusedGuid</GuidCName>
</GuidCNames>
</Guids>
diff --git a/EdkModulePkg/Universal/Disk/UnicodeCollation/English/Dxe/English.msa b/EdkModulePkg/Universal/Disk/UnicodeCollation/English/Dxe/English.msa
index 90cb810..3a72998 100644
--- a/EdkModulePkg/Universal/Disk/UnicodeCollation/English/Dxe/English.msa
+++ b/EdkModulePkg/Universal/Disk/UnicodeCollation/English/Dxe/English.msa
@@ -6,8 +6,8 @@
<GuidValue>CD3BAFB6-50FB-4fe8-8E4E-AB74D2C1A600</GuidValue>
<Version>1.0</Version>
<Abstract>Component description file for English module for unicode collation.</Abstract>
- <Description>This driver installs EFI_UNICODE_COLLATION_PROTOCOL protocol to provide Unicode strings function.</Description>
- <Copyright>Copyright (c) 2006, Intel Corporation</Copyright>
+ <Description>This driver installs UEFI EFI_UNICODE_COLLATION_PROTOCOL protocol to provide Unicode strings function.</Description>
+ <Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>
<License>All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -22,8 +22,9 @@
<OutputFileBasename>English</OutputFileBasename>
</ModuleDefinitions>
<LibraryClassDefinitions>
- <LibraryClass Usage="ALWAYS_CONSUMED">
+ <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="bda39d3a-451b-4350-8266-81ab10fa0523">
<Keyword>DebugLib</Keyword>
+ <HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>
</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>UefiDriverEntryPoint</Keyword>
diff --git a/EdkModulePkg/Universal/Ebc/Dxe/Ebc.msa b/EdkModulePkg/Universal/Ebc/Dxe/Ebc.msa
index 243b538..6b43afa 100644
--- a/EdkModulePkg/Universal/Ebc/Dxe/Ebc.msa
+++ b/EdkModulePkg/Universal/Ebc/Dxe/Ebc.msa
@@ -6,8 +6,9 @@
<GuidValue>13AC6DD0-73D0-11D4-B06B-00AA00BD6DE7</GuidValue>
<Version>1.0</Version>
<Abstract>Component description file for Ebc module.</Abstract>
- <Description>This module for the EBC virtual machine implementation.</Description>
- <Copyright>Copyright (c) 2006, Intel Corporation</Copyright>
+ <Description>This module for the EBC virtual machine implementation produces
+ EBC and EBC debug support protocols.</Description>
+ <Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>
<License>All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -17,7 +18,7 @@
<Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
</MsaHeader>
<ModuleDefinitions>
- <SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
+ <SupportedArchitectures>IA32 X64 IPF</SupportedArchitectures>
<BinaryModule>false</BinaryModule>
<OutputFileBasename>Ebc</OutputFileBasename>
</ModuleDefinitions>
@@ -25,29 +26,22 @@
<LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>BaseLib</Keyword>
</LibraryClass>
- <LibraryClass Usage="ALWAYS_CONSUMED">
+ <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="bda39d3a-451b-4350-8266-81ab10fa0523">
<Keyword>DebugLib</Keyword>
+ <HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>
</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>UefiDriverEntryPoint</Keyword>
</LibraryClass>
- <LibraryClass Usage="ALWAYS_CONSUMED">
- <Keyword>ReportStatusCodeLib</Keyword>
- </LibraryClass>
- <LibraryClass Usage="ALWAYS_CONSUMED">
- <Keyword>UefiLib</Keyword>
- </LibraryClass>
- <LibraryClass Usage="ALWAYS_CONSUMED">
- <Keyword>BaseLib</Keyword>
- </LibraryClass>
- <LibraryClass Usage="ALWAYS_CONSUMED">
+ <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="f1bbe03d-2f28-4dee-bec7-d98d7a30c36a">
<Keyword>BaseMemoryLib</Keyword>
+ <HelpText>Recommended libary Instance is DxeMemoryLib instance in MdePkg.</HelpText>
</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">
- <Keyword>MemoryAllocationLib</Keyword>
+ <Keyword>UefiBootServicesTableLib</Keyword>
</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">
- <Keyword>UefiBootServicesTableLib</Keyword>
+ <Keyword>MemoryAllocationLib</Keyword>
</LibraryClass>
</LibraryClassDefinitions>
<SourceFiles>
@@ -56,18 +50,18 @@
<Filename>EbcExecute.c</Filename>
<Filename>EbcExecute.h</Filename>
<Filename>Ebc.dxs</Filename>
- <Filename SupArchList="IA32">Ia32/EbcLowLevel.asm</Filename>
- <Filename SupArchList="IA32">Ia32/EbcLowLevel.S</Filename>
+ <Filename SupArchList="IA32" ToolChainFamily="MSFT">Ia32/EbcLowLevel.asm</Filename>
+ <Filename SupArchList="IA32" ToolChainFamily="GCC">Ia32/EbcLowLevel.S</Filename>
<Filename SupArchList="IA32">Ia32/EbcSupport.c</Filename>
- <Filename SupArchList="X64">x64/EbcLowLevel.asm</Filename>
- <Filename SupArchList="X64" ToolChainFamily="gcc">x64/EbcLowLevel.S</Filename>
+ <Filename SupArchList="X64" ToolChainFamily="MSFT">x64/EbcLowLevel.asm</Filename>
+ <Filename SupArchList="X64" ToolChainFamily="GCC">x64/EbcLowLevel.S</Filename>
<Filename SupArchList="X64">x64/EbcSupport.c</Filename>
<Filename SupArchList="IPF">Ipf/EbcLowLevel.s</Filename>
<Filename SupArchList="IPF">Ipf/EbcSupport.c</Filename>
+ <Filename SupArchList="IPF">Ipf/EbcSupport.h</Filename>
</SourceFiles>
<PackageDependencies>
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
- <Package PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>
</PackageDependencies>
<Protocols>
<Protocol Usage="ALWAYS_PRODUCED">
diff --git a/EdkModulePkg/Universal/Ebc/Dxe/EbcInt.c b/EdkModulePkg/Universal/Ebc/Dxe/EbcInt.c
index cf68329..52f8d9f 100644
--- a/EdkModulePkg/Universal/Ebc/Dxe/EbcInt.c
+++ b/EdkModulePkg/Universal/Ebc/Dxe/EbcInt.c
@@ -222,12 +222,9 @@ Returns:
//
// Allocate memory for our protocol. Then fill in the blanks.
//
- Status = gBS->AllocatePool (
- EfiBootServicesData,
- sizeof (EFI_EBC_PROTOCOL),
- (VOID **) &EbcProtocol
- );
- if (Status != EFI_SUCCESS) {
+ EbcProtocol = AllocatePool (sizeof (EFI_EBC_PROTOCOL));
+
+ if (EbcProtocol == NULL) {
return EFI_OUT_OF_RESOURCES;
}
@@ -273,7 +270,7 @@ Returns:
}
if (HandleBuffer != NULL) {
- gBS->FreePool (HandleBuffer);
+ FreePool (HandleBuffer);
HandleBuffer = NULL;
}
//
@@ -287,19 +284,16 @@ Returns:
EbcProtocol
);
if (EFI_ERROR (Status)) {
- gBS->FreePool (EbcProtocol);
+ FreePool (EbcProtocol);
return Status;
}
}
//
// Allocate memory for our debug protocol. Then fill in the blanks.
//
- Status = gBS->AllocatePool (
- EfiBootServicesData,
- sizeof (EFI_DEBUG_SUPPORT_PROTOCOL),
- (VOID **) &EbcDebugProtocol
- );
- if (Status != EFI_SUCCESS) {
+ EbcDebugProtocol = AllocatePool (sizeof (EFI_DEBUG_SUPPORT_PROTOCOL));
+
+ if (EbcDebugProtocol == NULL) {
goto ErrorExit;
}
@@ -322,7 +316,7 @@ Returns:
// This is recoverable, so free the memory and continue.
//
if (EFI_ERROR (Status)) {
- gBS->FreePool (EbcDebugProtocol);
+ FreePool (EbcDebugProtocol);
goto ErrorExit;
}
//
@@ -370,11 +364,11 @@ ErrorExit:
}
if (HandleBuffer != NULL) {
- gBS->FreePool (HandleBuffer);
+ FreePool (HandleBuffer);
HandleBuffer = NULL;
}
- gBS->FreePool (EbcProtocol);
+ FreePool (EbcProtocol);
return Status;
}
@@ -894,8 +888,8 @@ Returns:
ThunkList = ImageList->ThunkList;
while (ThunkList != NULL) {
NextThunkList = ThunkList->Next;
- gBS->FreePool (ThunkList->ThunkBuffer);
- gBS->FreePool (ThunkList);
+ FreePool (ThunkList->ThunkBuffer);
+ FreePool (ThunkList);
ThunkList = NextThunkList;
}
//
@@ -912,7 +906,7 @@ Returns:
//
// Now free up the image list element
//
- gBS->FreePool (ImageList);
+ FreePool (ImageList);
return EFI_SUCCESS;
}
@@ -970,12 +964,9 @@ Returns:
//
// Allocate a new one
//
- Status = gBS->AllocatePool (
- EfiBootServicesData,
- sizeof (EBC_IMAGE_LIST),
- (VOID **) &ImageList
- );
- if (Status != EFI_SUCCESS) {
+ ImageList = AllocatePool (sizeof (EBC_IMAGE_LIST));
+
+ if (ImageList == NULL) {
return EFI_OUT_OF_RESOURCES;
}
@@ -987,12 +978,9 @@ Returns:
//
// Ok, now create a new thunk element to add to the list
//
- Status = gBS->AllocatePool (
- EfiBootServicesData,
- sizeof (EBC_THUNK_LIST),
- (VOID **) &ThunkList
- );
- if (Status != EFI_SUCCESS) {
+ ThunkList = AllocatePool (sizeof (EBC_THUNK_LIST));
+
+ if (ThunkList == NULL) {
return EFI_OUT_OF_RESOURCES;
}
//
@@ -1061,8 +1049,8 @@ Returns:
//
// Allocate memory for the protocol, then fill in the fields
//
- Status = gBS->AllocatePool (EfiBootServicesData, sizeof (EFI_EBC_VM_TEST_PROTOCOL), (VOID **) &EbcVmTestProtocol);
- if (Status != EFI_SUCCESS) {
+ EbcVmTestProtocol = AllocatePool (sizeof (EFI_EBC_VM_TEST_PROTOCOL));
+ if (EbcVmTestProtocol == NULL) {
return EFI_OUT_OF_RESOURCES;
}
EbcVmTestProtocol->Execute = (EBC_VM_TEST_EXECUTE) EbcExecuteInstructions;
@@ -1078,7 +1066,7 @@ Returns:
Handle = NULL;
Status = gBS->InstallProtocolInterface (&Handle, &mEfiEbcVmTestProtocolGuid, EFI_NATIVE_INTERFACE, EbcVmTestProtocol);
if (EFI_ERROR (Status)) {
- gBS->FreePool (EbcVmTestProtocol);
+ FreePool (EbcVmTestProtocol);
}
return Status;
}
diff --git a/EdkModulePkg/Universal/Ebc/Dxe/Ia32/EbcSupport.c b/EdkModulePkg/Universal/Ebc/Dxe/Ia32/EbcSupport.c
index 14059d7..ab05449 100644
--- a/EdkModulePkg/Universal/Ebc/Dxe/Ia32/EbcSupport.c
+++ b/EdkModulePkg/Universal/Ebc/Dxe/Ia32/EbcSupport.c
@@ -371,7 +371,6 @@ Returns:
UINT32 Addr;
INT32 Size;
INT32 ThunkSize;
- EFI_STATUS Status;
//
// Check alignment of pointer to EBC code
@@ -383,12 +382,9 @@ Returns:
Size = EBC_THUNK_SIZE;
ThunkSize = Size;
- Status = gBS->AllocatePool (
- EfiBootServicesData,
- Size,
- (VOID *) &Ptr
- );
- if (Status != EFI_SUCCESS) {
+ Ptr = AllocatePool (Size);
+
+ if (Ptr == NULL) {
return EFI_OUT_OF_RESOURCES;
}
//
diff --git a/EdkModulePkg/Universal/Ebc/Dxe/Ipf/EbcSupport.c b/EdkModulePkg/Universal/Ebc/Dxe/Ipf/EbcSupport.c
index 29ee55b..d60ab09 100644
--- a/EdkModulePkg/Universal/Ebc/Dxe/Ipf/EbcSupport.c
+++ b/EdkModulePkg/Universal/Ebc/Dxe/Ipf/EbcSupport.c
@@ -319,7 +319,6 @@ Returns:
UINT64 *Data64Ptr;
UINT32 ThunkSize;
UINT32 Size;
- EFI_STATUS Status;
//
// Check alignment of pointer to EBC code, which must always be aligned
@@ -335,12 +334,9 @@ Returns:
//
Size = EBC_THUNK_SIZE + EBC_THUNK_ALIGNMENT - 1;
ThunkSize = Size;
- Status = gBS->AllocatePool (
- EfiBootServicesData,
- Size,
- (VOID *) &Ptr
- );
- if (Status != EFI_SUCCESS) {
+ Ptr = AllocatePool (Size);
+
+ if (Ptr == NULL) {
return EFI_OUT_OF_RESOURCES;
}
//
@@ -872,6 +868,6 @@ Returns:
Source = (VOID *) EbcSp;
Destination = (VOID *) ((UINT8 *) EbcSp - FrameSize - CPU_STACK_ALIGNMENT);
Destination = (VOID *) ((UINTN) ((UINTN) Destination + CPU_STACK_ALIGNMENT - 1) &~((UINTN) CPU_STACK_ALIGNMENT - 1));
- gBS->CopyMem (Destination, Source, FrameSize);
+ CopyMem (Destination, Source, FrameSize);
EbcAsmLLCALLEX ((UINTN) CallAddr, (UINTN) Destination);
}
diff --git a/EdkModulePkg/Universal/Ebc/Dxe/x64/EbcSupport.c b/EdkModulePkg/Universal/Ebc/Dxe/x64/EbcSupport.c
index 0b0e171..cad5c6a 100644
--- a/EdkModulePkg/Universal/Ebc/Dxe/x64/EbcSupport.c
+++ b/EdkModulePkg/Universal/Ebc/Dxe/x64/EbcSupport.c
@@ -331,7 +331,6 @@ Returns:
UINT64 Addr;
INT32 Size;
INT32 ThunkSize;
- EFI_STATUS Status;
//
// Check alignment of pointer to EBC code
@@ -343,12 +342,9 @@ Returns:
Size = EBC_THUNK_SIZE;
ThunkSize = Size;
- Status = gBS->AllocatePool (
- EfiBootServicesData,
- Size,
- (VOID *) &Ptr
- );
- if (Status != EFI_SUCCESS) {
+ Ptr = AllocatePool (Size);
+
+ if (Ptr == NULL) {
return EFI_OUT_OF_RESOURCES;
}
//