Clean up the following module msa files, they are three networt and two PCD modules.
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 9 Apr 2007 07:37:43 +0000 (07:37 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 9 Apr 2007 07:37:43 +0000 (07:37 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2551 6f19259b-4bc3-4df7-8a09-765794883524

21 files changed:
EdkModulePkg/EdkModulePkg.fpd
EdkModulePkg/Universal/Network/PxeBc/Dxe/BC.msa
EdkModulePkg/Universal/Network/PxeBc/Dxe/Bc.h
EdkModulePkg/Universal/Network/PxeBc/Dxe/bc.c
EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_arp.c
EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_dhcp.c
EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_mtftp.c
EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_loadfile.c
EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/Dhcp4.msa
EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4.c
EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4InitSelect.c
EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4Release.c
EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4Run.c
EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4Setup.c
EdkModulePkg/Universal/Network/Snp32_64/Dxe/SNP.msa
EdkModulePkg/Universal/Network/Snp32_64/Dxe/snp.c
EdkModulePkg/Universal/PCD/Dxe/Pcd.dxs
EdkModulePkg/Universal/PCD/Dxe/Pcd.msa
EdkModulePkg/Universal/PCD/Pei/Pcd.msa
EdkNt32Pkg/Nt32.fpd
EdkUnixPkg/Unix.fpd

index 71db2f38c6ab50bae24ee55086714e9dd0785c2c..2e7e9344d8bb6867b2aa68cacc06961c2aacb271 100644 (file)
         <Instance ModuleGuid="52af22ae-9901-4484-8cdc-622dd5838b09" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
         <Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
         <Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
-        <Instance ModuleGuid="50bcb105-6634-441d-b403-659110a03ad2" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>\r
         <Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
         <Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <!--Pkg: MdePkg Mod: BasePrintLib Path: MdePkg\Library\BasePrintLib\BasePrintLib.msa-->\r
+        <Instance ModuleGuid="a86fbfca-0183-4eeb-aa8a-762e3b7da1f3" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>\r
       </Libraries>\r
       <PcdBuildDefinition>\r
         <PcdData ItemType="FIXED_AT_BUILD">\r
         <Instance ModuleGuid="52af22ae-9901-4484-8cdc-622dd5838b09" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
         <Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
         <Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
-        <Instance ModuleGuid="50bcb105-6634-441d-b403-659110a03ad2" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>\r
         <Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
         <Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <!--Pkg: MdePkg Mod: BasePrintLib Path: MdePkg\Library\BasePrintLib\BasePrintLib.msa-->\r
+        <Instance ModuleGuid="a86fbfca-0183-4eeb-aa8a-762e3b7da1f3" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>\r
       </Libraries>\r
       <PcdBuildDefinition>\r
         <PcdData ItemType="FIXED_AT_BUILD">\r
         <Instance ModuleGuid="52af22ae-9901-4484-8cdc-622dd5838b09" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
         <Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
         <Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
-        <Instance ModuleGuid="50bcb105-6634-441d-b403-659110a03ad2" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>\r
         <Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
         <Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <!--Pkg: MdePkg Mod: BasePrintLib Path: MdePkg\Library\BasePrintLib\BasePrintLib.msa-->\r
+        <Instance ModuleGuid="a86fbfca-0183-4eeb-aa8a-762e3b7da1f3" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>\r
       </Libraries>\r
       <PcdBuildDefinition>\r
         <PcdData ItemType="FIXED_AT_BUILD">\r
index 40a44cbb2e40b499a75440f92a909ab711607dc1..2b38f7546fbea2e66455b34ebd0e6f2bd3e14bb8 100644 (file)
@@ -6,8 +6,8 @@
     <GuidValue>A3f436EA-A127-4EF8-957C-8048606FF670</GuidValue>\r
     <Version>1.0</Version>\r
     <Abstract>Component description file for BC module.</Abstract>\r
-    <Description>This module provides basic network capability.</Description>\r
-    <Copyright>Copyright (c) 2006, Intel Corporation</Copyright>\r
+    <Description>This module provides PXE basic network capability and start EfiPxeBaseCodeProtocol.</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>BC</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
@@ -37,8 +38,9 @@
     <LibraryClass Usage="ALWAYS_CONSUMED">\r
       <Keyword>BaseLib</Keyword>\r
     </LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">\r
+    <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="a86fbfca-0183-4eeb-aa8a-762e3b7da1f3">\r
       <Keyword>PrintLib</Keyword>\r
+      <HelpText>Recommended libary Instance is BasePrintLib instance in MdePkg.</HelpText>\r
     </LibraryClass>\r
     <LibraryClass Usage="ALWAYS_CONSUMED">\r
       <Keyword>BaseMemoryLib</Keyword>\r
     <Filename>Bc.h</Filename>\r
     <Filename>ip.h</Filename>\r
     <Filename>ComponentName.c</Filename>\r
-    <Filename>Print.c</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="TO_START">\r
-      <ProtocolCName>gEfiBisProtocolGuid</ProtocolCName>\r
+    <Protocol Usage="BY_START">\r
+      <ProtocolCName>gEfiPxeBaseCodeProtocolGuid</ProtocolCName>\r
     </Protocol>\r
     <Protocol Usage="BY_START">\r
       <ProtocolCName>gEfiLoadFileProtocolGuid</ProtocolCName>\r
     </Protocol>\r
-    <Protocol Usage="SOMETIMES_PRODUCED">\r
-      <ProtocolCName>gEfiPxeBaseCodeCallbackProtocolGuid</ProtocolCName>\r
-    </Protocol>\r
+    <Protocol Usage="TO_START">\r
+      <ProtocolCName>gEfiBisProtocolGuid</ProtocolCName>\r
+    </Protocol>    \r
     <Protocol Usage="TO_START">\r
       <ProtocolCName>gEfiSimpleNetworkProtocolGuid</ProtocolCName>\r
     </Protocol>\r
     <Protocol Usage="TO_START">\r
-      <ProtocolCName>gEfiDevicePathProtocolGuid</ProtocolCName>\r
-    </Protocol>\r
-    <Protocol Usage="SOMETIMES_CONSUMED">\r
       <ProtocolCName>gEfiNetworkInterfaceIdentifierProtocolGuid</ProtocolCName>\r
     </Protocol>\r
-    <Protocol Usage="SOMETIMES_CONSUMED">\r
+    <Protocol Usage="TO_START">\r
       <ProtocolCName>gEfiNetworkInterfaceIdentifierProtocolGuid_31</ProtocolCName>\r
     </Protocol>\r
-    <Protocol Usage="BY_START">\r
-      <ProtocolCName>gEfiPxeBaseCodeProtocolGuid</ProtocolCName>\r
+    <Protocol Usage="ALWAYS_CONSUMED">\r
+      <ProtocolCName>gEfiDevicePathProtocolGuid</ProtocolCName>\r
+    </Protocol>\r
+    <Protocol Usage="SOMETIMES_PRODUCED">\r
+      <ProtocolCName>gEfiPxeBaseCodeCallbackProtocolGuid</ProtocolCName>\r
     </Protocol>\r
   </Protocols>\r
   <SystemTables>\r
       <SystemTableCName>gEfiSmbiosTableGuid</SystemTableCName>\r
     </SystemTableCNames>\r
   </SystemTables>\r
-  <Guids>\r
-    <GuidCNames Usage="ALWAYS_CONSUMED">\r
-      <GuidCName>gEfiSmbiosTableGuid</GuidCName>\r
-    </GuidCNames>\r
-  </Guids>\r
   <Externs>\r
     <Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>\r
     <Specification>EDK_RELEASE_VERSION 0x00020000</Specification>\r
index ba32dee45bfc640e1c2cae8e9d317a5166df55b9..2689e2a9ad1db4350978a5500583fb5ed85a6b1b 100644 (file)
@@ -411,14 +411,6 @@ PxeBcLibGetSmbiosSystemGuidAndSerialNumber (
   )\r
 ;\r
 \r
-UINTN\r
-EFIAPI\r
-AsciiPrint (\r
-  IN CONST CHAR8 *Format,\r
-  ...\r
-  )\r
-;\r
-\r
 //\r
 // Define SMBIOS tables.\r
 //\r
index 4444b20d0012456990347b0d879c39d154b33e8d..ec2099eb7a7bfd8bc9c08a16f982296021d27049 100644 (file)
@@ -822,7 +822,7 @@ Returns:
     return NULL;\r
   }\r
 \r
-  if (BisHandleCount != sizeof BisHandleBuffer) {\r
+  if (BisHandleCount != sizeof (BisHandleBuffer)) {\r
     //\r
     // This really should never happen, but I am paranoid.\r
     //\r
@@ -1186,7 +1186,6 @@ BcStart (
 {\r
   EFI_SIMPLE_NETWORK_PROTOCOL *SnpPtr;\r
   EFI_SIMPLE_NETWORK_MODE     *SnpModePtr;\r
-  EFI_STATUS                  Status;\r
   EFI_STATUS                  StatCode;\r
   PXE_BASECODE_DEVICE         *Private;\r
 \r
@@ -1364,54 +1363,34 @@ BcStart (
   //\r
   // Allocate Tx/Rx buffers\r
   //\r
-  Status = gBS->AllocatePool (\r
-                  EfiBootServicesData,\r
-                  BUFFER_ALLOCATE_SIZE,\r
-                  (VOID **) &Private->TransmitBufferPtr\r
-                  );\r
-\r
-  if (!EFI_ERROR (Status)) {\r
-    ZeroMem (Private->TransmitBufferPtr, BUFFER_ALLOCATE_SIZE);\r
-  } else {\r
+  Private->TransmitBufferPtr = AllocateZeroPool (BUFFER_ALLOCATE_SIZE);\r
+  if (Private->TransmitBufferPtr == NULL) {\r
     DEBUG ((EFI_D_NET, "\nBcStart()  Could not alloc TxBuf.\n"));\r
     EfiReleaseLock (&Private->Lock);\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
 \r
-  Status = gBS->AllocatePool (\r
-                  EfiBootServicesData,\r
-                  BUFFER_ALLOCATE_SIZE,\r
-                  (VOID **) &Private->ReceiveBufferPtr\r
-                  );\r
-\r
-  if (!EFI_ERROR (Status)) {\r
-    ZeroMem (Private->ReceiveBufferPtr, BUFFER_ALLOCATE_SIZE);\r
-  } else {\r
+  Private->ReceiveBufferPtr = AllocateZeroPool (BUFFER_ALLOCATE_SIZE);\r
+  if (Private->ReceiveBufferPtr == NULL) {\r
     DEBUG ((EFI_D_NET, "\nBcStart()  Could not alloc RxBuf.\n"));\r
-    gBS->FreePool (Private->TransmitBufferPtr);\r
+    FreePool (Private->TransmitBufferPtr);\r
     EfiReleaseLock (&Private->Lock);\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
 \r
-  Status = gBS->AllocatePool (\r
-                  EfiBootServicesData,\r
-                  256,\r
-                  (VOID **) &Private->TftpErrorBuffer\r
-                  );\r
-\r
-  if (EFI_ERROR (Status)) {\r
-    gBS->FreePool (Private->ReceiveBufferPtr);\r
-    gBS->FreePool (Private->TransmitBufferPtr);\r
+  Private->TftpErrorBuffer = AllocatePool (256);\r
+  if (Private->TftpErrorBuffer == NULL) {\r
+    FreePool (Private->ReceiveBufferPtr);\r
+    FreePool (Private->TransmitBufferPtr);\r
     EfiReleaseLock (&Private->Lock);\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
 \r
-  Status = gBS->AllocatePool (EfiBootServicesData, 256, (VOID **) &Private->TftpAckBuffer);\r
-\r
-  if (EFI_ERROR (Status)) {\r
-    gBS->FreePool (Private->TftpErrorBuffer);\r
-    gBS->FreePool (Private->ReceiveBufferPtr);\r
-    gBS->FreePool (Private->TransmitBufferPtr);\r
+  Private->TftpAckBuffer = AllocatePool (256);\r
+  if (Private->TftpAckBuffer == NULL) {\r
+    FreePool (Private->TftpErrorBuffer);\r
+    FreePool (Private->ReceiveBufferPtr);\r
+    FreePool (Private->TransmitBufferPtr);\r
     EfiReleaseLock (&Private->Lock);\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
@@ -1546,27 +1525,27 @@ BcStop (
   }\r
 \r
   if (Private->TransmitBufferPtr != NULL) {\r
-    gBS->FreePool (Private->TransmitBufferPtr);\r
+    FreePool (Private->TransmitBufferPtr);\r
     Private->TransmitBufferPtr = NULL;\r
   }\r
 \r
   if (Private->ReceiveBufferPtr != NULL) {\r
-    gBS->FreePool (Private->ReceiveBufferPtr);\r
+    FreePool (Private->ReceiveBufferPtr);\r
     Private->ReceiveBufferPtr = NULL;\r
   }\r
 \r
   if (Private->ArpBuffer != NULL) {\r
-    gBS->FreePool (Private->ArpBuffer);\r
+    FreePool (Private->ArpBuffer);\r
     Private->ArpBuffer = NULL;\r
   }\r
 \r
   if (Private->TftpErrorBuffer != NULL) {\r
-    gBS->FreePool (Private->TftpErrorBuffer);\r
+    FreePool (Private->TftpErrorBuffer);\r
     Private->TftpErrorBuffer = NULL;\r
   }\r
 \r
   if (Private->TftpAckBuffer != NULL) {\r
-    gBS->FreePool (Private->TftpAckBuffer);\r
+    FreePool (Private->TftpAckBuffer);\r
     Private->TftpAckBuffer = NULL;\r
   }\r
 \r
@@ -2118,46 +2097,26 @@ PxeBcDriverStart (
   //\r
   // Allocate structures needed by BaseCode and LoadFile protocols.\r
   //\r
-  Status = gBS->AllocatePool (\r
-                  EfiBootServicesData,\r
-                  sizeof (PXE_BASECODE_DEVICE),\r
-                  (VOID **) &Private\r
-                  );\r
+  Private = AllocateZeroPool (sizeof (PXE_BASECODE_DEVICE));\r
 \r
-  if (!EFI_ERROR (Status)) {\r
-    ZeroMem (Private, sizeof (PXE_BASECODE_DEVICE));\r
-  } else {\r
+  if (Private == NULL ) {\r
     DEBUG ((EFI_D_NET, "\nBcNotifySnp()  Could not alloc PXE_BASECODE_DEVICE structure.\n"));\r
-    return Status;\r
+    return EFI_OUT_OF_RESOURCES;\r
   }\r
 \r
-  Status = gBS->AllocatePool (\r
-                  EfiBootServicesData,\r
-                  sizeof (LOADFILE_DEVICE),\r
-                  (VOID **) &pLF\r
-                  );\r
-\r
-  if (!EFI_ERROR (Status)) {\r
-    ZeroMem (pLF, sizeof (LOADFILE_DEVICE));\r
-  } else {\r
+  pLF = AllocateZeroPool (sizeof (LOADFILE_DEVICE));\r
+  if (pLF == NULL) {\r
     DEBUG ((EFI_D_NET, "\nBcNotifySnp()  Could not alloc LOADFILE_DEVICE structure.\n"));\r
-    gBS->FreePool (Private);\r
-    return Status;\r
+    FreePool (Private);\r
+    return EFI_OUT_OF_RESOURCES;\r
   }\r
 \r
-  Status = gBS->AllocatePool (\r
-                  EfiBootServicesData,\r
-                  sizeof (EFI_PXE_BASE_CODE_MODE),\r
-                  (VOID **) &Private->EfiBc.Mode\r
-                  );\r
-\r
-  if (!EFI_ERROR (Status)) {\r
-    ZeroMem (Private->EfiBc.Mode, sizeof (EFI_PXE_BASE_CODE_MODE));\r
-  } else {\r
+  Private->EfiBc.Mode = AllocateZeroPool (sizeof (EFI_PXE_BASE_CODE_MODE));\r
+  if (Private->EfiBc.Mode == NULL) {\r
     DEBUG ((EFI_D_NET, "\nBcNotifySnp()  Could not alloc Mode structure.\n"));\r
-    gBS->FreePool (Private);\r
-    gBS->FreePool (pLF);\r
-    return Status;\r
+    FreePool (Private);\r
+    FreePool (pLF);\r
+    return EFI_OUT_OF_RESOURCES;\r
   }\r
   //\r
   // Lock access, just in case\r
@@ -2298,9 +2257,9 @@ PxeBcDriverStart (
   return Status;\r
 \r
 PxeBcError: ;\r
-  gBS->FreePool (Private->EfiBc.Mode);\r
-  gBS->FreePool (Private);\r
-  gBS->FreePool (pLF);\r
+  FreePool (Private->EfiBc.Mode);\r
+  FreePool (Private);\r
+  FreePool (pLF);\r
   return Status;\r
 }\r
 \r
@@ -2370,9 +2329,9 @@ PxeBcDriverStop (
                     Controller\r
                     );\r
 \r
-    gBS->FreePool (LoadDevice->Private->EfiBc.Mode);\r
-    gBS->FreePool (LoadDevice->Private);\r
-    gBS->FreePool (LoadDevice);\r
+    FreePool (LoadDevice->Private->EfiBc.Mode);\r
+    FreePool (LoadDevice->Private);\r
+    FreePool (LoadDevice);\r
   }\r
 \r
   return Status;\r
index 15a056a95e2b43d44675d0d6fd146f9b320089d7..b7edbe69a87a6fdcd6f5f0c03273958d72132e04 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2007, Intel Corporation                                                         \r
 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
@@ -340,7 +340,6 @@ Returns:
   EFI_PXE_BASE_CODE_MODE  *PxeBcMode;\r
   EFI_SIMPLE_NETWORK_MODE *SnpMode;\r
   ARP_PACKET              *ArpPacket;\r
-  EFI_STATUS              Status;\r
   UINTN                   HardwareAddrLength;\r
   UINT8                   *SrcProtocolAddrPtr;\r
   UINT8                   *DestHardwareAddrptr;\r
@@ -357,14 +356,9 @@ Returns:
   // Allocate ARP buffer\r
   //\r
   if (Private->ArpBuffer == NULL) {\r
-    Status = gBS->AllocatePool (\r
-                    EfiBootServicesData,\r
-                    SnpMode->MediaHeaderSize + sizeof (ARP_PACKET),\r
-                    (VOID **) &Private->ArpBuffer\r
-                    );\r
-\r
-    if (EFI_ERROR (Status)) {\r
-      return Status;\r
+    Private->ArpBuffer = AllocatePool (SnpMode->MediaHeaderSize + sizeof (ARP_PACKET));\r
+    if (Private->ArpBuffer == NULL) {\r
+      return EFI_OUT_OF_RESOURCES;\r
     }\r
   }\r
 \r
index 2e22fc5a350c7bf57e3b86e6cf1fc6acf786698e..56893bce2fbe4edf722a4e0ba52f220cee0d5bc8 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation\r
+Copyright (c) 2006 - 2007, Intel Corporation\r
 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
@@ -2223,12 +2223,12 @@ FreeMem (
   )\r
 {\r
   if (Private->TransmitBuffer != NULL) {\r
-    gBS->FreePool (Private->TransmitBuffer);\r
+    FreePool (Private->TransmitBuffer);\r
     Private->TransmitBuffer = NULL;\r
   }\r
 \r
   if (Private->ReceiveBuffers != NULL) {\r
-    gBS->FreePool (Private->ReceiveBuffers);\r
+    FreePool (Private->ReceiveBuffers);\r
     Private->ReceiveBuffers = NULL;\r
   }\r
 }\r
@@ -2240,48 +2240,29 @@ GetMem (
   PXE_BASECODE_DEVICE *Private\r
   )\r
 {\r
-  EFI_STATUS  Status;\r
 \r
   if (Private->DhcpPacketBuffer == NULL) {\r
-    Status = gBS->AllocatePool (\r
-                    EfiBootServicesData,\r
-                    sizeof (DHCP_RECEIVE_BUFFER) * (PXE_BIS_INDEX + 1),\r
-                    &Private->DhcpPacketBuffer\r
-                    );\r
-\r
-    if (EFI_ERROR (Status) || Private->DhcpPacketBuffer == NULL) {\r
-      Private->DhcpPacketBuffer = NULL;\r
+    Private->DhcpPacketBuffer = AllocatePool (sizeof (DHCP_RECEIVE_BUFFER) * (PXE_BIS_INDEX + 1));\r
+    if (Private->DhcpPacketBuffer == NULL) {\r
       FreeMem (Private);\r
       return FALSE;\r
     }\r
   }\r
 \r
-  Status = gBS->AllocatePool (\r
-                  EfiBootServicesData,\r
-                  sizeof (EFI_PXE_BASE_CODE_PACKET),\r
-                  &Private->TransmitBuffer\r
-                  );\r
-\r
-  if (EFI_ERROR (Status) || Private->TransmitBuffer == NULL) {\r
-    gBS->FreePool (Private->DhcpPacketBuffer);\r
+  Private->TransmitBuffer = AllocatePool (sizeof (EFI_PXE_BASE_CODE_PACKET));\r
+  if (Private->TransmitBuffer == NULL) {\r
+    FreePool (Private->DhcpPacketBuffer);\r
     Private->DhcpPacketBuffer = NULL;\r
-    Private->TransmitBuffer   = NULL;\r
     FreeMem (Private);\r
     return FALSE;\r
   }\r
 \r
-  Status = gBS->AllocatePool (\r
-                  EfiBootServicesData,\r
-                  sizeof (DHCP_RECEIVE_BUFFER) * (MAX_OFFERS),\r
-                  &Private->ReceiveBuffers\r
-                  );\r
-\r
-  if (EFI_ERROR (Status) || Private->ReceiveBuffers == NULL) {\r
-    gBS->FreePool (Private->TransmitBuffer);\r
-    gBS->FreePool (Private->DhcpPacketBuffer);\r
+  Private->ReceiveBuffers = AllocatePool (sizeof (DHCP_RECEIVE_BUFFER) * (MAX_OFFERS));\r
+  if (Private->ReceiveBuffers == NULL) {\r
+    FreePool (Private->TransmitBuffer);\r
+    FreePool (Private->DhcpPacketBuffer);\r
     Private->DhcpPacketBuffer = NULL;\r
     Private->TransmitBuffer   = NULL;\r
-    Private->ReceiveBuffers   = NULL;\r
     FreeMem (Private);\r
     return FALSE;\r
   }\r
@@ -2920,7 +2901,6 @@ Returns:
   PXE_SERVER_LISTS                DefaultSrvList;\r
   PXE_SERVER_LISTS                *ServerListPtr;\r
   PXE_SERVER_LISTS                *McastServerListPtr;\r
-  EFI_STATUS                      Status;\r
   UNION_PTR                       LocalPtr;\r
   UINTN                           Index;\r
   UINTN                           Index2;\r
@@ -3120,14 +3100,11 @@ Returns:
     }\r
 \r
     if (ServerListPtr == NULL) {\r
-      Status = gBS->AllocatePool (\r
-                      EfiBootServicesData,\r
-                      sizeof (PXEV4_SERVER_LIST) + (Index2 - 1) * sizeof (EFI_IPv4_ADDRESS),\r
-                      (VOID **) &ServerListPtr\r
+      ServerListPtr = AllocatePool (\r
+                        sizeof (PXEV4_SERVER_LIST) + (Index2 - 1) * sizeof (EFI_IPv4_ADDRESS)\r
                       );\r
 \r
-      if (EFI_ERROR (Status) || ServerListPtr == NULL) {\r
-        ServerListPtr = NULL;\r
+      if (ServerListPtr == NULL) {\r
         EfiReleaseLock (&Private->Lock);\r
         return EFI_OUT_OF_RESOURCES;\r
       }\r
@@ -3173,7 +3150,7 @@ Returns:
               );\r
 \r
   if (AcquiredSrvList) {\r
-    gBS->FreePool (ServerListPtr);\r
+    FreePool (ServerListPtr);\r
   }\r
 \r
   FreeMem (Private);\r
@@ -3219,7 +3196,6 @@ Returns:
 --*/\r
 {\r
   EFI_PXE_BASE_CODE_MODE  *PxebcMode;\r
-  EFI_STATUS              Status;\r
   PXE_BASECODE_DEVICE     *Private;\r
 \r
   //\r
@@ -3249,14 +3225,8 @@ Returns:
   PxebcMode = Private->EfiBc.Mode;\r
 \r
   if (Private->DhcpPacketBuffer == NULL) {\r
-    Status = gBS->AllocatePool (\r
-                    EfiBootServicesData,\r
-                    sizeof (DHCP_RECEIVE_BUFFER) * (PXE_BIS_INDEX + 1),\r
-                    &Private->DhcpPacketBuffer\r
-                    );\r
-\r
-    if (EFI_ERROR (Status) || Private->DhcpPacketBuffer == NULL) {\r
-      Private->DhcpPacketBuffer = NULL;\r
+    Private->DhcpPacketBuffer = AllocatePool (sizeof (DHCP_RECEIVE_BUFFER) * (PXE_BIS_INDEX + 1));\r
+    if (Private->DhcpPacketBuffer == NULL) {\r
       EfiReleaseLock (&Private->Lock);\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r
index a93795846831b72f5e5e85e1facefee4370d567d..941076aed027eadbed4e60743f56e8bae7ca8903 100644 (file)
@@ -1963,7 +1963,6 @@ Returns:
 {\r
   EFI_PXE_BASE_CODE_IP_FILTER Filter;\r
   EFI_STATUS                  StatCode;\r
-  EFI_STATUS                  Status;\r
   UINT64                      BufferSizeLocal;\r
   UINTN                       PacketSize;\r
   UINT8                       *BufferPtrLocal;\r
@@ -2082,13 +2081,8 @@ Returns:
   }\r
 \r
   if (DontUseBuffer) {\r
-    Status = gBS->AllocatePool (\r
-                    EfiBootServicesData,\r
-                    BUFFER_ALLOCATE_SIZE,\r
-                    (VOID **) &BufferPtrLocal\r
-                    );\r
-\r
-    if (EFI_ERROR (Status) || BufferPtrLocal == NULL) {\r
+    BufferPtrLocal = AllocatePool (BUFFER_ALLOCATE_SIZE);\r
+    if (BufferPtrLocal == NULL) {\r
       DEBUG ((EFI_D_NET, "\nPxeBcMtftp()  Exit #4"));\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r
@@ -2267,7 +2261,7 @@ Returns:
   }\r
 \r
   if (DontUseBuffer) {\r
-    gBS->FreePool (BufferPtrLocal);\r
+    FreePool (BufferPtrLocal);\r
   }\r
 \r
   if (StatCode != EFI_SUCCESS) {\r
index 6659bc4022cb08d880179d6191e125ea0e88a464..3dceefb945cd275fd688743365c045cb7ca349a3 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2007, Intel Corporation                                                         \r
 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
@@ -1168,14 +1168,9 @@ Returns:
     //\r
     // Allocate credential file buffer.\r
     //\r
-    Status = gBS->AllocatePool (\r
-                    EfiBootServicesData,\r
-                    (UINTN) CredentialLen,\r
-                    &CredentialBuffer\r
-                    );\r
-\r
-    if (EFI_ERROR (Status)) {\r
-      return Status;\r
+    CredentialBuffer = AllocatePool ((UINTN) CredentialLen);\r
+    if (CredentialBuffer == NULL) {\r
+      return EFI_OUT_OF_RESOURCES;\r
     }\r
     //\r
     // Download credential file.\r
@@ -1196,7 +1191,7 @@ Returns:
                               );\r
 \r
     if (EFI_ERROR (Status)) {\r
-      gBS->FreePool (CredentialBuffer);\r
+      FreePool (CredentialBuffer);\r
       return Status;\r
     }\r
     //\r
@@ -1211,7 +1206,7 @@ Returns:
       Status = EFI_PROTOCOL_ERROR;\r
     }\r
 \r
-    gBS->FreePool (CredentialBuffer);\r
+    FreePool (CredentialBuffer);\r
   }\r
 \r
   return Status;\r
index 136738498e37a2f7121b3c11cef8599b129c96b5..bc8d22b67143b7b601383d0ad0ba41ff24ca8be1 100644 (file)
@@ -7,7 +7,7 @@
     <Version>1.0</Version>\r
     <Abstract>Component description file for Dhcp4 module.</Abstract>\r
     <Description>This module can produce PxeDhcp4 protocol on ControllerHandle.</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>Dhcp4</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
     <Package PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>\r
   </PackageDependencies>\r
   <Protocols>\r
-    <Protocol Usage="ALWAYS_CONSUMED">\r
-      <ProtocolCName>gEfiPxeDhcp4CallbackProtocolGuid</ProtocolCName>\r
-    </Protocol>\r
     <Protocol Usage="BY_START">\r
       <ProtocolCName>gEfiPxeDhcp4ProtocolGuid</ProtocolCName>\r
     </Protocol>\r
-    <Protocol Usage="ALWAYS_CONSUMED">\r
-      <ProtocolCName>gEfiSimpleNetworkProtocolGuid</ProtocolCName>\r
-    </Protocol>\r
     <Protocol Usage="TO_START">\r
       <ProtocolCName>gEfiPxeBaseCodeProtocolGuid</ProtocolCName>\r
     </Protocol>\r
+    <Protocol Usage="TO_START">\r
+      <ProtocolCName>gEfiSimpleNetworkProtocolGuid</ProtocolCName>\r
+    </Protocol>\r
+    <Protocol Usage="SOMETIMES_CONSUMED">\r
+      <ProtocolCName>gEfiPxeDhcp4CallbackProtocolGuid</ProtocolCName>\r
+    </Protocol>\r
   </Protocols>\r
   <Externs>\r
     <Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>\r
index f0e87dba353af3842a3d934f51cb1a020368f1f4..565a507cac68470b544b0f03312231ad89e9b0c8 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2007, Intel Corporation                                                         \r
 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
@@ -155,19 +155,11 @@ PxeDhcp4DriverBindingStart (
   //\r
   // Initialize the PXE DHCP device instance.\r
   //\r
-  Status = gBS->AllocatePool (\r
-                  EfiBootServicesData,\r
-                  sizeof (PXE_DHCP4_PRIVATE_DATA),\r
-                  (VOID **) &Private\r
-                  );\r
-\r
-  if (EFI_ERROR (Status)) {\r
+  Private = AllocateZeroPool (sizeof (PXE_DHCP4_PRIVATE_DATA));\r
+  if (Private == NULL) {\r
+    Status = EFI_OUT_OF_RESOURCES;\r
     goto error_exit;\r
   }\r
-  //\r
-  //\r
-  //\r
-  ZeroMem (Private, sizeof (PXE_DHCP4_PRIVATE_DATA));\r
 \r
   Private->Signature          = PXE_DHCP4_PRIVATE_DATA_SIGNATURE;\r
   Private->PxeBc              = PxeBc;\r
@@ -263,7 +255,7 @@ PxeDhcp4DriverBindingStop (
   // Release allocated resources\r
   //\r
   if (Private->PxeDhcp4.Data) {\r
-    gBS->FreePool (Private->PxeDhcp4.Data);\r
+    FreePool (Private->PxeDhcp4.Data);\r
     Private->PxeDhcp4.Data = NULL;\r
   }\r
   //\r
@@ -294,7 +286,7 @@ PxeDhcp4DriverBindingStop (
   //\r
   // Release our private data\r
   //\r
-  gBS->FreePool (Private);\r
+  FreePool (Private);\r
 \r
   return Status;\r
 }\r
index 1b500c57b3dcdd46c477fc248b74a95ee5462ec7..a94f2537e7d201be30995666ff763600da0a77fd 100644 (file)
@@ -107,13 +107,8 @@ offer_verify (
   //\r
   // Good DHCP (or BOOTP) packet.  Cache it!\r
   //\r
-  EfiStatus = gBS->AllocatePool (\r
-                    EfiBootServicesData,\r
-                    (Private->offers + 1) * sizeof (DHCP4_PACKET),\r
-                    (VOID **) &tmp\r
-                    );\r
-\r
-  if (EFI_ERROR (EfiStatus)) {\r
+  tmp = AllocatePool ((Private->offers + 1) * sizeof (DHCP4_PACKET));\r
+  if (tmp == NULL) {\r
     return -2;\r
   }\r
 \r
@@ -126,7 +121,7 @@ offer_verify (
       Private->offers * sizeof (DHCP4_PACKET)\r
       );\r
 \r
-    gBS->FreePool (Private->offer_list);\r
+    FreePool (Private->offer_list);\r
   }\r
 \r
   CopyMem (&tmp[Private->offers++], rx_pkt, sizeof (DHCP4_PACKET));\r
@@ -388,7 +383,7 @@ PxeDhcp4Init (
 \r
   if (EFI_ERROR (EfiStatus)) {\r
     if (Private->offer_list) {\r
-      gBS->FreePool (Private->offer_list);\r
+      FreePool (Private->offer_list);\r
     }\r
 \r
     Private->offers     = 0;\r
index 6086e55eba0d38ac2f0cc632be6fc98e580a822d..4bbc8a832eeeb458c3fdd0d806c84276e747d98b 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2007, Intel Corporation                                                         \r
 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
@@ -65,7 +65,7 @@ PxeDhcp4Release (
   // packet, just release storage and return.\r
   //\r
   if (This->Data->IsBootp || !This->Data->IsAck) {\r
-    gBS->FreePool (This->Data);\r
+    FreePool (This->Data);\r
     This->Data = NULL;\r
 \r
     if (Private->StopPxeBc) {\r
@@ -96,7 +96,7 @@ PxeDhcp4Release (
                 );\r
 \r
   if (EFI_ERROR (efi_status)) {\r
-    gBS->FreePool (This->Data);\r
+    FreePool (This->Data);\r
     This->Data = NULL;\r
 \r
     if (Private->StopPxeBc) {\r
@@ -107,7 +107,7 @@ PxeDhcp4Release (
   }\r
 \r
   if (op->len != 4) {\r
-    gBS->FreePool (This->Data);\r
+    FreePool (This->Data);\r
     This->Data = NULL;\r
 \r
     if (Private->StopPxeBc) {\r
@@ -139,7 +139,7 @@ PxeDhcp4Release (
                 );\r
 \r
   if (EFI_ERROR (efi_status)) {\r
-    gBS->FreePool (This->Data);\r
+    FreePool (This->Data);\r
     This->Data = NULL;\r
 \r
     if (Private->StopPxeBc) {\r
@@ -150,7 +150,7 @@ PxeDhcp4Release (
   }\r
 \r
   if (op->len != 4) {\r
-    gBS->FreePool (This->Data);\r
+    FreePool (This->Data);\r
     This->Data = NULL;\r
 \r
     if (Private->StopPxeBc) {\r
@@ -181,7 +181,7 @@ PxeDhcp4Release (
   efi_status = start_udp (Private, &client_ip, &subnet_mask);\r
 \r
   if (EFI_ERROR (efi_status)) {\r
-    gBS->FreePool (This->Data);\r
+    FreePool (This->Data);\r
     This->Data = NULL;\r
 \r
     if (Private->StopPxeBc) {\r
@@ -233,7 +233,7 @@ PxeDhcp4Release (
   //\r
   stop_udp (Private);\r
 \r
-  gBS->FreePool (This->Data);\r
+  FreePool (This->Data);\r
   This->Data = NULL;\r
 \r
   if (Private->StopPxeBc) {\r
index 8e015b2a3d987be8b0f86c4eb72211f389630513..4f7ce44a01a78d4d4c523b25a5487923a81fada1 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2007, Intel Corporation                                                         \r
 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
@@ -164,7 +164,7 @@ PxeDhcp4Run (
     // No DHCP Acks.  Release DHCP Offer list storage.\r
     //\r
     if (offer_list != NULL) {\r
-      gBS->FreePool (offer_list);\r
+      FreePool (offer_list);\r
       offer_list = NULL;\r
     }\r
     //\r
index 09ba041ea63adec5bd0e07ee506d0ce0d77e05d9..88a66d5a53a55499e6aa2afcaff8e278bf8760a9 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2007, Intel Corporation                                                         \r
 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
@@ -117,17 +117,7 @@ PxeDhcp4Setup (
   // Allocate data structure.  Return error\r
   // if there is not enough available memory.\r
   //\r
-  EfiStatus = gBS->AllocatePool (\r
-                    EfiBootServicesData,\r
-                    sizeof (EFI_PXE_DHCP4_DATA),\r
-                    (VOID **) &This->Data\r
-                    );\r
-\r
-  if (EFI_ERROR (EfiStatus)) {\r
-    This->Data = NULL;\r
-    return EfiStatus;\r
-  }\r
-\r
+  This->Data = AllocatePool (sizeof (EFI_PXE_DHCP4_DATA));\r
   if (This->Data == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
@@ -139,7 +129,7 @@ PxeDhcp4Setup (
 \r
   if (EFI_ERROR (EfiStatus)) {\r
     if (EfiStatus != EFI_ALREADY_STARTED) {\r
-      gBS->FreePool (This->Data);\r
+      FreePool (This->Data);\r
       This->Data = NULL;\r
       Private->PxeBc->Stop (Private->PxeBc);\r
       return EfiStatus;\r
index 24c05a4f11c8fbf7569c91442b2955669ea0d289..c3ec2043cc57c0695e5a5ed3972a9a04d2b75641 100644 (file)
@@ -7,7 +7,7 @@
     <Version>1.0</Version>\r
     <Abstract>Component description file for SNP module.</Abstract>\r
     <Description>This module attachs the SNP interface to UNDI layer that it finds on the given handle!</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>SNP</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
@@ -69,7 +70,6 @@
   </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="BY_START">\r
     <Protocol Usage="TO_START">\r
       <ProtocolCName>gEfiDevicePathProtocolGuid</ProtocolCName>\r
     </Protocol>\r
-    <Protocol Usage="SOMETIMES_CONSUMED">\r
+    <Protocol Usage="TO_START">\r
       <ProtocolCName>gEfiNetworkInterfaceIdentifierProtocolGuid</ProtocolCName>\r
     </Protocol>\r
     <Protocol Usage="TO_START">\r
       <ProtocolCName>gEfiNetworkInterfaceIdentifierProtocolGuid_31</ProtocolCName>\r
+      <HelpText>This module first look for 3.1 undi, if it is not there then look for 3.0 undi.</HelpText>\r
     </Protocol>\r
   </Protocols>\r
   <Externs>\r
index 4b6cda9b1e5c43ba896521f84f4a75f9a33f11a2..a32812a01a6b0c5a318a5e3aa4c192241a5f5c8c 100644 (file)
@@ -1,5 +1,5 @@
 /*++\r
-Copyright (c) 2006, Intel Corporation\r
+Copyright (c) 2006 - 2007, Intel Corporation\r
 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
@@ -1081,14 +1081,9 @@ Returns:
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  Status = gBS->AllocatePool (\r
-                  EfiBootServicesData,\r
-                  sizeof (struct s_v2p),\r
-                  (VOID **) v2p\r
-                  );\r
-\r
-  if (Status != EFI_SUCCESS) {\r
-    return Status;\r
+  *v2p = AllocatePool (sizeof (struct s_v2p));\r
+  if (*v2p != NULL) {\r
+    return EFI_OUT_OF_RESOURCES;\r
   }\r
 \r
   Status = mPciIoFncs->Map (\r
@@ -1100,7 +1095,7 @@ Returns:
                         &(*v2p)->unmap\r
                         );\r
   if (Status != EFI_SUCCESS) {\r
-    gBS->FreePool (*v2p);\r
+    FreePool (*v2p);\r
     return Status;\r
   }\r
   (*v2p)->vaddr = vaddr;\r
@@ -1189,7 +1184,7 @@ Returns:
 \r
     Status  = mPciIoFncs->Unmap (mPciIoFncs, v->unmap);\r
 \r
-    gBS->FreePool (v);\r
+    FreePool (v);\r
 \r
     if (Status) {\r
       DEBUG ((EFI_D_ERROR, "Unmap failed with status = %x\n", Status));\r
@@ -1201,7 +1196,7 @@ Returns:
     if ((t = v->next)->vaddr == vaddr) {\r
       v->next = t->next;\r
       Status  = mPciIoFncs->Unmap (mPciIoFncs, t->unmap);\r
-      gBS->FreePool (t);\r
+      FreePool (t);\r
 \r
       if (Status) {\r
         DEBUG ((EFI_D_ERROR, "Unmap failed with status = %x\n", Status));\r
index d65291b0917778dba39d3fbce8972ee4dddf5516..860153705b5c115e4c7372c3ae69930a9e350e6c 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2007, Intel Corporation                                                         \r
 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
@@ -19,7 +19,6 @@ Abstract:
   \r
 --*/  \r
 \r
-#include <AutoGen.h>\r
 #include <DxeDepex.h>\r
 \r
 DEPENDENCY_START\r
index 8a514965361f1afc393acb3cfaf4aa56f54b3145..d920f68e92ff441e4b9f0b3bd3e8748886dad8f3 100644 (file)
@@ -7,7 +7,7 @@
     <Version>1.0</Version>\r
     <Abstract>Component description file for PCD service DXE driver.</Abstract>\r
     <Description>This DXE driver implement and produce the PCD protocol.</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
     <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
-    </LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">\r
-      <Keyword>HiiLib</Keyword>\r
+      <HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>\r
     </LibraryClass>\r
     <LibraryClass Usage="ALWAYS_CONSUMED">\r
       <Keyword>UefiLib</Keyword>\r
     <Protocol Usage="ALWAYS_PRODUCED">\r
       <ProtocolCName>gPcdProtocolGuid</ProtocolCName>\r
     </Protocol>\r
-    <Protocol Usage="ALWAYS_CONSUMED">\r
-      <ProtocolCName>gEfiVariableArchProtocolGuid</ProtocolCName>\r
-    </Protocol>\r
   </Protocols>\r
-  <Guids>\r
-    <GuidCNames Usage="ALWAYS_CONSUMED">\r
-      <GuidCName>gPcdDataBaseHobGuid</GuidCName>\r
-    </GuidCNames>\r
-  </Guids>\r
+  <Hobs>\r
+    <HobTypes Usage="ALWAYS_CONSUMED" HobGuidCName="gPcdDataBaseHobGuid">\r
+      <HobType>GUID_EXTENSION</HobType>\r
+    </HobTypes>\r
+  </Hobs>\r
   <Externs>\r
     <PcdIsDriver>DXE_PCD_DRIVER</PcdIsDriver>\r
     <Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>\r
index 62daaf20781c52880d4eb8f29f7c347b769e963a..155a57644357940e336b7521874f27b84dee6091 100644 (file)
@@ -6,8 +6,8 @@
     <GuidValue>9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50</GuidValue>\r
     <Version>1.0</Version>\r
     <Abstract>Component description file for Pcd Database PEIM module</Abstract>\r
-    <Description>This DXE driver implement and produce the PCD PPI.</Description>\r
-    <Copyright>Copyright (c) 2006, Intel Corporation</Copyright>\r
+    <Description>This PEIM driver implement and produce PCD PPI.</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>PcdPeim</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>PeimEntryPoint</Keyword>\r
@@ -43,9 +44,6 @@
     <LibraryClass Usage="ALWAYS_CONSUMED">\r
       <Keyword>PeiServicesTablePointerLib</Keyword>\r
     </LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">\r
-      <Keyword>MemoryAllocationLib</Keyword>\r
-    </LibraryClass>\r
     <LibraryClass Usage="ALWAYS_CONSUMED">\r
       <Keyword>BaseMemoryLib</Keyword>\r
     </LibraryClass>\r
     <Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
     <Package PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>\r
   </PackageDependencies>\r
+  <Hobs>\r
+    <HobTypes Usage="ALWAYS_PRODUCED" HobGuidCName="gPcdDataBaseHobGuid">\r
+      <HobType>GUID_EXTENSION</HobType>\r
+    </HobTypes>\r
+    <HobTypes Usage="ALWAYS_PRODUCED" HobGuidCName="gPcdPeiCallbackFnTableHobGuid">\r
+      <HobType>GUID_EXTENSION</HobType>\r
+    </HobTypes>\r
+  </Hobs>\r
   <PPIs>\r
     <Ppi Usage="ALWAYS_PRODUCED">\r
       <PpiCName>gPcdPpiGuid</PpiCName>\r
       <PpiCName>gEfiPeiReadOnlyVariablePpiGuid</PpiCName>\r
     </Ppi>\r
   </PPIs>\r
-  <Guids>\r
-    <GuidCNames Usage="ALWAYS_CONSUMED">\r
-      <GuidCName>gPcdDataBaseHobGuid</GuidCName>\r
-    </GuidCNames>\r
-    <GuidCNames Usage="ALWAYS_CONSUMED">\r
-      <GuidCName>gPcdPeiCallbackFnTableHobGuid</GuidCName>\r
-    </GuidCNames>\r
-  </Guids>\r
   <Externs>\r
     <PcdIsDriver>PEI_PCD_DRIVER</PcdIsDriver>\r
     <Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>\r
index e6a618dece2abdbba388e8932a832fd1d3ffd773..ab4ac4b913aab32df2bbbe603ee062b2c331b8c3 100644 (file)
         <Instance ModuleGuid="52af22ae-9901-4484-8cdc-622dd5838b09" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
         <Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
         <Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
-        <Instance ModuleGuid="50bcb105-6634-441d-b403-659110a03ad2" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>\r
         <Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
         <Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <!--Pkg: MdePkg Mod: BasePrintLib Path: MdePkg\Library\BasePrintLib\BasePrintLib.msa-->\r
+        <Instance ModuleGuid="a86fbfca-0183-4eeb-aa8a-762e3b7da1f3" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>\r
       </Libraries>\r
       <PcdBuildDefinition>\r
         <PcdData ItemType="FIXED_AT_BUILD">\r
index 463eddeadd9ce3d2577a8a2dd583992227ceeba4..b088f7d24cea09fa975ded8f9119c5d21354e7a1 100644 (file)
         <Instance ModuleGuid="52af22ae-9901-4484-8cdc-622dd5838b09" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
         <Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
         <Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
-        <Instance ModuleGuid="50bcb105-6634-441d-b403-659110a03ad2" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>\r
         <Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
         <Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
+        <!--Pkg: MdePkg Mod: BasePrintLib Path: MdePkg\Library\BasePrintLib\BasePrintLib.msa-->\r
+        <Instance ModuleGuid="a86fbfca-0183-4eeb-aa8a-762e3b7da1f3" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>\r
       </Libraries>\r
       <PcdBuildDefinition>\r
         <PcdData ItemType="FIXED_AT_BUILD">\r