Clean up the following module msa files, they are three networt and two PCD modules.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2551 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4 2007-04-09 07:37:43 +00:00
parent 5101d837ed
commit 26aa0c2ff5
21 changed files with 161 additions and 290 deletions

View File

@ -2976,9 +2976,10 @@
<Instance ModuleGuid="52af22ae-9901-4484-8cdc-622dd5838b09" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="52af22ae-9901-4484-8cdc-622dd5838b09" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="50bcb105-6634-441d-b403-659110a03ad2" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>
<Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<!--Pkg: MdePkg Mod: BasePrintLib Path: MdePkg\Library\BasePrintLib\BasePrintLib.msa-->
<Instance ModuleGuid="a86fbfca-0183-4eeb-aa8a-762e3b7da1f3" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
</Libraries> </Libraries>
<PcdBuildDefinition> <PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD"> <PcdData ItemType="FIXED_AT_BUILD">
@ -8419,9 +8420,10 @@
<Instance ModuleGuid="52af22ae-9901-4484-8cdc-622dd5838b09" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="52af22ae-9901-4484-8cdc-622dd5838b09" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="50bcb105-6634-441d-b403-659110a03ad2" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>
<Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<!--Pkg: MdePkg Mod: BasePrintLib Path: MdePkg\Library\BasePrintLib\BasePrintLib.msa-->
<Instance ModuleGuid="a86fbfca-0183-4eeb-aa8a-762e3b7da1f3" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
</Libraries> </Libraries>
<PcdBuildDefinition> <PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD"> <PcdData ItemType="FIXED_AT_BUILD">
@ -12968,9 +12970,10 @@
<Instance ModuleGuid="52af22ae-9901-4484-8cdc-622dd5838b09" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="52af22ae-9901-4484-8cdc-622dd5838b09" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="50bcb105-6634-441d-b403-659110a03ad2" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>
<Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<!--Pkg: MdePkg Mod: BasePrintLib Path: MdePkg\Library\BasePrintLib\BasePrintLib.msa-->
<Instance ModuleGuid="a86fbfca-0183-4eeb-aa8a-762e3b7da1f3" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
</Libraries> </Libraries>
<PcdBuildDefinition> <PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD"> <PcdData ItemType="FIXED_AT_BUILD">

View File

@ -6,8 +6,8 @@
<GuidValue>A3f436EA-A127-4EF8-957C-8048606FF670</GuidValue> <GuidValue>A3f436EA-A127-4EF8-957C-8048606FF670</GuidValue>
<Version>1.0</Version> <Version>1.0</Version>
<Abstract>Component description file for BC module.</Abstract> <Abstract>Component description file for BC module.</Abstract>
<Description>This module provides basic network capability.</Description> <Description>This module provides PXE basic network capability and start EfiPxeBaseCodeProtocol.</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 <License>All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -22,8 +22,9 @@
<OutputFileBasename>BC</OutputFileBasename> <OutputFileBasename>BC</OutputFileBasename>
</ModuleDefinitions> </ModuleDefinitions>
<LibraryClassDefinitions> <LibraryClassDefinitions>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="bda39d3a-451b-4350-8266-81ab10fa0523">
<Keyword>DebugLib</Keyword> <Keyword>DebugLib</Keyword>
<HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>
</LibraryClass> </LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>UefiDriverModelLib</Keyword> <Keyword>UefiDriverModelLib</Keyword>
@ -37,8 +38,9 @@
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>BaseLib</Keyword> <Keyword>BaseLib</Keyword>
</LibraryClass> </LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="a86fbfca-0183-4eeb-aa8a-762e3b7da1f3">
<Keyword>PrintLib</Keyword> <Keyword>PrintLib</Keyword>
<HelpText>Recommended libary Instance is BasePrintLib instance in MdePkg.</HelpText>
</LibraryClass> </LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>BaseMemoryLib</Keyword> <Keyword>BaseMemoryLib</Keyword>
@ -65,36 +67,35 @@
<Filename>Bc.h</Filename> <Filename>Bc.h</Filename>
<Filename>ip.h</Filename> <Filename>ip.h</Filename>
<Filename>ComponentName.c</Filename> <Filename>ComponentName.c</Filename>
<Filename>Print.c</Filename>
</SourceFiles> </SourceFiles>
<PackageDependencies> <PackageDependencies>
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Package PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/> <Package PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>
</PackageDependencies> </PackageDependencies>
<Protocols> <Protocols>
<Protocol Usage="TO_START"> <Protocol Usage="BY_START">
<ProtocolCName>gEfiBisProtocolGuid</ProtocolCName> <ProtocolCName>gEfiPxeBaseCodeProtocolGuid</ProtocolCName>
</Protocol> </Protocol>
<Protocol Usage="BY_START"> <Protocol Usage="BY_START">
<ProtocolCName>gEfiLoadFileProtocolGuid</ProtocolCName> <ProtocolCName>gEfiLoadFileProtocolGuid</ProtocolCName>
</Protocol> </Protocol>
<Protocol Usage="SOMETIMES_PRODUCED"> <Protocol Usage="TO_START">
<ProtocolCName>gEfiPxeBaseCodeCallbackProtocolGuid</ProtocolCName> <ProtocolCName>gEfiBisProtocolGuid</ProtocolCName>
</Protocol> </Protocol>
<Protocol Usage="TO_START"> <Protocol Usage="TO_START">
<ProtocolCName>gEfiSimpleNetworkProtocolGuid</ProtocolCName> <ProtocolCName>gEfiSimpleNetworkProtocolGuid</ProtocolCName>
</Protocol> </Protocol>
<Protocol Usage="TO_START"> <Protocol Usage="TO_START">
<ProtocolCName>gEfiDevicePathProtocolGuid</ProtocolCName>
</Protocol>
<Protocol Usage="SOMETIMES_CONSUMED">
<ProtocolCName>gEfiNetworkInterfaceIdentifierProtocolGuid</ProtocolCName> <ProtocolCName>gEfiNetworkInterfaceIdentifierProtocolGuid</ProtocolCName>
</Protocol> </Protocol>
<Protocol Usage="SOMETIMES_CONSUMED"> <Protocol Usage="TO_START">
<ProtocolCName>gEfiNetworkInterfaceIdentifierProtocolGuid_31</ProtocolCName> <ProtocolCName>gEfiNetworkInterfaceIdentifierProtocolGuid_31</ProtocolCName>
</Protocol> </Protocol>
<Protocol Usage="BY_START"> <Protocol Usage="ALWAYS_CONSUMED">
<ProtocolCName>gEfiPxeBaseCodeProtocolGuid</ProtocolCName> <ProtocolCName>gEfiDevicePathProtocolGuid</ProtocolCName>
</Protocol>
<Protocol Usage="SOMETIMES_PRODUCED">
<ProtocolCName>gEfiPxeBaseCodeCallbackProtocolGuid</ProtocolCName>
</Protocol> </Protocol>
</Protocols> </Protocols>
<SystemTables> <SystemTables>
@ -102,11 +103,6 @@
<SystemTableCName>gEfiSmbiosTableGuid</SystemTableCName> <SystemTableCName>gEfiSmbiosTableGuid</SystemTableCName>
</SystemTableCNames> </SystemTableCNames>
</SystemTables> </SystemTables>
<Guids>
<GuidCNames Usage="ALWAYS_CONSUMED">
<GuidCName>gEfiSmbiosTableGuid</GuidCName>
</GuidCNames>
</Guids>
<Externs> <Externs>
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification> <Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification> <Specification>EDK_RELEASE_VERSION 0x00020000</Specification>

View File

@ -411,14 +411,6 @@ PxeBcLibGetSmbiosSystemGuidAndSerialNumber (
) )
; ;
UINTN
EFIAPI
AsciiPrint (
IN CONST CHAR8 *Format,
...
)
;
// //
// Define SMBIOS tables. // Define SMBIOS tables.
// //

View File

@ -822,7 +822,7 @@ Returns:
return NULL; return NULL;
} }
if (BisHandleCount != sizeof BisHandleBuffer) { if (BisHandleCount != sizeof (BisHandleBuffer)) {
// //
// This really should never happen, but I am paranoid. // This really should never happen, but I am paranoid.
// //
@ -1186,7 +1186,6 @@ BcStart (
{ {
EFI_SIMPLE_NETWORK_PROTOCOL *SnpPtr; EFI_SIMPLE_NETWORK_PROTOCOL *SnpPtr;
EFI_SIMPLE_NETWORK_MODE *SnpModePtr; EFI_SIMPLE_NETWORK_MODE *SnpModePtr;
EFI_STATUS Status;
EFI_STATUS StatCode; EFI_STATUS StatCode;
PXE_BASECODE_DEVICE *Private; PXE_BASECODE_DEVICE *Private;
@ -1364,54 +1363,34 @@ BcStart (
// //
// Allocate Tx/Rx buffers // Allocate Tx/Rx buffers
// //
Status = gBS->AllocatePool ( Private->TransmitBufferPtr = AllocateZeroPool (BUFFER_ALLOCATE_SIZE);
EfiBootServicesData, if (Private->TransmitBufferPtr == NULL) {
BUFFER_ALLOCATE_SIZE,
(VOID **) &Private->TransmitBufferPtr
);
if (!EFI_ERROR (Status)) {
ZeroMem (Private->TransmitBufferPtr, BUFFER_ALLOCATE_SIZE);
} else {
DEBUG ((EFI_D_NET, "\nBcStart() Could not alloc TxBuf.\n")); DEBUG ((EFI_D_NET, "\nBcStart() Could not alloc TxBuf.\n"));
EfiReleaseLock (&Private->Lock); EfiReleaseLock (&Private->Lock);
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
Status = gBS->AllocatePool ( Private->ReceiveBufferPtr = AllocateZeroPool (BUFFER_ALLOCATE_SIZE);
EfiBootServicesData, if (Private->ReceiveBufferPtr == NULL) {
BUFFER_ALLOCATE_SIZE,
(VOID **) &Private->ReceiveBufferPtr
);
if (!EFI_ERROR (Status)) {
ZeroMem (Private->ReceiveBufferPtr, BUFFER_ALLOCATE_SIZE);
} else {
DEBUG ((EFI_D_NET, "\nBcStart() Could not alloc RxBuf.\n")); DEBUG ((EFI_D_NET, "\nBcStart() Could not alloc RxBuf.\n"));
gBS->FreePool (Private->TransmitBufferPtr); FreePool (Private->TransmitBufferPtr);
EfiReleaseLock (&Private->Lock); EfiReleaseLock (&Private->Lock);
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
Status = gBS->AllocatePool ( Private->TftpErrorBuffer = AllocatePool (256);
EfiBootServicesData, if (Private->TftpErrorBuffer == NULL) {
256, FreePool (Private->ReceiveBufferPtr);
(VOID **) &Private->TftpErrorBuffer FreePool (Private->TransmitBufferPtr);
);
if (EFI_ERROR (Status)) {
gBS->FreePool (Private->ReceiveBufferPtr);
gBS->FreePool (Private->TransmitBufferPtr);
EfiReleaseLock (&Private->Lock); EfiReleaseLock (&Private->Lock);
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
Status = gBS->AllocatePool (EfiBootServicesData, 256, (VOID **) &Private->TftpAckBuffer); Private->TftpAckBuffer = AllocatePool (256);
if (Private->TftpAckBuffer == NULL) {
if (EFI_ERROR (Status)) { FreePool (Private->TftpErrorBuffer);
gBS->FreePool (Private->TftpErrorBuffer); FreePool (Private->ReceiveBufferPtr);
gBS->FreePool (Private->ReceiveBufferPtr); FreePool (Private->TransmitBufferPtr);
gBS->FreePool (Private->TransmitBufferPtr);
EfiReleaseLock (&Private->Lock); EfiReleaseLock (&Private->Lock);
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
@ -1546,27 +1525,27 @@ BcStop (
} }
if (Private->TransmitBufferPtr != NULL) { if (Private->TransmitBufferPtr != NULL) {
gBS->FreePool (Private->TransmitBufferPtr); FreePool (Private->TransmitBufferPtr);
Private->TransmitBufferPtr = NULL; Private->TransmitBufferPtr = NULL;
} }
if (Private->ReceiveBufferPtr != NULL) { if (Private->ReceiveBufferPtr != NULL) {
gBS->FreePool (Private->ReceiveBufferPtr); FreePool (Private->ReceiveBufferPtr);
Private->ReceiveBufferPtr = NULL; Private->ReceiveBufferPtr = NULL;
} }
if (Private->ArpBuffer != NULL) { if (Private->ArpBuffer != NULL) {
gBS->FreePool (Private->ArpBuffer); FreePool (Private->ArpBuffer);
Private->ArpBuffer = NULL; Private->ArpBuffer = NULL;
} }
if (Private->TftpErrorBuffer != NULL) { if (Private->TftpErrorBuffer != NULL) {
gBS->FreePool (Private->TftpErrorBuffer); FreePool (Private->TftpErrorBuffer);
Private->TftpErrorBuffer = NULL; Private->TftpErrorBuffer = NULL;
} }
if (Private->TftpAckBuffer != NULL) { if (Private->TftpAckBuffer != NULL) {
gBS->FreePool (Private->TftpAckBuffer); FreePool (Private->TftpAckBuffer);
Private->TftpAckBuffer = NULL; Private->TftpAckBuffer = NULL;
} }
@ -2118,46 +2097,26 @@ PxeBcDriverStart (
// //
// Allocate structures needed by BaseCode and LoadFile protocols. // Allocate structures needed by BaseCode and LoadFile protocols.
// //
Status = gBS->AllocatePool ( Private = AllocateZeroPool (sizeof (PXE_BASECODE_DEVICE));
EfiBootServicesData,
sizeof (PXE_BASECODE_DEVICE),
(VOID **) &Private
);
if (!EFI_ERROR (Status)) { if (Private == NULL ) {
ZeroMem (Private, sizeof (PXE_BASECODE_DEVICE));
} else {
DEBUG ((EFI_D_NET, "\nBcNotifySnp() Could not alloc PXE_BASECODE_DEVICE structure.\n")); DEBUG ((EFI_D_NET, "\nBcNotifySnp() Could not alloc PXE_BASECODE_DEVICE structure.\n"));
return Status; return EFI_OUT_OF_RESOURCES;
} }
Status = gBS->AllocatePool ( pLF = AllocateZeroPool (sizeof (LOADFILE_DEVICE));
EfiBootServicesData, if (pLF == NULL) {
sizeof (LOADFILE_DEVICE),
(VOID **) &pLF
);
if (!EFI_ERROR (Status)) {
ZeroMem (pLF, sizeof (LOADFILE_DEVICE));
} else {
DEBUG ((EFI_D_NET, "\nBcNotifySnp() Could not alloc LOADFILE_DEVICE structure.\n")); DEBUG ((EFI_D_NET, "\nBcNotifySnp() Could not alloc LOADFILE_DEVICE structure.\n"));
gBS->FreePool (Private); FreePool (Private);
return Status; return EFI_OUT_OF_RESOURCES;
} }
Status = gBS->AllocatePool ( Private->EfiBc.Mode = AllocateZeroPool (sizeof (EFI_PXE_BASE_CODE_MODE));
EfiBootServicesData, if (Private->EfiBc.Mode == NULL) {
sizeof (EFI_PXE_BASE_CODE_MODE),
(VOID **) &Private->EfiBc.Mode
);
if (!EFI_ERROR (Status)) {
ZeroMem (Private->EfiBc.Mode, sizeof (EFI_PXE_BASE_CODE_MODE));
} else {
DEBUG ((EFI_D_NET, "\nBcNotifySnp() Could not alloc Mode structure.\n")); DEBUG ((EFI_D_NET, "\nBcNotifySnp() Could not alloc Mode structure.\n"));
gBS->FreePool (Private); FreePool (Private);
gBS->FreePool (pLF); FreePool (pLF);
return Status; return EFI_OUT_OF_RESOURCES;
} }
// //
// Lock access, just in case // Lock access, just in case
@ -2298,9 +2257,9 @@ PxeBcDriverStart (
return Status; return Status;
PxeBcError: ; PxeBcError: ;
gBS->FreePool (Private->EfiBc.Mode); FreePool (Private->EfiBc.Mode);
gBS->FreePool (Private); FreePool (Private);
gBS->FreePool (pLF); FreePool (pLF);
return Status; return Status;
} }
@ -2370,9 +2329,9 @@ PxeBcDriverStop (
Controller Controller
); );
gBS->FreePool (LoadDevice->Private->EfiBc.Mode); FreePool (LoadDevice->Private->EfiBc.Mode);
gBS->FreePool (LoadDevice->Private); FreePool (LoadDevice->Private);
gBS->FreePool (LoadDevice); FreePool (LoadDevice);
} }
return Status; return Status;

View File

@ -1,6 +1,6 @@
/*++ /*++
Copyright (c) 2006, Intel Corporation Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -340,7 +340,6 @@ Returns:
EFI_PXE_BASE_CODE_MODE *PxeBcMode; EFI_PXE_BASE_CODE_MODE *PxeBcMode;
EFI_SIMPLE_NETWORK_MODE *SnpMode; EFI_SIMPLE_NETWORK_MODE *SnpMode;
ARP_PACKET *ArpPacket; ARP_PACKET *ArpPacket;
EFI_STATUS Status;
UINTN HardwareAddrLength; UINTN HardwareAddrLength;
UINT8 *SrcProtocolAddrPtr; UINT8 *SrcProtocolAddrPtr;
UINT8 *DestHardwareAddrptr; UINT8 *DestHardwareAddrptr;
@ -357,14 +356,9 @@ Returns:
// Allocate ARP buffer // Allocate ARP buffer
// //
if (Private->ArpBuffer == NULL) { if (Private->ArpBuffer == NULL) {
Status = gBS->AllocatePool ( Private->ArpBuffer = AllocatePool (SnpMode->MediaHeaderSize + sizeof (ARP_PACKET));
EfiBootServicesData, if (Private->ArpBuffer == NULL) {
SnpMode->MediaHeaderSize + sizeof (ARP_PACKET), return EFI_OUT_OF_RESOURCES;
(VOID **) &Private->ArpBuffer
);
if (EFI_ERROR (Status)) {
return Status;
} }
} }

View File

@ -1,6 +1,6 @@
/*++ /*++
Copyright (c) 2006, Intel Corporation Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -2223,12 +2223,12 @@ FreeMem (
) )
{ {
if (Private->TransmitBuffer != NULL) { if (Private->TransmitBuffer != NULL) {
gBS->FreePool (Private->TransmitBuffer); FreePool (Private->TransmitBuffer);
Private->TransmitBuffer = NULL; Private->TransmitBuffer = NULL;
} }
if (Private->ReceiveBuffers != NULL) { if (Private->ReceiveBuffers != NULL) {
gBS->FreePool (Private->ReceiveBuffers); FreePool (Private->ReceiveBuffers);
Private->ReceiveBuffers = NULL; Private->ReceiveBuffers = NULL;
} }
} }
@ -2240,48 +2240,29 @@ GetMem (
PXE_BASECODE_DEVICE *Private PXE_BASECODE_DEVICE *Private
) )
{ {
EFI_STATUS Status;
if (Private->DhcpPacketBuffer == NULL) { if (Private->DhcpPacketBuffer == NULL) {
Status = gBS->AllocatePool ( Private->DhcpPacketBuffer = AllocatePool (sizeof (DHCP_RECEIVE_BUFFER) * (PXE_BIS_INDEX + 1));
EfiBootServicesData, if (Private->DhcpPacketBuffer == NULL) {
sizeof (DHCP_RECEIVE_BUFFER) * (PXE_BIS_INDEX + 1),
&Private->DhcpPacketBuffer
);
if (EFI_ERROR (Status) || Private->DhcpPacketBuffer == NULL) {
Private->DhcpPacketBuffer = NULL;
FreeMem (Private); FreeMem (Private);
return FALSE; return FALSE;
} }
} }
Status = gBS->AllocatePool ( Private->TransmitBuffer = AllocatePool (sizeof (EFI_PXE_BASE_CODE_PACKET));
EfiBootServicesData, if (Private->TransmitBuffer == NULL) {
sizeof (EFI_PXE_BASE_CODE_PACKET), FreePool (Private->DhcpPacketBuffer);
&Private->TransmitBuffer
);
if (EFI_ERROR (Status) || Private->TransmitBuffer == NULL) {
gBS->FreePool (Private->DhcpPacketBuffer);
Private->DhcpPacketBuffer = NULL; Private->DhcpPacketBuffer = NULL;
Private->TransmitBuffer = NULL;
FreeMem (Private); FreeMem (Private);
return FALSE; return FALSE;
} }
Status = gBS->AllocatePool ( Private->ReceiveBuffers = AllocatePool (sizeof (DHCP_RECEIVE_BUFFER) * (MAX_OFFERS));
EfiBootServicesData, if (Private->ReceiveBuffers == NULL) {
sizeof (DHCP_RECEIVE_BUFFER) * (MAX_OFFERS), FreePool (Private->TransmitBuffer);
&Private->ReceiveBuffers FreePool (Private->DhcpPacketBuffer);
);
if (EFI_ERROR (Status) || Private->ReceiveBuffers == NULL) {
gBS->FreePool (Private->TransmitBuffer);
gBS->FreePool (Private->DhcpPacketBuffer);
Private->DhcpPacketBuffer = NULL; Private->DhcpPacketBuffer = NULL;
Private->TransmitBuffer = NULL; Private->TransmitBuffer = NULL;
Private->ReceiveBuffers = NULL;
FreeMem (Private); FreeMem (Private);
return FALSE; return FALSE;
} }
@ -2920,7 +2901,6 @@ Returns:
PXE_SERVER_LISTS DefaultSrvList; PXE_SERVER_LISTS DefaultSrvList;
PXE_SERVER_LISTS *ServerListPtr; PXE_SERVER_LISTS *ServerListPtr;
PXE_SERVER_LISTS *McastServerListPtr; PXE_SERVER_LISTS *McastServerListPtr;
EFI_STATUS Status;
UNION_PTR LocalPtr; UNION_PTR LocalPtr;
UINTN Index; UINTN Index;
UINTN Index2; UINTN Index2;
@ -3120,14 +3100,11 @@ Returns:
} }
if (ServerListPtr == NULL) { if (ServerListPtr == NULL) {
Status = gBS->AllocatePool ( ServerListPtr = AllocatePool (
EfiBootServicesData, sizeof (PXEV4_SERVER_LIST) + (Index2 - 1) * sizeof (EFI_IPv4_ADDRESS)
sizeof (PXEV4_SERVER_LIST) + (Index2 - 1) * sizeof (EFI_IPv4_ADDRESS),
(VOID **) &ServerListPtr
); );
if (EFI_ERROR (Status) || ServerListPtr == NULL) { if (ServerListPtr == NULL) {
ServerListPtr = NULL;
EfiReleaseLock (&Private->Lock); EfiReleaseLock (&Private->Lock);
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
@ -3173,7 +3150,7 @@ Returns:
); );
if (AcquiredSrvList) { if (AcquiredSrvList) {
gBS->FreePool (ServerListPtr); FreePool (ServerListPtr);
} }
FreeMem (Private); FreeMem (Private);
@ -3219,7 +3196,6 @@ Returns:
--*/ --*/
{ {
EFI_PXE_BASE_CODE_MODE *PxebcMode; EFI_PXE_BASE_CODE_MODE *PxebcMode;
EFI_STATUS Status;
PXE_BASECODE_DEVICE *Private; PXE_BASECODE_DEVICE *Private;
// //
@ -3249,14 +3225,8 @@ Returns:
PxebcMode = Private->EfiBc.Mode; PxebcMode = Private->EfiBc.Mode;
if (Private->DhcpPacketBuffer == NULL) { if (Private->DhcpPacketBuffer == NULL) {
Status = gBS->AllocatePool ( Private->DhcpPacketBuffer = AllocatePool (sizeof (DHCP_RECEIVE_BUFFER) * (PXE_BIS_INDEX + 1));
EfiBootServicesData, if (Private->DhcpPacketBuffer == NULL) {
sizeof (DHCP_RECEIVE_BUFFER) * (PXE_BIS_INDEX + 1),
&Private->DhcpPacketBuffer
);
if (EFI_ERROR (Status) || Private->DhcpPacketBuffer == NULL) {
Private->DhcpPacketBuffer = NULL;
EfiReleaseLock (&Private->Lock); EfiReleaseLock (&Private->Lock);
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }

View File

@ -1963,7 +1963,6 @@ Returns:
{ {
EFI_PXE_BASE_CODE_IP_FILTER Filter; EFI_PXE_BASE_CODE_IP_FILTER Filter;
EFI_STATUS StatCode; EFI_STATUS StatCode;
EFI_STATUS Status;
UINT64 BufferSizeLocal; UINT64 BufferSizeLocal;
UINTN PacketSize; UINTN PacketSize;
UINT8 *BufferPtrLocal; UINT8 *BufferPtrLocal;
@ -2082,13 +2081,8 @@ Returns:
} }
if (DontUseBuffer) { if (DontUseBuffer) {
Status = gBS->AllocatePool ( BufferPtrLocal = AllocatePool (BUFFER_ALLOCATE_SIZE);
EfiBootServicesData, if (BufferPtrLocal == NULL) {
BUFFER_ALLOCATE_SIZE,
(VOID **) &BufferPtrLocal
);
if (EFI_ERROR (Status) || BufferPtrLocal == NULL) {
DEBUG ((EFI_D_NET, "\nPxeBcMtftp() Exit #4")); DEBUG ((EFI_D_NET, "\nPxeBcMtftp() Exit #4"));
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
@ -2267,7 +2261,7 @@ Returns:
} }
if (DontUseBuffer) { if (DontUseBuffer) {
gBS->FreePool (BufferPtrLocal); FreePool (BufferPtrLocal);
} }
if (StatCode != EFI_SUCCESS) { if (StatCode != EFI_SUCCESS) {

View File

@ -1,6 +1,6 @@
/*++ /*++
Copyright (c) 2006, Intel Corporation Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -1168,14 +1168,9 @@ Returns:
// //
// Allocate credential file buffer. // Allocate credential file buffer.
// //
Status = gBS->AllocatePool ( CredentialBuffer = AllocatePool ((UINTN) CredentialLen);
EfiBootServicesData, if (CredentialBuffer == NULL) {
(UINTN) CredentialLen, return EFI_OUT_OF_RESOURCES;
&CredentialBuffer
);
if (EFI_ERROR (Status)) {
return Status;
} }
// //
// Download credential file. // Download credential file.
@ -1196,7 +1191,7 @@ Returns:
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
gBS->FreePool (CredentialBuffer); FreePool (CredentialBuffer);
return Status; return Status;
} }
// //
@ -1211,7 +1206,7 @@ Returns:
Status = EFI_PROTOCOL_ERROR; Status = EFI_PROTOCOL_ERROR;
} }
gBS->FreePool (CredentialBuffer); FreePool (CredentialBuffer);
} }
return Status; return Status;

View File

@ -7,7 +7,7 @@
<Version>1.0</Version> <Version>1.0</Version>
<Abstract>Component description file for Dhcp4 module.</Abstract> <Abstract>Component description file for Dhcp4 module.</Abstract>
<Description>This module can produce PxeDhcp4 protocol on ControllerHandle.</Description> <Description>This module can produce PxeDhcp4 protocol on ControllerHandle.</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 <License>All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -22,8 +22,9 @@
<OutputFileBasename>Dhcp4</OutputFileBasename> <OutputFileBasename>Dhcp4</OutputFileBasename>
</ModuleDefinitions> </ModuleDefinitions>
<LibraryClassDefinitions> <LibraryClassDefinitions>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="bda39d3a-451b-4350-8266-81ab10fa0523">
<Keyword>DebugLib</Keyword> <Keyword>DebugLib</Keyword>
<HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>
</LibraryClass> </LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>UefiDriverModelLib</Keyword> <Keyword>UefiDriverModelLib</Keyword>
@ -60,18 +61,18 @@
<Package PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/> <Package PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>
</PackageDependencies> </PackageDependencies>
<Protocols> <Protocols>
<Protocol Usage="ALWAYS_CONSUMED">
<ProtocolCName>gEfiPxeDhcp4CallbackProtocolGuid</ProtocolCName>
</Protocol>
<Protocol Usage="BY_START"> <Protocol Usage="BY_START">
<ProtocolCName>gEfiPxeDhcp4ProtocolGuid</ProtocolCName> <ProtocolCName>gEfiPxeDhcp4ProtocolGuid</ProtocolCName>
</Protocol> </Protocol>
<Protocol Usage="ALWAYS_CONSUMED">
<ProtocolCName>gEfiSimpleNetworkProtocolGuid</ProtocolCName>
</Protocol>
<Protocol Usage="TO_START"> <Protocol Usage="TO_START">
<ProtocolCName>gEfiPxeBaseCodeProtocolGuid</ProtocolCName> <ProtocolCName>gEfiPxeBaseCodeProtocolGuid</ProtocolCName>
</Protocol> </Protocol>
<Protocol Usage="TO_START">
<ProtocolCName>gEfiSimpleNetworkProtocolGuid</ProtocolCName>
</Protocol>
<Protocol Usage="SOMETIMES_CONSUMED">
<ProtocolCName>gEfiPxeDhcp4CallbackProtocolGuid</ProtocolCName>
</Protocol>
</Protocols> </Protocols>
<Externs> <Externs>
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification> <Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>

View File

@ -1,6 +1,6 @@
/*++ /*++
Copyright (c) 2006, Intel Corporation Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -155,19 +155,11 @@ PxeDhcp4DriverBindingStart (
// //
// Initialize the PXE DHCP device instance. // Initialize the PXE DHCP device instance.
// //
Status = gBS->AllocatePool ( Private = AllocateZeroPool (sizeof (PXE_DHCP4_PRIVATE_DATA));
EfiBootServicesData, if (Private == NULL) {
sizeof (PXE_DHCP4_PRIVATE_DATA), Status = EFI_OUT_OF_RESOURCES;
(VOID **) &Private
);
if (EFI_ERROR (Status)) {
goto error_exit; goto error_exit;
} }
//
//
//
ZeroMem (Private, sizeof (PXE_DHCP4_PRIVATE_DATA));
Private->Signature = PXE_DHCP4_PRIVATE_DATA_SIGNATURE; Private->Signature = PXE_DHCP4_PRIVATE_DATA_SIGNATURE;
Private->PxeBc = PxeBc; Private->PxeBc = PxeBc;
@ -263,7 +255,7 @@ PxeDhcp4DriverBindingStop (
// Release allocated resources // Release allocated resources
// //
if (Private->PxeDhcp4.Data) { if (Private->PxeDhcp4.Data) {
gBS->FreePool (Private->PxeDhcp4.Data); FreePool (Private->PxeDhcp4.Data);
Private->PxeDhcp4.Data = NULL; Private->PxeDhcp4.Data = NULL;
} }
// //
@ -294,7 +286,7 @@ PxeDhcp4DriverBindingStop (
// //
// Release our private data // Release our private data
// //
gBS->FreePool (Private); FreePool (Private);
return Status; return Status;
} }

View File

@ -107,13 +107,8 @@ offer_verify (
// //
// Good DHCP (or BOOTP) packet. Cache it! // Good DHCP (or BOOTP) packet. Cache it!
// //
EfiStatus = gBS->AllocatePool ( tmp = AllocatePool ((Private->offers + 1) * sizeof (DHCP4_PACKET));
EfiBootServicesData, if (tmp == NULL) {
(Private->offers + 1) * sizeof (DHCP4_PACKET),
(VOID **) &tmp
);
if (EFI_ERROR (EfiStatus)) {
return -2; return -2;
} }
@ -126,7 +121,7 @@ offer_verify (
Private->offers * sizeof (DHCP4_PACKET) Private->offers * sizeof (DHCP4_PACKET)
); );
gBS->FreePool (Private->offer_list); FreePool (Private->offer_list);
} }
CopyMem (&tmp[Private->offers++], rx_pkt, sizeof (DHCP4_PACKET)); CopyMem (&tmp[Private->offers++], rx_pkt, sizeof (DHCP4_PACKET));
@ -388,7 +383,7 @@ PxeDhcp4Init (
if (EFI_ERROR (EfiStatus)) { if (EFI_ERROR (EfiStatus)) {
if (Private->offer_list) { if (Private->offer_list) {
gBS->FreePool (Private->offer_list); FreePool (Private->offer_list);
} }
Private->offers = 0; Private->offers = 0;

View File

@ -1,6 +1,6 @@
/*++ /*++
Copyright (c) 2006, Intel Corporation Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -65,7 +65,7 @@ PxeDhcp4Release (
// packet, just release storage and return. // packet, just release storage and return.
// //
if (This->Data->IsBootp || !This->Data->IsAck) { if (This->Data->IsBootp || !This->Data->IsAck) {
gBS->FreePool (This->Data); FreePool (This->Data);
This->Data = NULL; This->Data = NULL;
if (Private->StopPxeBc) { if (Private->StopPxeBc) {
@ -96,7 +96,7 @@ PxeDhcp4Release (
); );
if (EFI_ERROR (efi_status)) { if (EFI_ERROR (efi_status)) {
gBS->FreePool (This->Data); FreePool (This->Data);
This->Data = NULL; This->Data = NULL;
if (Private->StopPxeBc) { if (Private->StopPxeBc) {
@ -107,7 +107,7 @@ PxeDhcp4Release (
} }
if (op->len != 4) { if (op->len != 4) {
gBS->FreePool (This->Data); FreePool (This->Data);
This->Data = NULL; This->Data = NULL;
if (Private->StopPxeBc) { if (Private->StopPxeBc) {
@ -139,7 +139,7 @@ PxeDhcp4Release (
); );
if (EFI_ERROR (efi_status)) { if (EFI_ERROR (efi_status)) {
gBS->FreePool (This->Data); FreePool (This->Data);
This->Data = NULL; This->Data = NULL;
if (Private->StopPxeBc) { if (Private->StopPxeBc) {
@ -150,7 +150,7 @@ PxeDhcp4Release (
} }
if (op->len != 4) { if (op->len != 4) {
gBS->FreePool (This->Data); FreePool (This->Data);
This->Data = NULL; This->Data = NULL;
if (Private->StopPxeBc) { if (Private->StopPxeBc) {
@ -181,7 +181,7 @@ PxeDhcp4Release (
efi_status = start_udp (Private, &client_ip, &subnet_mask); efi_status = start_udp (Private, &client_ip, &subnet_mask);
if (EFI_ERROR (efi_status)) { if (EFI_ERROR (efi_status)) {
gBS->FreePool (This->Data); FreePool (This->Data);
This->Data = NULL; This->Data = NULL;
if (Private->StopPxeBc) { if (Private->StopPxeBc) {
@ -233,7 +233,7 @@ PxeDhcp4Release (
// //
stop_udp (Private); stop_udp (Private);
gBS->FreePool (This->Data); FreePool (This->Data);
This->Data = NULL; This->Data = NULL;
if (Private->StopPxeBc) { if (Private->StopPxeBc) {

View File

@ -1,6 +1,6 @@
/*++ /*++
Copyright (c) 2006, Intel Corporation Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -164,7 +164,7 @@ PxeDhcp4Run (
// No DHCP Acks. Release DHCP Offer list storage. // No DHCP Acks. Release DHCP Offer list storage.
// //
if (offer_list != NULL) { if (offer_list != NULL) {
gBS->FreePool (offer_list); FreePool (offer_list);
offer_list = NULL; offer_list = NULL;
} }
// //

View File

@ -1,6 +1,6 @@
/*++ /*++
Copyright (c) 2006, Intel Corporation Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -117,17 +117,7 @@ PxeDhcp4Setup (
// Allocate data structure. Return error // Allocate data structure. Return error
// if there is not enough available memory. // if there is not enough available memory.
// //
EfiStatus = gBS->AllocatePool ( This->Data = AllocatePool (sizeof (EFI_PXE_DHCP4_DATA));
EfiBootServicesData,
sizeof (EFI_PXE_DHCP4_DATA),
(VOID **) &This->Data
);
if (EFI_ERROR (EfiStatus)) {
This->Data = NULL;
return EfiStatus;
}
if (This->Data == NULL) { if (This->Data == NULL) {
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
@ -139,7 +129,7 @@ PxeDhcp4Setup (
if (EFI_ERROR (EfiStatus)) { if (EFI_ERROR (EfiStatus)) {
if (EfiStatus != EFI_ALREADY_STARTED) { if (EfiStatus != EFI_ALREADY_STARTED) {
gBS->FreePool (This->Data); FreePool (This->Data);
This->Data = NULL; This->Data = NULL;
Private->PxeBc->Stop (Private->PxeBc); Private->PxeBc->Stop (Private->PxeBc);
return EfiStatus; return EfiStatus;

View File

@ -7,7 +7,7 @@
<Version>1.0</Version> <Version>1.0</Version>
<Abstract>Component description file for SNP module.</Abstract> <Abstract>Component description file for SNP module.</Abstract>
<Description>This module attachs the SNP interface to UNDI layer that it finds on the given handle!</Description> <Description>This module attachs the SNP interface to UNDI layer that it finds on the given handle!</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 <License>All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -22,8 +22,9 @@
<OutputFileBasename>SNP</OutputFileBasename> <OutputFileBasename>SNP</OutputFileBasename>
</ModuleDefinitions> </ModuleDefinitions>
<LibraryClassDefinitions> <LibraryClassDefinitions>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="bda39d3a-451b-4350-8266-81ab10fa0523">
<Keyword>DebugLib</Keyword> <Keyword>DebugLib</Keyword>
<HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>
</LibraryClass> </LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>UefiDriverModelLib</Keyword> <Keyword>UefiDriverModelLib</Keyword>
@ -69,7 +70,6 @@
</SourceFiles> </SourceFiles>
<PackageDependencies> <PackageDependencies>
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Package PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>
</PackageDependencies> </PackageDependencies>
<Protocols> <Protocols>
<Protocol Usage="BY_START"> <Protocol Usage="BY_START">
@ -81,11 +81,12 @@
<Protocol Usage="TO_START"> <Protocol Usage="TO_START">
<ProtocolCName>gEfiDevicePathProtocolGuid</ProtocolCName> <ProtocolCName>gEfiDevicePathProtocolGuid</ProtocolCName>
</Protocol> </Protocol>
<Protocol Usage="SOMETIMES_CONSUMED"> <Protocol Usage="TO_START">
<ProtocolCName>gEfiNetworkInterfaceIdentifierProtocolGuid</ProtocolCName> <ProtocolCName>gEfiNetworkInterfaceIdentifierProtocolGuid</ProtocolCName>
</Protocol> </Protocol>
<Protocol Usage="TO_START"> <Protocol Usage="TO_START">
<ProtocolCName>gEfiNetworkInterfaceIdentifierProtocolGuid_31</ProtocolCName> <ProtocolCName>gEfiNetworkInterfaceIdentifierProtocolGuid_31</ProtocolCName>
<HelpText>This module first look for 3.1 undi, if it is not there then look for 3.0 undi.</HelpText>
</Protocol> </Protocol>
</Protocols> </Protocols>
<Externs> <Externs>

View File

@ -1,5 +1,5 @@
/*++ /*++
Copyright (c) 2006, Intel Corporation Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -1081,14 +1081,9 @@ Returns:
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
Status = gBS->AllocatePool ( *v2p = AllocatePool (sizeof (struct s_v2p));
EfiBootServicesData, if (*v2p != NULL) {
sizeof (struct s_v2p), return EFI_OUT_OF_RESOURCES;
(VOID **) v2p
);
if (Status != EFI_SUCCESS) {
return Status;
} }
Status = mPciIoFncs->Map ( Status = mPciIoFncs->Map (
@ -1100,7 +1095,7 @@ Returns:
&(*v2p)->unmap &(*v2p)->unmap
); );
if (Status != EFI_SUCCESS) { if (Status != EFI_SUCCESS) {
gBS->FreePool (*v2p); FreePool (*v2p);
return Status; return Status;
} }
(*v2p)->vaddr = vaddr; (*v2p)->vaddr = vaddr;
@ -1189,7 +1184,7 @@ Returns:
Status = mPciIoFncs->Unmap (mPciIoFncs, v->unmap); Status = mPciIoFncs->Unmap (mPciIoFncs, v->unmap);
gBS->FreePool (v); FreePool (v);
if (Status) { if (Status) {
DEBUG ((EFI_D_ERROR, "Unmap failed with status = %x\n", Status)); DEBUG ((EFI_D_ERROR, "Unmap failed with status = %x\n", Status));
@ -1201,7 +1196,7 @@ Returns:
if ((t = v->next)->vaddr == vaddr) { if ((t = v->next)->vaddr == vaddr) {
v->next = t->next; v->next = t->next;
Status = mPciIoFncs->Unmap (mPciIoFncs, t->unmap); Status = mPciIoFncs->Unmap (mPciIoFncs, t->unmap);
gBS->FreePool (t); FreePool (t);
if (Status) { if (Status) {
DEBUG ((EFI_D_ERROR, "Unmap failed with status = %x\n", Status)); DEBUG ((EFI_D_ERROR, "Unmap failed with status = %x\n", Status));

View File

@ -1,6 +1,6 @@
/*++ /*++
Copyright (c) 2006, Intel Corporation Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -19,7 +19,6 @@ Abstract:
--*/ --*/
#include <AutoGen.h>
#include <DxeDepex.h> #include <DxeDepex.h>
DEPENDENCY_START DEPENDENCY_START

View File

@ -7,7 +7,7 @@
<Version>1.0</Version> <Version>1.0</Version>
<Abstract>Component description file for PCD service DXE driver.</Abstract> <Abstract>Component description file for PCD service DXE driver.</Abstract>
<Description>This DXE driver implement and produce the PCD protocol.</Description> <Description>This DXE driver implement and produce the PCD protocol.</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 <License>All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -25,11 +25,9 @@
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>BaseLib</Keyword> <Keyword>BaseLib</Keyword>
</LibraryClass> </LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="bda39d3a-451b-4350-8266-81ab10fa0523">
<Keyword>DebugLib</Keyword> <Keyword>DebugLib</Keyword>
</LibraryClass> <HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>
<LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>HiiLib</Keyword>
</LibraryClass> </LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>UefiLib</Keyword> <Keyword>UefiLib</Keyword>
@ -70,15 +68,12 @@
<Protocol Usage="ALWAYS_PRODUCED"> <Protocol Usage="ALWAYS_PRODUCED">
<ProtocolCName>gPcdProtocolGuid</ProtocolCName> <ProtocolCName>gPcdProtocolGuid</ProtocolCName>
</Protocol> </Protocol>
<Protocol Usage="ALWAYS_CONSUMED">
<ProtocolCName>gEfiVariableArchProtocolGuid</ProtocolCName>
</Protocol>
</Protocols> </Protocols>
<Guids> <Hobs>
<GuidCNames Usage="ALWAYS_CONSUMED"> <HobTypes Usage="ALWAYS_CONSUMED" HobGuidCName="gPcdDataBaseHobGuid">
<GuidCName>gPcdDataBaseHobGuid</GuidCName> <HobType>GUID_EXTENSION</HobType>
</GuidCNames> </HobTypes>
</Guids> </Hobs>
<Externs> <Externs>
<PcdIsDriver>DXE_PCD_DRIVER</PcdIsDriver> <PcdIsDriver>DXE_PCD_DRIVER</PcdIsDriver>
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification> <Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>

View File

@ -6,8 +6,8 @@
<GuidValue>9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50</GuidValue> <GuidValue>9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50</GuidValue>
<Version>1.0</Version> <Version>1.0</Version>
<Abstract>Component description file for Pcd Database PEIM module</Abstract> <Abstract>Component description file for Pcd Database PEIM module</Abstract>
<Description>This DXE driver implement and produce the PCD PPI.</Description> <Description>This PEIM driver implement and produce PCD PPI.</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 <License>All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -22,8 +22,9 @@
<OutputFileBasename>PcdPeim</OutputFileBasename> <OutputFileBasename>PcdPeim</OutputFileBasename>
</ModuleDefinitions> </ModuleDefinitions>
<LibraryClassDefinitions> <LibraryClassDefinitions>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="bda39d3a-451b-4350-8266-81ab10fa0523">
<Keyword>DebugLib</Keyword> <Keyword>DebugLib</Keyword>
<HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>
</LibraryClass> </LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>PeimEntryPoint</Keyword> <Keyword>PeimEntryPoint</Keyword>
@ -43,9 +44,6 @@
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>PeiServicesTablePointerLib</Keyword> <Keyword>PeiServicesTablePointerLib</Keyword>
</LibraryClass> </LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>MemoryAllocationLib</Keyword>
</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED"> <LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>BaseMemoryLib</Keyword> <Keyword>BaseMemoryLib</Keyword>
</LibraryClass> </LibraryClass>
@ -60,6 +58,14 @@
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Package PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/> <Package PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>
</PackageDependencies> </PackageDependencies>
<Hobs>
<HobTypes Usage="ALWAYS_PRODUCED" HobGuidCName="gPcdDataBaseHobGuid">
<HobType>GUID_EXTENSION</HobType>
</HobTypes>
<HobTypes Usage="ALWAYS_PRODUCED" HobGuidCName="gPcdPeiCallbackFnTableHobGuid">
<HobType>GUID_EXTENSION</HobType>
</HobTypes>
</Hobs>
<PPIs> <PPIs>
<Ppi Usage="ALWAYS_PRODUCED"> <Ppi Usage="ALWAYS_PRODUCED">
<PpiCName>gPcdPpiGuid</PpiCName> <PpiCName>gPcdPpiGuid</PpiCName>
@ -68,14 +74,6 @@
<PpiCName>gEfiPeiReadOnlyVariablePpiGuid</PpiCName> <PpiCName>gEfiPeiReadOnlyVariablePpiGuid</PpiCName>
</Ppi> </Ppi>
</PPIs> </PPIs>
<Guids>
<GuidCNames Usage="ALWAYS_CONSUMED">
<GuidCName>gPcdDataBaseHobGuid</GuidCName>
</GuidCNames>
<GuidCNames Usage="ALWAYS_CONSUMED">
<GuidCName>gPcdPeiCallbackFnTableHobGuid</GuidCName>
</GuidCNames>
</Guids>
<Externs> <Externs>
<PcdIsDriver>PEI_PCD_DRIVER</PcdIsDriver> <PcdIsDriver>PEI_PCD_DRIVER</PcdIsDriver>
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification> <Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>

View File

@ -6461,9 +6461,10 @@
<Instance ModuleGuid="52af22ae-9901-4484-8cdc-622dd5838b09" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="52af22ae-9901-4484-8cdc-622dd5838b09" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="50bcb105-6634-441d-b403-659110a03ad2" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>
<Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<!--Pkg: MdePkg Mod: BasePrintLib Path: MdePkg\Library\BasePrintLib\BasePrintLib.msa-->
<Instance ModuleGuid="a86fbfca-0183-4eeb-aa8a-762e3b7da1f3" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
</Libraries> </Libraries>
<PcdBuildDefinition> <PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD"> <PcdData ItemType="FIXED_AT_BUILD">

View File

@ -6445,9 +6445,10 @@
<Instance ModuleGuid="52af22ae-9901-4484-8cdc-622dd5838b09" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="52af22ae-9901-4484-8cdc-622dd5838b09" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="50bcb105-6634-441d-b403-659110a03ad2" PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>
<Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/> <Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<!--Pkg: MdePkg Mod: BasePrintLib Path: MdePkg\Library\BasePrintLib\BasePrintLib.msa-->
<Instance ModuleGuid="a86fbfca-0183-4eeb-aa8a-762e3b7da1f3" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
</Libraries> </Libraries>
<PcdBuildDefinition> <PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD"> <PcdData ItemType="FIXED_AT_BUILD">