]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Perfect the msa of the following modules, DiskIo, Partition, English and Ebc.
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 16 Mar 2007 02:33:49 +0000 (02:33 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 16 Mar 2007 02:33:49 +0000 (02:33 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2480 6f19259b-4bc3-4df7-8a09-765794883524

13 files changed:
EdkModulePkg/Universal/Disk/DiskIo/Dxe/DiskIo.msa
EdkModulePkg/Universal/Disk/DiskIo/Dxe/diskio.c
EdkModulePkg/Universal/Disk/Partition/Dxe/ElTorito.c
EdkModulePkg/Universal/Disk/Partition/Dxe/Gpt.c
EdkModulePkg/Universal/Disk/Partition/Dxe/Mbr.c
EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.c
EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.msa
EdkModulePkg/Universal/Disk/UnicodeCollation/English/Dxe/English.msa
EdkModulePkg/Universal/Ebc/Dxe/Ebc.msa
EdkModulePkg/Universal/Ebc/Dxe/EbcInt.c
EdkModulePkg/Universal/Ebc/Dxe/Ia32/EbcSupport.c
EdkModulePkg/Universal/Ebc/Dxe/Ipf/EbcSupport.c
EdkModulePkg/Universal/Ebc/Dxe/x64/EbcSupport.c

index da662049fd080e28ab245edd7d66017e3146df63..f5b93c83e4f4d15ff57a0127f44c67abe61caea5 100644 (file)
@@ -7,7 +7,7 @@
     <Version>1.0</Version>\r
     <Abstract>Component description file for DiskIo module.</Abstract>\r
     <Description>DiskIo driver that layers it's self on every Block IO protocol in the system.</Description>\r
-    <Copyright>Copyright (c) 2006, Intel Corporation</Copyright>\r
+    <Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>\r
     <License>All rights reserved. This program and the accompanying materials\r
       are licensed and made available under the terms and conditions of the BSD License\r
       which accompanies this distribution.  The full text of the license may be found at\r
@@ -22,8 +22,9 @@
     <OutputFileBasename>DiskIo</OutputFileBasename>\r
   </ModuleDefinitions>\r
   <LibraryClassDefinitions>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">\r
+    <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="bda39d3a-451b-4350-8266-81ab10fa0523">\r
       <Keyword>DebugLib</Keyword>\r
+      <HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>\r
     </LibraryClass>\r
     <LibraryClass Usage="ALWAYS_CONSUMED">\r
       <Keyword>UefiDriverModelLib</Keyword>\r
index 62ae6d2b8aa96bcbf8642a58412584cf40d09819..d71e0aa503ce14e4f3c2428b5944dda932a941ff 100644 (file)
@@ -171,7 +171,7 @@ ErrorExit:
   if (EFI_ERROR (Status)) {\r
 \r
     if (Private != NULL) {\r
-      gBS->FreePool (Private);\r
+      FreePool (Private);\r
     }\r
 \r
     gBS->CloseProtocol (\r
@@ -249,7 +249,7 @@ DiskIoDriverBindingStop (
   }\r
 \r
   if (!EFI_ERROR (Status)) {\r
-    gBS->FreePool (Private);\r
+    FreePool (Private);\r
   }\r
 \r
   return Status;\r
@@ -474,7 +474,7 @@ DiskIoReadDisk (
 \r
 Done:\r
   if (PreData != NULL) {\r
-    gBS->FreePool (PreData);\r
+    FreePool (PreData);\r
   }\r
 \r
   return Status;\r
@@ -722,7 +722,7 @@ DiskIoWriteDisk (
 \r
 Done:\r
   if (PreData != NULL) {\r
-    gBS->FreePool (PreData);\r
+    FreePool (PreData);\r
   }\r
 \r
   return Status;\r
index d740d240870d2ff65aa526c2b1a8ce6ca2589f5b..5d2a07ef8ca8012c34c85529f8b11fd4c5546847 100644 (file)
@@ -279,7 +279,7 @@ Returns:
     }\r
   }\r
 \r
-  gBS->FreePool (VolDescriptor);\r
+  FreePool (VolDescriptor);\r
 \r
   return Found;\r
 }\r
index 4b4910a813e1407de9f702bc56563154489c1445..61a4ec5e70e9fc51e9e62d8687e0b90806c82a26 100644 (file)
@@ -310,19 +310,19 @@ Returns:
 \r
 Done:\r
   if (ProtectiveMbr != NULL) {\r
-    gBS->FreePool (ProtectiveMbr);\r
+    FreePool (ProtectiveMbr);\r
   }\r
   if (PrimaryHeader != NULL) {\r
-    gBS->FreePool (PrimaryHeader);\r
+    FreePool (PrimaryHeader);\r
   }\r
   if (BackupHeader != NULL) {\r
-    gBS->FreePool (BackupHeader);\r
+    FreePool (BackupHeader);\r
   }\r
   if (PartEntry != NULL) {\r
-    gBS->FreePool (PartEntry);\r
+    FreePool (PartEntry);\r
   }\r
   if (PEntryStatus != NULL) {\r
-    gBS->FreePool (PEntryStatus);\r
+    FreePool (PEntryStatus);\r
   }\r
 \r
   return GptValid;\r
@@ -376,7 +376,7 @@ Returns:
                       PartHdr\r
                       );\r
   if (EFI_ERROR (Status)) {\r
-    gBS->FreePool (PartHdr);\r
+    FreePool (PartHdr);\r
     return FALSE;\r
   }\r
 \r
@@ -385,18 +385,18 @@ Returns:
       PartHdr->MyLBA != Lba\r
       ) {\r
     DEBUG ((EFI_D_INFO, " !Valid efi partition table header\n"));\r
-    gBS->FreePool (PartHdr);\r
+    FreePool (PartHdr);\r
     return FALSE;\r
   }\r
 \r
   CopyMem (PartHeader, PartHdr, sizeof (EFI_PARTITION_TABLE_HEADER));\r
   if (!PartitionCheckGptEntryArrayCRC (BlockIo, DiskIo, PartHeader)) {\r
-    gBS->FreePool (PartHdr);\r
+    FreePool (PartHdr);\r
     return FALSE;\r
   }\r
 \r
   DEBUG ((EFI_D_INFO, " Valid efi partition table header\n"));\r
-  gBS->FreePool (PartHdr);\r
+  FreePool (PartHdr);\r
   return TRUE;\r
 }\r
 \r
@@ -449,7 +449,7 @@ Returns:
                     Ptr\r
                     );\r
   if (EFI_ERROR (Status)) {\r
-    gBS->FreePool (Ptr);\r
+    FreePool (Ptr);\r
     return FALSE;\r
   }\r
 \r
@@ -458,11 +458,11 @@ Returns:
   Status  = gBS->CalculateCrc32 (Ptr, Size, &Crc);\r
   if (EFI_ERROR (Status)) {\r
     DEBUG ((EFI_D_ERROR, "CheckPEntryArrayCRC: Crc calculation failed\n"));\r
-    gBS->FreePool (Ptr);\r
+    FreePool (Ptr);\r
     return FALSE;\r
   }\r
 \r
-  gBS->FreePool (Ptr);\r
+  FreePool (Ptr);\r
 \r
   return (BOOLEAN) (PartHeader->PartitionEntryArrayCRC32 == Crc);\r
 }\r
@@ -555,8 +555,8 @@ Returns:
                     );\r
 \r
 Done:\r
-  gBS->FreePool (PartHdr);\r
-  gBS->FreePool (Ptr);\r
+  FreePool (PartHdr);\r
+  FreePool (Ptr);\r
 \r
   if (EFI_ERROR (Status)) {\r
     return FALSE;\r
index f1b1de0d64caa8398e2b0d657b9db67870a35031..cf790d45e3a6654b82112fcbafc7292e1be9846b 100644 (file)
@@ -184,7 +184,7 @@ Returns:
     if (DevicePathType (LastDevicePathNode) == MEDIA_DEVICE_PATH &&\r
         DevicePathSubType (LastDevicePathNode) == MEDIA_HARDDRIVE_DP\r
         ) {\r
-      gBS->CopyMem (&ParentHdDev, LastDevicePathNode, sizeof (ParentHdDev));\r
+      CopyMem (&ParentHdDev, LastDevicePathNode, sizeof (ParentHdDev));\r
     } else {\r
       LastDevicePathNode = NULL;\r
     }\r
@@ -319,7 +319,7 @@ Returns:
   }\r
 \r
 Done:\r
-  gBS->FreePool (Mbr);\r
+  FreePool (Mbr);\r
 \r
   return Found;\r
 }\r
index b4207d42b8617656abb6627b52cb21df63a3dafb..86d1cfe52bd013cd9c99036e8c6ba6a37a2ea184 100644 (file)
@@ -384,8 +384,8 @@ PartitionDriverBindingStop (
               EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER\r
               );\r
       } else {\r
-        gBS->FreePool (Private->DevicePath);\r
-        gBS->FreePool (Private);\r
+        FreePool (Private->DevicePath);\r
+        FreePool (Private);\r
       }\r
 \r
     }\r
@@ -653,7 +653,7 @@ Returns:
   Private->DevicePath           = AppendDevicePathNode (ParentDevicePath, DevicePathNode);\r
 \r
   if (Private->DevicePath == NULL) {\r
-    gBS->FreePool (Private);\r
+    FreePool (Private);\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
 \r
@@ -693,8 +693,8 @@ Returns:
                     EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER\r
                     );\r
   } else {\r
-    gBS->FreePool (Private->DevicePath);\r
-    gBS->FreePool (Private);\r
+    FreePool (Private->DevicePath);\r
+    FreePool (Private);\r
   }\r
 \r
   return Status;\r
index 6c21dcfc708d0309129bc15f4d6d82608395dfe2..3ed7fef4b0d444812eeb48470334878d08392583 100644 (file)
@@ -6,8 +6,11 @@
     <GuidValue>1FA1F39E-FEFF-4aae-BD7B-38A070A3B609</GuidValue>\r
     <Version>1.0</Version>\r
     <Abstract>Component description file for Partition module.</Abstract>\r
-    <Description>Partition driver that produces logical BlockIo devices from a physical BlockIo device.</Description>\r
-    <Copyright>Copyright (c) 2006, Intel Corporation</Copyright>\r
+    <Description>Partition driver produces the logical BlockIo device \r
+      that represents the bytes Start to End of the Parent Block IO \r
+      device (one partition of physical BlockIo device, \r
+      which can be one of GPT, MBR, ElTorito partition).</Description>\r
+    <Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>\r
     <License>All rights reserved. This program and the accompanying materials\r
       are licensed and made available under the terms and conditions of the BSD License\r
       which accompanies this distribution.  The full text of the license may be found at\r
@@ -22,8 +25,9 @@
     <OutputFileBasename>Partition</OutputFileBasename>\r
   </ModuleDefinitions>\r
   <LibraryClassDefinitions>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">\r
+    <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="bda39d3a-451b-4350-8266-81ab10fa0523">\r
       <Keyword>DebugLib</Keyword>\r
+      <HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>\r
     </LibraryClass>\r
     <LibraryClass Usage="ALWAYS_CONSUMED">\r
       <Keyword>UefiDriverModelLib</Keyword>\r
     <Protocol Usage="TO_START">\r
       <ProtocolCName>gEfiDevicePathProtocolGuid</ProtocolCName>\r
     </Protocol>\r
+    <Protocol Usage="BY_START">\r
+      <ProtocolCName>gEfiDevicePathProtocolGuid</ProtocolCName>\r
+    </Protocol>\r
+    <Protocol Usage="BY_START">\r
+      <ProtocolCName>gEfiBlockIoProtocolGuid</ProtocolCName>\r
+    </Protocol>\r
   </Protocols>\r
   <Guids>\r
     <GuidCNames Usage="SOMETIMES_CONSUMED">\r
       <GuidCName>gEfiPartTypeSystemPartGuid</GuidCName>\r
     </GuidCNames>\r
-    <GuidCNames Usage="ALWAYS_CONSUMED">\r
+    <GuidCNames Usage="SOMETIMES_CONSUMED">\r
       <GuidCName>gEfiPartTypeUnusedGuid</GuidCName>\r
     </GuidCNames>\r
   </Guids>\r
index 90cb810585e978e4f786e7603d8cc50316526988..3a72998ba3501f047127027182f5f544729c4dd0 100644 (file)
@@ -6,8 +6,8 @@
     <GuidValue>CD3BAFB6-50FB-4fe8-8E4E-AB74D2C1A600</GuidValue>\r
     <Version>1.0</Version>\r
     <Abstract>Component description file for English module for unicode collation.</Abstract>\r
-    <Description>This driver installs EFI_UNICODE_COLLATION_PROTOCOL protocol to provide Unicode strings function.</Description>\r
-    <Copyright>Copyright (c) 2006, Intel Corporation</Copyright>\r
+    <Description>This driver installs UEFI EFI_UNICODE_COLLATION_PROTOCOL protocol to provide Unicode strings function.</Description>\r
+    <Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>\r
     <License>All rights reserved. This program and the accompanying materials\r
       are licensed and made available under the terms and conditions of the BSD License\r
       which accompanies this distribution.  The full text of the license may be found at\r
@@ -22,8 +22,9 @@
     <OutputFileBasename>English</OutputFileBasename>\r
   </ModuleDefinitions>\r
   <LibraryClassDefinitions>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">\r
+    <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="bda39d3a-451b-4350-8266-81ab10fa0523">\r
       <Keyword>DebugLib</Keyword>\r
+      <HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>\r
     </LibraryClass>\r
     <LibraryClass Usage="ALWAYS_CONSUMED">\r
       <Keyword>UefiDriverEntryPoint</Keyword>\r
index 243b538b10070ac2485dcc9febb0bf923280cb7f..6b43afac653c8d8d9d567eabf7031d234e60af2c 100644 (file)
@@ -6,8 +6,9 @@
     <GuidValue>13AC6DD0-73D0-11D4-B06B-00AA00BD6DE7</GuidValue>\r
     <Version>1.0</Version>\r
     <Abstract>Component description file for Ebc module.</Abstract>\r
-    <Description>This module for the EBC virtual machine implementation.</Description>\r
-    <Copyright>Copyright (c) 2006, Intel Corporation</Copyright>\r
+    <Description>This module for the EBC virtual machine implementation produces \r
+      EBC and EBC debug support protocols.</Description>\r
+    <Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>\r
     <License>All rights reserved. This program and the accompanying materials\r
       are licensed and made available under the terms and conditions of the BSD License\r
       which accompanies this distribution.  The full text of the license may be found at\r
@@ -17,7 +18,7 @@
     <Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION   0x00000052</Specification>\r
   </MsaHeader>\r
   <ModuleDefinitions>\r
-    <SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>\r
+    <SupportedArchitectures>IA32 X64 IPF</SupportedArchitectures>\r
     <BinaryModule>false</BinaryModule>\r
     <OutputFileBasename>Ebc</OutputFileBasename>\r
   </ModuleDefinitions>\r
     <LibraryClass Usage="ALWAYS_CONSUMED">\r
       <Keyword>BaseLib</Keyword>\r
     </LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">\r
+    <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="bda39d3a-451b-4350-8266-81ab10fa0523">\r
       <Keyword>DebugLib</Keyword>\r
+      <HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>\r
     </LibraryClass>\r
     <LibraryClass Usage="ALWAYS_CONSUMED">\r
       <Keyword>UefiDriverEntryPoint</Keyword>\r
     </LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">\r
-      <Keyword>ReportStatusCodeLib</Keyword>\r
-    </LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">\r
-      <Keyword>UefiLib</Keyword>\r
-    </LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">\r
-      <Keyword>BaseLib</Keyword>\r
-    </LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">\r
+    <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="f1bbe03d-2f28-4dee-bec7-d98d7a30c36a">\r
       <Keyword>BaseMemoryLib</Keyword>\r
+      <HelpText>Recommended libary Instance is DxeMemoryLib instance in MdePkg.</HelpText>\r
     </LibraryClass>\r
     <LibraryClass Usage="ALWAYS_CONSUMED">\r
-      <Keyword>MemoryAllocationLib</Keyword>\r
+      <Keyword>UefiBootServicesTableLib</Keyword>\r
     </LibraryClass>\r
     <LibraryClass Usage="ALWAYS_CONSUMED">\r
-      <Keyword>UefiBootServicesTableLib</Keyword>\r
+      <Keyword>MemoryAllocationLib</Keyword>\r
     </LibraryClass>\r
   </LibraryClassDefinitions>\r
   <SourceFiles>\r
     <Filename>EbcExecute.c</Filename>\r
     <Filename>EbcExecute.h</Filename>\r
     <Filename>Ebc.dxs</Filename>\r
-    <Filename SupArchList="IA32">Ia32/EbcLowLevel.asm</Filename>\r
-    <Filename SupArchList="IA32">Ia32/EbcLowLevel.S</Filename>\r
+    <Filename SupArchList="IA32" ToolChainFamily="MSFT">Ia32/EbcLowLevel.asm</Filename>\r
+    <Filename SupArchList="IA32" ToolChainFamily="GCC">Ia32/EbcLowLevel.S</Filename>\r
     <Filename SupArchList="IA32">Ia32/EbcSupport.c</Filename>\r
-    <Filename SupArchList="X64">x64/EbcLowLevel.asm</Filename>\r
-    <Filename SupArchList="X64" ToolChainFamily="gcc">x64/EbcLowLevel.S</Filename>\r
+    <Filename SupArchList="X64" ToolChainFamily="MSFT">x64/EbcLowLevel.asm</Filename>\r
+    <Filename SupArchList="X64" ToolChainFamily="GCC">x64/EbcLowLevel.S</Filename>\r
     <Filename SupArchList="X64">x64/EbcSupport.c</Filename>\r
     <Filename SupArchList="IPF">Ipf/EbcLowLevel.s</Filename>\r
     <Filename SupArchList="IPF">Ipf/EbcSupport.c</Filename>\r
+    <Filename SupArchList="IPF">Ipf/EbcSupport.h</Filename>\r
   </SourceFiles>\r
   <PackageDependencies>\r
     <Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
-    <Package PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>\r
   </PackageDependencies>\r
   <Protocols>\r
     <Protocol Usage="ALWAYS_PRODUCED">\r
index cf683295ea03e65c189277180f2c45c727d1bf96..52f8d9fad787b5d68bde2633fe3bde230d5cd25f 100644 (file)
@@ -222,12 +222,9 @@ Returns:
   //\r
   // Allocate memory for our protocol. Then fill in the blanks.\r
   //\r
-  Status = gBS->AllocatePool (\r
-                  EfiBootServicesData,\r
-                  sizeof (EFI_EBC_PROTOCOL),\r
-                  (VOID **) &EbcProtocol\r
-                  );\r
-  if (Status != EFI_SUCCESS) {\r
+  EbcProtocol = AllocatePool (sizeof (EFI_EBC_PROTOCOL));\r
+\r
+  if (EbcProtocol == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
 \r
@@ -273,7 +270,7 @@ Returns:
   }\r
 \r
   if (HandleBuffer != NULL) {\r
-    gBS->FreePool (HandleBuffer);\r
+    FreePool (HandleBuffer);\r
     HandleBuffer = NULL;\r
   }\r
   //\r
@@ -287,19 +284,16 @@ Returns:
                     EbcProtocol\r
                     );\r
     if (EFI_ERROR (Status)) {\r
-      gBS->FreePool (EbcProtocol);\r
+      FreePool (EbcProtocol);\r
       return Status;\r
     }\r
   }\r
   //\r
   // Allocate memory for our debug protocol. Then fill in the blanks.\r
   //\r
-  Status = gBS->AllocatePool (\r
-                  EfiBootServicesData,\r
-                  sizeof (EFI_DEBUG_SUPPORT_PROTOCOL),\r
-                  (VOID **) &EbcDebugProtocol\r
-                  );\r
-  if (Status != EFI_SUCCESS) {\r
+  EbcDebugProtocol = AllocatePool (sizeof (EFI_DEBUG_SUPPORT_PROTOCOL));\r
+\r
+  if (EbcDebugProtocol == NULL) {\r
     goto ErrorExit;\r
   }\r
 \r
@@ -322,7 +316,7 @@ Returns:
   // This is recoverable, so free the memory and continue.\r
   //\r
   if (EFI_ERROR (Status)) {\r
-    gBS->FreePool (EbcDebugProtocol);\r
+    FreePool (EbcDebugProtocol);\r
     goto ErrorExit;\r
   }\r
   //\r
@@ -370,11 +364,11 @@ ErrorExit:
   }\r
 \r
   if (HandleBuffer != NULL) {\r
-    gBS->FreePool (HandleBuffer);\r
+    FreePool (HandleBuffer);\r
     HandleBuffer = NULL;\r
   }\r
 \r
-  gBS->FreePool (EbcProtocol);\r
+  FreePool (EbcProtocol);\r
 \r
   return Status;\r
 }\r
@@ -894,8 +888,8 @@ Returns:
   ThunkList = ImageList->ThunkList;\r
   while (ThunkList != NULL) {\r
     NextThunkList = ThunkList->Next;\r
-    gBS->FreePool (ThunkList->ThunkBuffer);\r
-    gBS->FreePool (ThunkList);\r
+    FreePool (ThunkList->ThunkBuffer);\r
+    FreePool (ThunkList);\r
     ThunkList = NextThunkList;\r
   }\r
   //\r
@@ -912,7 +906,7 @@ Returns:
   //\r
   // Now free up the image list element\r
   //\r
-  gBS->FreePool (ImageList);\r
+  FreePool (ImageList);\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -970,12 +964,9 @@ Returns:
     //\r
     // Allocate a new one\r
     //\r
-    Status = gBS->AllocatePool (\r
-                    EfiBootServicesData,\r
-                    sizeof (EBC_IMAGE_LIST),\r
-                    (VOID **) &ImageList\r
-                    );\r
-    if (Status != EFI_SUCCESS) {\r
+    ImageList = AllocatePool (sizeof (EBC_IMAGE_LIST));\r
+\r
+    if (ImageList == NULL) {\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r
 \r
@@ -987,12 +978,9 @@ Returns:
   //\r
   // Ok, now create a new thunk element to add to the list\r
   //\r
-  Status = gBS->AllocatePool (\r
-                  EfiBootServicesData,\r
-                  sizeof (EBC_THUNK_LIST),\r
-                  (VOID **) &ThunkList\r
-                  );\r
-  if (Status != EFI_SUCCESS) {\r
+  ThunkList = AllocatePool (sizeof (EBC_THUNK_LIST));\r
+\r
+  if (ThunkList == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
   //\r
@@ -1061,8 +1049,8 @@ Returns:
   //\r
   // Allocate memory for the protocol, then fill in the fields\r
   //\r
-  Status = gBS->AllocatePool (EfiBootServicesData, sizeof (EFI_EBC_VM_TEST_PROTOCOL), (VOID **) &EbcVmTestProtocol);\r
-  if (Status != EFI_SUCCESS) {\r
+  EbcVmTestProtocol = AllocatePool (sizeof (EFI_EBC_VM_TEST_PROTOCOL));\r
+  if (EbcVmTestProtocol == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
   EbcVmTestProtocol->Execute      = (EBC_VM_TEST_EXECUTE) EbcExecuteInstructions;\r
@@ -1078,7 +1066,7 @@ Returns:
   Handle  = NULL;\r
   Status  = gBS->InstallProtocolInterface (&Handle, &mEfiEbcVmTestProtocolGuid, EFI_NATIVE_INTERFACE, EbcVmTestProtocol);\r
   if (EFI_ERROR (Status)) {\r
-    gBS->FreePool (EbcVmTestProtocol);\r
+    FreePool (EbcVmTestProtocol);\r
   }\r
   return Status;\r
 }\r
index 14059d71e5c4179a741e76d4b5d1ee4429aa76a6..ab054493418e844ab6c8a5bfef8125a51b86d042 100644 (file)
@@ -371,7 +371,6 @@ Returns:
   UINT32      Addr;\r
   INT32       Size;\r
   INT32       ThunkSize;\r
-  EFI_STATUS  Status;\r
 \r
   //\r
   // Check alignment of pointer to EBC code\r
@@ -383,12 +382,9 @@ Returns:
   Size      = EBC_THUNK_SIZE;\r
   ThunkSize = Size;\r
 \r
-  Status = gBS->AllocatePool (\r
-                  EfiBootServicesData,\r
-                  Size,\r
-                  (VOID *) &Ptr\r
-                  );\r
-  if (Status != EFI_SUCCESS) {\r
+  Ptr = AllocatePool (Size);\r
+\r
+  if (Ptr == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
   //\r
index 29ee55b8640d1bd0bdb62663244088f38b518a68..d60ab09d8a0630ec2abcec56a277999716f13c4c 100644 (file)
@@ -319,7 +319,6 @@ Returns:
   UINT64      *Data64Ptr;\r
   UINT32      ThunkSize;\r
   UINT32      Size;\r
-  EFI_STATUS  Status;\r
 \r
   //\r
   // Check alignment of pointer to EBC code, which must always be aligned\r
@@ -335,12 +334,9 @@ Returns:
   //\r
   Size      = EBC_THUNK_SIZE + EBC_THUNK_ALIGNMENT - 1;\r
   ThunkSize = Size;\r
-  Status = gBS->AllocatePool (\r
-                  EfiBootServicesData,\r
-                  Size,\r
-                  (VOID *) &Ptr\r
-                  );\r
-  if (Status != EFI_SUCCESS) {\r
+  Ptr = AllocatePool (Size);\r
+\r
+  if (Ptr == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
   //\r
@@ -872,6 +868,6 @@ Returns:
   Source      = (VOID *) EbcSp;\r
   Destination = (VOID *) ((UINT8 *) EbcSp - FrameSize - CPU_STACK_ALIGNMENT);\r
   Destination = (VOID *) ((UINTN) ((UINTN) Destination + CPU_STACK_ALIGNMENT - 1) &~((UINTN) CPU_STACK_ALIGNMENT - 1));\r
-  gBS->CopyMem (Destination, Source, FrameSize);\r
+  CopyMem (Destination, Source, FrameSize);\r
   EbcAsmLLCALLEX ((UINTN) CallAddr, (UINTN) Destination);\r
 }\r
index 0b0e171eb363d39a0143043eb370a850af5262f4..cad5c6a43bf27df296115631420d3c0511c6ae45 100644 (file)
@@ -331,7 +331,6 @@ Returns:
   UINT64      Addr;\r
   INT32       Size;\r
   INT32       ThunkSize;\r
-  EFI_STATUS  Status;\r
 \r
   //\r
   // Check alignment of pointer to EBC code\r
@@ -343,12 +342,9 @@ Returns:
   Size      = EBC_THUNK_SIZE;\r
   ThunkSize = Size;\r
 \r
-  Status = gBS->AllocatePool (\r
-                  EfiBootServicesData,\r
-                  Size,\r
-                  (VOID *) &Ptr\r
-                  );\r
-  if (Status != EFI_SUCCESS) {\r
+  Ptr = AllocatePool (Size);\r
+\r
+  if (Ptr == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
   //\r