From: lgao4 Date: Mon, 9 Apr 2007 07:37:43 +0000 (+0000) Subject: Clean up the following module msa files, they are three networt and two PCD modules. X-Git-Tag: edk2-stable201903~23346 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=26aa0c2ff5254864bb117f172dce4ed3fe2be6be 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 --- diff --git a/EdkModulePkg/EdkModulePkg.fpd b/EdkModulePkg/EdkModulePkg.fpd index 71db2f38c6..2e7e9344d8 100644 --- a/EdkModulePkg/EdkModulePkg.fpd +++ b/EdkModulePkg/EdkModulePkg.fpd @@ -2976,9 +2976,10 @@ - + + @@ -8419,9 +8420,10 @@ - + + @@ -12968,9 +12970,10 @@ - + + diff --git a/EdkModulePkg/Universal/Network/PxeBc/Dxe/BC.msa b/EdkModulePkg/Universal/Network/PxeBc/Dxe/BC.msa index 40a44cbb2e..2b38f7546f 100644 --- a/EdkModulePkg/Universal/Network/PxeBc/Dxe/BC.msa +++ b/EdkModulePkg/Universal/Network/PxeBc/Dxe/BC.msa @@ -6,8 +6,8 @@ A3f436EA-A127-4EF8-957C-8048606FF670 1.0 Component description file for BC module. - This module provides basic network capability. - Copyright (c) 2006, Intel Corporation + This module provides PXE basic network capability and start EfiPxeBaseCodeProtocol. + Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -22,8 +22,9 @@ BC - + DebugLib + Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg. UefiDriverModelLib @@ -37,8 +38,9 @@ BaseLib - + PrintLib + Recommended libary Instance is BasePrintLib instance in MdePkg. BaseMemoryLib @@ -65,36 +67,35 @@ Bc.h ip.h ComponentName.c - Print.c - - gEfiBisProtocolGuid + + gEfiPxeBaseCodeProtocolGuid gEfiLoadFileProtocolGuid - - gEfiPxeBaseCodeCallbackProtocolGuid - + + gEfiBisProtocolGuid + gEfiSimpleNetworkProtocolGuid - gEfiDevicePathProtocolGuid - - gEfiNetworkInterfaceIdentifierProtocolGuid - + gEfiNetworkInterfaceIdentifierProtocolGuid_31 - - gEfiPxeBaseCodeProtocolGuid + + gEfiDevicePathProtocolGuid + + + gEfiPxeBaseCodeCallbackProtocolGuid @@ -102,11 +103,6 @@ gEfiSmbiosTableGuid - - - gEfiSmbiosTableGuid - - EFI_SPECIFICATION_VERSION 0x00020000 EDK_RELEASE_VERSION 0x00020000 diff --git a/EdkModulePkg/Universal/Network/PxeBc/Dxe/Bc.h b/EdkModulePkg/Universal/Network/PxeBc/Dxe/Bc.h index ba32dee45b..2689e2a9ad 100644 --- a/EdkModulePkg/Universal/Network/PxeBc/Dxe/Bc.h +++ b/EdkModulePkg/Universal/Network/PxeBc/Dxe/Bc.h @@ -411,14 +411,6 @@ PxeBcLibGetSmbiosSystemGuidAndSerialNumber ( ) ; -UINTN -EFIAPI -AsciiPrint ( - IN CONST CHAR8 *Format, - ... - ) -; - // // Define SMBIOS tables. // diff --git a/EdkModulePkg/Universal/Network/PxeBc/Dxe/bc.c b/EdkModulePkg/Universal/Network/PxeBc/Dxe/bc.c index 4444b20d00..ec2099eb7a 100644 --- a/EdkModulePkg/Universal/Network/PxeBc/Dxe/bc.c +++ b/EdkModulePkg/Universal/Network/PxeBc/Dxe/bc.c @@ -822,7 +822,7 @@ Returns: return NULL; } - if (BisHandleCount != sizeof BisHandleBuffer) { + if (BisHandleCount != sizeof (BisHandleBuffer)) { // // This really should never happen, but I am paranoid. // @@ -1186,7 +1186,6 @@ BcStart ( { EFI_SIMPLE_NETWORK_PROTOCOL *SnpPtr; EFI_SIMPLE_NETWORK_MODE *SnpModePtr; - EFI_STATUS Status; EFI_STATUS StatCode; PXE_BASECODE_DEVICE *Private; @@ -1364,54 +1363,34 @@ BcStart ( // // Allocate Tx/Rx buffers // - Status = gBS->AllocatePool ( - EfiBootServicesData, - BUFFER_ALLOCATE_SIZE, - (VOID **) &Private->TransmitBufferPtr - ); - - if (!EFI_ERROR (Status)) { - ZeroMem (Private->TransmitBufferPtr, BUFFER_ALLOCATE_SIZE); - } else { + Private->TransmitBufferPtr = AllocateZeroPool (BUFFER_ALLOCATE_SIZE); + if (Private->TransmitBufferPtr == NULL) { DEBUG ((EFI_D_NET, "\nBcStart() Could not alloc TxBuf.\n")); EfiReleaseLock (&Private->Lock); return EFI_OUT_OF_RESOURCES; } - Status = gBS->AllocatePool ( - EfiBootServicesData, - BUFFER_ALLOCATE_SIZE, - (VOID **) &Private->ReceiveBufferPtr - ); - - if (!EFI_ERROR (Status)) { - ZeroMem (Private->ReceiveBufferPtr, BUFFER_ALLOCATE_SIZE); - } else { + Private->ReceiveBufferPtr = AllocateZeroPool (BUFFER_ALLOCATE_SIZE); + if (Private->ReceiveBufferPtr == NULL) { DEBUG ((EFI_D_NET, "\nBcStart() Could not alloc RxBuf.\n")); - gBS->FreePool (Private->TransmitBufferPtr); + FreePool (Private->TransmitBufferPtr); EfiReleaseLock (&Private->Lock); return EFI_OUT_OF_RESOURCES; } - Status = gBS->AllocatePool ( - EfiBootServicesData, - 256, - (VOID **) &Private->TftpErrorBuffer - ); - - if (EFI_ERROR (Status)) { - gBS->FreePool (Private->ReceiveBufferPtr); - gBS->FreePool (Private->TransmitBufferPtr); + Private->TftpErrorBuffer = AllocatePool (256); + if (Private->TftpErrorBuffer == NULL) { + FreePool (Private->ReceiveBufferPtr); + FreePool (Private->TransmitBufferPtr); EfiReleaseLock (&Private->Lock); return EFI_OUT_OF_RESOURCES; } - Status = gBS->AllocatePool (EfiBootServicesData, 256, (VOID **) &Private->TftpAckBuffer); - - if (EFI_ERROR (Status)) { - gBS->FreePool (Private->TftpErrorBuffer); - gBS->FreePool (Private->ReceiveBufferPtr); - gBS->FreePool (Private->TransmitBufferPtr); + Private->TftpAckBuffer = AllocatePool (256); + if (Private->TftpAckBuffer == NULL) { + FreePool (Private->TftpErrorBuffer); + FreePool (Private->ReceiveBufferPtr); + FreePool (Private->TransmitBufferPtr); EfiReleaseLock (&Private->Lock); return EFI_OUT_OF_RESOURCES; } @@ -1546,27 +1525,27 @@ BcStop ( } if (Private->TransmitBufferPtr != NULL) { - gBS->FreePool (Private->TransmitBufferPtr); + FreePool (Private->TransmitBufferPtr); Private->TransmitBufferPtr = NULL; } if (Private->ReceiveBufferPtr != NULL) { - gBS->FreePool (Private->ReceiveBufferPtr); + FreePool (Private->ReceiveBufferPtr); Private->ReceiveBufferPtr = NULL; } if (Private->ArpBuffer != NULL) { - gBS->FreePool (Private->ArpBuffer); + FreePool (Private->ArpBuffer); Private->ArpBuffer = NULL; } if (Private->TftpErrorBuffer != NULL) { - gBS->FreePool (Private->TftpErrorBuffer); + FreePool (Private->TftpErrorBuffer); Private->TftpErrorBuffer = NULL; } if (Private->TftpAckBuffer != NULL) { - gBS->FreePool (Private->TftpAckBuffer); + FreePool (Private->TftpAckBuffer); Private->TftpAckBuffer = NULL; } @@ -2118,46 +2097,26 @@ PxeBcDriverStart ( // // Allocate structures needed by BaseCode and LoadFile protocols. // - Status = gBS->AllocatePool ( - EfiBootServicesData, - sizeof (PXE_BASECODE_DEVICE), - (VOID **) &Private - ); + Private = AllocateZeroPool (sizeof (PXE_BASECODE_DEVICE)); - if (!EFI_ERROR (Status)) { - ZeroMem (Private, sizeof (PXE_BASECODE_DEVICE)); - } else { + if (Private == NULL ) { DEBUG ((EFI_D_NET, "\nBcNotifySnp() Could not alloc PXE_BASECODE_DEVICE structure.\n")); - return Status; + return EFI_OUT_OF_RESOURCES; } - Status = gBS->AllocatePool ( - EfiBootServicesData, - sizeof (LOADFILE_DEVICE), - (VOID **) &pLF - ); - - if (!EFI_ERROR (Status)) { - ZeroMem (pLF, sizeof (LOADFILE_DEVICE)); - } else { + pLF = AllocateZeroPool (sizeof (LOADFILE_DEVICE)); + if (pLF == NULL) { DEBUG ((EFI_D_NET, "\nBcNotifySnp() Could not alloc LOADFILE_DEVICE structure.\n")); - gBS->FreePool (Private); - return Status; + FreePool (Private); + return EFI_OUT_OF_RESOURCES; } - Status = gBS->AllocatePool ( - EfiBootServicesData, - 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 { + Private->EfiBc.Mode = AllocateZeroPool (sizeof (EFI_PXE_BASE_CODE_MODE)); + if (Private->EfiBc.Mode == NULL) { DEBUG ((EFI_D_NET, "\nBcNotifySnp() Could not alloc Mode structure.\n")); - gBS->FreePool (Private); - gBS->FreePool (pLF); - return Status; + FreePool (Private); + FreePool (pLF); + return EFI_OUT_OF_RESOURCES; } // // Lock access, just in case @@ -2298,9 +2257,9 @@ PxeBcDriverStart ( return Status; PxeBcError: ; - gBS->FreePool (Private->EfiBc.Mode); - gBS->FreePool (Private); - gBS->FreePool (pLF); + FreePool (Private->EfiBc.Mode); + FreePool (Private); + FreePool (pLF); return Status; } @@ -2370,9 +2329,9 @@ PxeBcDriverStop ( Controller ); - gBS->FreePool (LoadDevice->Private->EfiBc.Mode); - gBS->FreePool (LoadDevice->Private); - gBS->FreePool (LoadDevice); + FreePool (LoadDevice->Private->EfiBc.Mode); + FreePool (LoadDevice->Private); + FreePool (LoadDevice); } return Status; diff --git a/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_arp.c b/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_arp.c index 15a056a95e..b7edbe69a8 100644 --- a/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_arp.c +++ b/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_arp.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -340,7 +340,6 @@ Returns: EFI_PXE_BASE_CODE_MODE *PxeBcMode; EFI_SIMPLE_NETWORK_MODE *SnpMode; ARP_PACKET *ArpPacket; - EFI_STATUS Status; UINTN HardwareAddrLength; UINT8 *SrcProtocolAddrPtr; UINT8 *DestHardwareAddrptr; @@ -357,14 +356,9 @@ Returns: // Allocate ARP buffer // if (Private->ArpBuffer == NULL) { - Status = gBS->AllocatePool ( - EfiBootServicesData, - SnpMode->MediaHeaderSize + sizeof (ARP_PACKET), - (VOID **) &Private->ArpBuffer - ); - - if (EFI_ERROR (Status)) { - return Status; + Private->ArpBuffer = AllocatePool (SnpMode->MediaHeaderSize + sizeof (ARP_PACKET)); + if (Private->ArpBuffer == NULL) { + return EFI_OUT_OF_RESOURCES; } } diff --git a/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_dhcp.c b/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_dhcp.c index 2e22fc5a35..56893bce2f 100644 --- a/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_dhcp.c +++ b/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_dhcp.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -2223,12 +2223,12 @@ FreeMem ( ) { if (Private->TransmitBuffer != NULL) { - gBS->FreePool (Private->TransmitBuffer); + FreePool (Private->TransmitBuffer); Private->TransmitBuffer = NULL; } if (Private->ReceiveBuffers != NULL) { - gBS->FreePool (Private->ReceiveBuffers); + FreePool (Private->ReceiveBuffers); Private->ReceiveBuffers = NULL; } } @@ -2240,48 +2240,29 @@ GetMem ( PXE_BASECODE_DEVICE *Private ) { - EFI_STATUS Status; if (Private->DhcpPacketBuffer == NULL) { - Status = gBS->AllocatePool ( - EfiBootServicesData, - sizeof (DHCP_RECEIVE_BUFFER) * (PXE_BIS_INDEX + 1), - &Private->DhcpPacketBuffer - ); - - if (EFI_ERROR (Status) || Private->DhcpPacketBuffer == NULL) { - Private->DhcpPacketBuffer = NULL; + Private->DhcpPacketBuffer = AllocatePool (sizeof (DHCP_RECEIVE_BUFFER) * (PXE_BIS_INDEX + 1)); + if (Private->DhcpPacketBuffer == NULL) { FreeMem (Private); return FALSE; } } - Status = gBS->AllocatePool ( - EfiBootServicesData, - sizeof (EFI_PXE_BASE_CODE_PACKET), - &Private->TransmitBuffer - ); - - if (EFI_ERROR (Status) || Private->TransmitBuffer == NULL) { - gBS->FreePool (Private->DhcpPacketBuffer); + Private->TransmitBuffer = AllocatePool (sizeof (EFI_PXE_BASE_CODE_PACKET)); + if (Private->TransmitBuffer == NULL) { + FreePool (Private->DhcpPacketBuffer); Private->DhcpPacketBuffer = NULL; - Private->TransmitBuffer = NULL; FreeMem (Private); return FALSE; } - Status = gBS->AllocatePool ( - EfiBootServicesData, - sizeof (DHCP_RECEIVE_BUFFER) * (MAX_OFFERS), - &Private->ReceiveBuffers - ); - - if (EFI_ERROR (Status) || Private->ReceiveBuffers == NULL) { - gBS->FreePool (Private->TransmitBuffer); - gBS->FreePool (Private->DhcpPacketBuffer); + Private->ReceiveBuffers = AllocatePool (sizeof (DHCP_RECEIVE_BUFFER) * (MAX_OFFERS)); + if (Private->ReceiveBuffers == NULL) { + FreePool (Private->TransmitBuffer); + FreePool (Private->DhcpPacketBuffer); Private->DhcpPacketBuffer = NULL; Private->TransmitBuffer = NULL; - Private->ReceiveBuffers = NULL; FreeMem (Private); return FALSE; } @@ -2920,7 +2901,6 @@ Returns: PXE_SERVER_LISTS DefaultSrvList; PXE_SERVER_LISTS *ServerListPtr; PXE_SERVER_LISTS *McastServerListPtr; - EFI_STATUS Status; UNION_PTR LocalPtr; UINTN Index; UINTN Index2; @@ -3120,14 +3100,11 @@ Returns: } if (ServerListPtr == NULL) { - Status = gBS->AllocatePool ( - EfiBootServicesData, - sizeof (PXEV4_SERVER_LIST) + (Index2 - 1) * sizeof (EFI_IPv4_ADDRESS), - (VOID **) &ServerListPtr + ServerListPtr = AllocatePool ( + sizeof (PXEV4_SERVER_LIST) + (Index2 - 1) * sizeof (EFI_IPv4_ADDRESS) ); - if (EFI_ERROR (Status) || ServerListPtr == NULL) { - ServerListPtr = NULL; + if (ServerListPtr == NULL) { EfiReleaseLock (&Private->Lock); return EFI_OUT_OF_RESOURCES; } @@ -3173,7 +3150,7 @@ Returns: ); if (AcquiredSrvList) { - gBS->FreePool (ServerListPtr); + FreePool (ServerListPtr); } FreeMem (Private); @@ -3219,7 +3196,6 @@ Returns: --*/ { EFI_PXE_BASE_CODE_MODE *PxebcMode; - EFI_STATUS Status; PXE_BASECODE_DEVICE *Private; // @@ -3249,14 +3225,8 @@ Returns: PxebcMode = Private->EfiBc.Mode; if (Private->DhcpPacketBuffer == NULL) { - Status = gBS->AllocatePool ( - EfiBootServicesData, - sizeof (DHCP_RECEIVE_BUFFER) * (PXE_BIS_INDEX + 1), - &Private->DhcpPacketBuffer - ); - - if (EFI_ERROR (Status) || Private->DhcpPacketBuffer == NULL) { - Private->DhcpPacketBuffer = NULL; + Private->DhcpPacketBuffer = AllocatePool (sizeof (DHCP_RECEIVE_BUFFER) * (PXE_BIS_INDEX + 1)); + if (Private->DhcpPacketBuffer == NULL) { EfiReleaseLock (&Private->Lock); return EFI_OUT_OF_RESOURCES; } diff --git a/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_mtftp.c b/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_mtftp.c index a937958468..941076aed0 100644 --- a/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_mtftp.c +++ b/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_mtftp.c @@ -1963,7 +1963,6 @@ Returns: { EFI_PXE_BASE_CODE_IP_FILTER Filter; EFI_STATUS StatCode; - EFI_STATUS Status; UINT64 BufferSizeLocal; UINTN PacketSize; UINT8 *BufferPtrLocal; @@ -2082,13 +2081,8 @@ Returns: } if (DontUseBuffer) { - Status = gBS->AllocatePool ( - EfiBootServicesData, - BUFFER_ALLOCATE_SIZE, - (VOID **) &BufferPtrLocal - ); - - if (EFI_ERROR (Status) || BufferPtrLocal == NULL) { + BufferPtrLocal = AllocatePool (BUFFER_ALLOCATE_SIZE); + if (BufferPtrLocal == NULL) { DEBUG ((EFI_D_NET, "\nPxeBcMtftp() Exit #4")); return EFI_OUT_OF_RESOURCES; } @@ -2267,7 +2261,7 @@ Returns: } if (DontUseBuffer) { - gBS->FreePool (BufferPtrLocal); + FreePool (BufferPtrLocal); } if (StatCode != EFI_SUCCESS) { diff --git a/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_loadfile.c b/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_loadfile.c index 6659bc4022..3dceefb945 100644 --- a/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_loadfile.c +++ b/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_loadfile.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -1168,14 +1168,9 @@ Returns: // // Allocate credential file buffer. // - Status = gBS->AllocatePool ( - EfiBootServicesData, - (UINTN) CredentialLen, - &CredentialBuffer - ); - - if (EFI_ERROR (Status)) { - return Status; + CredentialBuffer = AllocatePool ((UINTN) CredentialLen); + if (CredentialBuffer == NULL) { + return EFI_OUT_OF_RESOURCES; } // // Download credential file. @@ -1196,7 +1191,7 @@ Returns: ); if (EFI_ERROR (Status)) { - gBS->FreePool (CredentialBuffer); + FreePool (CredentialBuffer); return Status; } // @@ -1211,7 +1206,7 @@ Returns: Status = EFI_PROTOCOL_ERROR; } - gBS->FreePool (CredentialBuffer); + FreePool (CredentialBuffer); } return Status; diff --git a/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/Dhcp4.msa b/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/Dhcp4.msa index 136738498e..bc8d22b671 100644 --- a/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/Dhcp4.msa +++ b/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/Dhcp4.msa @@ -7,7 +7,7 @@ 1.0 Component description file for Dhcp4 module. This module can produce PxeDhcp4 protocol on ControllerHandle. - Copyright (c) 2006, Intel Corporation + Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -22,8 +22,9 @@ Dhcp4 - + DebugLib + Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg. UefiDriverModelLib @@ -60,18 +61,18 @@ - - gEfiPxeDhcp4CallbackProtocolGuid - gEfiPxeDhcp4ProtocolGuid - - gEfiSimpleNetworkProtocolGuid - gEfiPxeBaseCodeProtocolGuid + + gEfiSimpleNetworkProtocolGuid + + + gEfiPxeDhcp4CallbackProtocolGuid + EFI_SPECIFICATION_VERSION 0x00020000 diff --git a/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4.c b/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4.c index f0e87dba35..565a507cac 100644 --- a/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4.c +++ b/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -155,19 +155,11 @@ PxeDhcp4DriverBindingStart ( // // Initialize the PXE DHCP device instance. // - Status = gBS->AllocatePool ( - EfiBootServicesData, - sizeof (PXE_DHCP4_PRIVATE_DATA), - (VOID **) &Private - ); - - if (EFI_ERROR (Status)) { + Private = AllocateZeroPool (sizeof (PXE_DHCP4_PRIVATE_DATA)); + if (Private == NULL) { + Status = EFI_OUT_OF_RESOURCES; goto error_exit; } - // - // - // - ZeroMem (Private, sizeof (PXE_DHCP4_PRIVATE_DATA)); Private->Signature = PXE_DHCP4_PRIVATE_DATA_SIGNATURE; Private->PxeBc = PxeBc; @@ -263,7 +255,7 @@ PxeDhcp4DriverBindingStop ( // Release allocated resources // if (Private->PxeDhcp4.Data) { - gBS->FreePool (Private->PxeDhcp4.Data); + FreePool (Private->PxeDhcp4.Data); Private->PxeDhcp4.Data = NULL; } // @@ -294,7 +286,7 @@ PxeDhcp4DriverBindingStop ( // // Release our private data // - gBS->FreePool (Private); + FreePool (Private); return Status; } diff --git a/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4InitSelect.c b/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4InitSelect.c index 1b500c57b3..a94f2537e7 100644 --- a/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4InitSelect.c +++ b/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4InitSelect.c @@ -107,13 +107,8 @@ offer_verify ( // // Good DHCP (or BOOTP) packet. Cache it! // - EfiStatus = gBS->AllocatePool ( - EfiBootServicesData, - (Private->offers + 1) * sizeof (DHCP4_PACKET), - (VOID **) &tmp - ); - - if (EFI_ERROR (EfiStatus)) { + tmp = AllocatePool ((Private->offers + 1) * sizeof (DHCP4_PACKET)); + if (tmp == NULL) { return -2; } @@ -126,7 +121,7 @@ offer_verify ( Private->offers * sizeof (DHCP4_PACKET) ); - gBS->FreePool (Private->offer_list); + FreePool (Private->offer_list); } CopyMem (&tmp[Private->offers++], rx_pkt, sizeof (DHCP4_PACKET)); @@ -388,7 +383,7 @@ PxeDhcp4Init ( if (EFI_ERROR (EfiStatus)) { if (Private->offer_list) { - gBS->FreePool (Private->offer_list); + FreePool (Private->offer_list); } Private->offers = 0; diff --git a/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4Release.c b/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4Release.c index 6086e55eba..4bbc8a832e 100644 --- a/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4Release.c +++ b/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4Release.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -65,7 +65,7 @@ PxeDhcp4Release ( // packet, just release storage and return. // if (This->Data->IsBootp || !This->Data->IsAck) { - gBS->FreePool (This->Data); + FreePool (This->Data); This->Data = NULL; if (Private->StopPxeBc) { @@ -96,7 +96,7 @@ PxeDhcp4Release ( ); if (EFI_ERROR (efi_status)) { - gBS->FreePool (This->Data); + FreePool (This->Data); This->Data = NULL; if (Private->StopPxeBc) { @@ -107,7 +107,7 @@ PxeDhcp4Release ( } if (op->len != 4) { - gBS->FreePool (This->Data); + FreePool (This->Data); This->Data = NULL; if (Private->StopPxeBc) { @@ -139,7 +139,7 @@ PxeDhcp4Release ( ); if (EFI_ERROR (efi_status)) { - gBS->FreePool (This->Data); + FreePool (This->Data); This->Data = NULL; if (Private->StopPxeBc) { @@ -150,7 +150,7 @@ PxeDhcp4Release ( } if (op->len != 4) { - gBS->FreePool (This->Data); + FreePool (This->Data); This->Data = NULL; if (Private->StopPxeBc) { @@ -181,7 +181,7 @@ PxeDhcp4Release ( efi_status = start_udp (Private, &client_ip, &subnet_mask); if (EFI_ERROR (efi_status)) { - gBS->FreePool (This->Data); + FreePool (This->Data); This->Data = NULL; if (Private->StopPxeBc) { @@ -233,7 +233,7 @@ PxeDhcp4Release ( // stop_udp (Private); - gBS->FreePool (This->Data); + FreePool (This->Data); This->Data = NULL; if (Private->StopPxeBc) { diff --git a/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4Run.c b/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4Run.c index 8e015b2a3d..4f7ce44a01 100644 --- a/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4Run.c +++ b/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4Run.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -164,7 +164,7 @@ PxeDhcp4Run ( // No DHCP Acks. Release DHCP Offer list storage. // if (offer_list != NULL) { - gBS->FreePool (offer_list); + FreePool (offer_list); offer_list = NULL; } // diff --git a/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4Setup.c b/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4Setup.c index 09ba041ea6..88a66d5a53 100644 --- a/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4Setup.c +++ b/EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4Setup.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -117,17 +117,7 @@ PxeDhcp4Setup ( // Allocate data structure. Return error // if there is not enough available memory. // - EfiStatus = gBS->AllocatePool ( - EfiBootServicesData, - sizeof (EFI_PXE_DHCP4_DATA), - (VOID **) &This->Data - ); - - if (EFI_ERROR (EfiStatus)) { - This->Data = NULL; - return EfiStatus; - } - + This->Data = AllocatePool (sizeof (EFI_PXE_DHCP4_DATA)); if (This->Data == NULL) { return EFI_OUT_OF_RESOURCES; } @@ -139,7 +129,7 @@ PxeDhcp4Setup ( if (EFI_ERROR (EfiStatus)) { if (EfiStatus != EFI_ALREADY_STARTED) { - gBS->FreePool (This->Data); + FreePool (This->Data); This->Data = NULL; Private->PxeBc->Stop (Private->PxeBc); return EfiStatus; diff --git a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/SNP.msa b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/SNP.msa index 24c05a4f11..c3ec2043cc 100644 --- a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/SNP.msa +++ b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/SNP.msa @@ -7,7 +7,7 @@ 1.0 Component description file for SNP module. This module attachs the SNP interface to UNDI layer that it finds on the given handle! - Copyright (c) 2006, Intel Corporation + Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -22,8 +22,9 @@ SNP - + DebugLib + Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg. UefiDriverModelLib @@ -69,7 +70,6 @@ - @@ -81,11 +81,12 @@ gEfiDevicePathProtocolGuid - + gEfiNetworkInterfaceIdentifierProtocolGuid gEfiNetworkInterfaceIdentifierProtocolGuid_31 + This module first look for 3.1 undi, if it is not there then look for 3.0 undi. diff --git a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/snp.c b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/snp.c index 4b6cda9b1e..a32812a01a 100644 --- a/EdkModulePkg/Universal/Network/Snp32_64/Dxe/snp.c +++ b/EdkModulePkg/Universal/Network/Snp32_64/Dxe/snp.c @@ -1,5 +1,5 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -1081,14 +1081,9 @@ Returns: return EFI_INVALID_PARAMETER; } - Status = gBS->AllocatePool ( - EfiBootServicesData, - sizeof (struct s_v2p), - (VOID **) v2p - ); - - if (Status != EFI_SUCCESS) { - return Status; + *v2p = AllocatePool (sizeof (struct s_v2p)); + if (*v2p != NULL) { + return EFI_OUT_OF_RESOURCES; } Status = mPciIoFncs->Map ( @@ -1100,7 +1095,7 @@ Returns: &(*v2p)->unmap ); if (Status != EFI_SUCCESS) { - gBS->FreePool (*v2p); + FreePool (*v2p); return Status; } (*v2p)->vaddr = vaddr; @@ -1189,7 +1184,7 @@ Returns: Status = mPciIoFncs->Unmap (mPciIoFncs, v->unmap); - gBS->FreePool (v); + FreePool (v); if (Status) { DEBUG ((EFI_D_ERROR, "Unmap failed with status = %x\n", Status)); @@ -1201,7 +1196,7 @@ Returns: if ((t = v->next)->vaddr == vaddr) { v->next = t->next; Status = mPciIoFncs->Unmap (mPciIoFncs, t->unmap); - gBS->FreePool (t); + FreePool (t); if (Status) { DEBUG ((EFI_D_ERROR, "Unmap failed with status = %x\n", Status)); diff --git a/EdkModulePkg/Universal/PCD/Dxe/Pcd.dxs b/EdkModulePkg/Universal/PCD/Dxe/Pcd.dxs index d65291b091..860153705b 100644 --- a/EdkModulePkg/Universal/PCD/Dxe/Pcd.dxs +++ b/EdkModulePkg/Universal/PCD/Dxe/Pcd.dxs @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -19,7 +19,6 @@ Abstract: --*/ -#include #include DEPENDENCY_START diff --git a/EdkModulePkg/Universal/PCD/Dxe/Pcd.msa b/EdkModulePkg/Universal/PCD/Dxe/Pcd.msa index 8a51496536..d920f68e92 100644 --- a/EdkModulePkg/Universal/PCD/Dxe/Pcd.msa +++ b/EdkModulePkg/Universal/PCD/Dxe/Pcd.msa @@ -7,7 +7,7 @@ 1.0 Component description file for PCD service DXE driver. This DXE driver implement and produce the PCD protocol. - Copyright (c) 2006, Intel Corporation + Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -25,11 +25,9 @@ BaseLib - + DebugLib - - - HiiLib + Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg. UefiLib @@ -70,15 +68,12 @@ gPcdProtocolGuid - - gEfiVariableArchProtocolGuid - - - - gPcdDataBaseHobGuid - - + + + GUID_EXTENSION + + DXE_PCD_DRIVER EFI_SPECIFICATION_VERSION 0x00020000 diff --git a/EdkModulePkg/Universal/PCD/Pei/Pcd.msa b/EdkModulePkg/Universal/PCD/Pei/Pcd.msa index 62daaf2078..155a576443 100644 --- a/EdkModulePkg/Universal/PCD/Pei/Pcd.msa +++ b/EdkModulePkg/Universal/PCD/Pei/Pcd.msa @@ -6,8 +6,8 @@ 9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50 1.0 Component description file for Pcd Database PEIM module - This DXE driver implement and produce the PCD PPI. - Copyright (c) 2006, Intel Corporation + This PEIM driver implement and produce PCD PPI. + Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -22,8 +22,9 @@ PcdPeim - + DebugLib + Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg. PeimEntryPoint @@ -43,9 +44,6 @@ PeiServicesTablePointerLib - - MemoryAllocationLib - BaseMemoryLib @@ -60,6 +58,14 @@ + + + GUID_EXTENSION + + + GUID_EXTENSION + + gPcdPpiGuid @@ -68,14 +74,6 @@ gEfiPeiReadOnlyVariablePpiGuid - - - gPcdDataBaseHobGuid - - - gPcdPeiCallbackFnTableHobGuid - - PEI_PCD_DRIVER EFI_SPECIFICATION_VERSION 0x00020000 diff --git a/EdkNt32Pkg/Nt32.fpd b/EdkNt32Pkg/Nt32.fpd index e6a618dece..ab4ac4b913 100644 --- a/EdkNt32Pkg/Nt32.fpd +++ b/EdkNt32Pkg/Nt32.fpd @@ -6461,9 +6461,10 @@ - + + diff --git a/EdkUnixPkg/Unix.fpd b/EdkUnixPkg/Unix.fpd index 463eddeadd..b088f7d24c 100644 --- a/EdkUnixPkg/Unix.fpd +++ b/EdkUnixPkg/Unix.fpd @@ -6445,9 +6445,10 @@ - + +