From 188e4e8444bdc69e2f6c65e90c35956eb01cd4b3 Mon Sep 17 00:00:00 2001 From: mdkinney Date: Fri, 29 Jan 2010 23:39:48 +0000 Subject: Remove unnecessary use of FixedPcdxxx() functions and [FixedPcd] INF sections. These should only be used for PCDs that are used to pre-init global variables, pre-init global structures, or size arrays. Do some minor clean ups to INF files git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9868 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/PCD/Dxe/Pcd.inf | 6 +++--- MdeModulePkg/Universal/PCD/Dxe/Service.c | 2 +- MdeModulePkg/Universal/PCD/Pei/Pcd.inf | 6 +++--- MdeModulePkg/Universal/PCD/Pei/Service.c | 12 ++++++------ 4 files changed, 13 insertions(+), 13 deletions(-) (limited to 'MdeModulePkg/Universal/PCD') diff --git a/MdeModulePkg/Universal/PCD/Dxe/Pcd.inf b/MdeModulePkg/Universal/PCD/Dxe/Pcd.inf index 5e5bacbcfc..e3739aae57 100644 --- a/MdeModulePkg/Universal/PCD/Dxe/Pcd.inf +++ b/MdeModulePkg/Universal/PCD/Dxe/Pcd.inf @@ -276,7 +276,7 @@ # - Variable GUID for HII type PCD # - Token space GUID for dynamicex type PCD # -# Copyright (c) 2006 - 2009, Intel Corporation +# Copyright (c) 2006 - 2010, 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 @@ -303,7 +303,7 @@ # VALID_ARCHITECTURES = IA32 X64 IPF EBC # -[Sources.common] +[Sources] Pcd.c Service.c Service.h @@ -331,7 +331,7 @@ gPcdProtocolGuid ## PRODUCES gEfiPcdProtocolGuid ## PRODUCES -[FixedPcd.common] +[Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress [Depex] diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.c b/MdeModulePkg/Universal/PCD/Dxe/Service.c index 1999ac6cc4..5cd9eb8ce5 100644 --- a/MdeModulePkg/Universal/PCD/Dxe/Service.c +++ b/MdeModulePkg/Universal/PCD/Dxe/Service.c @@ -119,7 +119,7 @@ GetWorker ( switch (LocalTokenNumber & PCD_TYPE_ALL_SET) { case PCD_TYPE_VPD: VpdHead = (VPD_HEAD *) ((UINT8 *) PcdDb + Offset); - RetPtr = (VOID *) (UINTN) (FixedPcdGet32(PcdVpdBaseAddress) + VpdHead->Offset); + RetPtr = (VOID *) (UINTN) (PcdGet32 (PcdVpdBaseAddress) + VpdHead->Offset); break; case PCD_TYPE_HII: diff --git a/MdeModulePkg/Universal/PCD/Pei/Pcd.inf b/MdeModulePkg/Universal/PCD/Pei/Pcd.inf index fc39290911..103965996b 100644 --- a/MdeModulePkg/Universal/PCD/Pei/Pcd.inf +++ b/MdeModulePkg/Universal/PCD/Pei/Pcd.inf @@ -271,7 +271,7 @@ # - Variable GUID for HII type PCD # - Token space GUID for dynamicex type PCD # -# Copyright (c) 2006 - 2009, Intel Corporation +# Copyright (c) 2006 - 2010, 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 @@ -298,7 +298,7 @@ # VALID_ARCHITECTURES = IA32 X64 IPF EBC (EBC is for build only) # -[Sources.common] +[Sources] Service.c Service.h Pcd.c @@ -328,7 +328,7 @@ [FeaturePcd] gEfiMdeModulePkgTokenSpaceGuid.PcdPeiFullPcdDatabaseEnable -[FixedPcd] +[Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress gEfiMdeModulePkgTokenSpaceGuid.PcdMaxPeiPcdCallBackNumberPerPcdEntry || PcdPeiFullPcdDatabaseEnable diff --git a/MdeModulePkg/Universal/PCD/Pei/Service.c b/MdeModulePkg/Universal/PCD/Pei/Service.c index 135d3dd397..ec91699182 100644 --- a/MdeModulePkg/Universal/PCD/Pei/Service.c +++ b/MdeModulePkg/Universal/PCD/Pei/Service.c @@ -87,13 +87,13 @@ PeiRegisterCallBackWorker ( ASSERT (GuidHob != NULL); CallbackTable = GET_GUID_HOB_DATA (GuidHob); - CallbackTable = CallbackTable + (TokenNumber * FixedPcdGet32(PcdMaxPeiPcdCallBackNumberPerPcdEntry)); + CallbackTable = CallbackTable + (TokenNumber * PcdGet32 (PcdMaxPeiPcdCallBackNumberPerPcdEntry)); Compare = Register? NULL: CallBackFunction; Assign = Register? CallBackFunction: NULL; - for (Idx = 0; Idx < FixedPcdGet32(PcdMaxPeiPcdCallBackNumberPerPcdEntry); Idx++) { + for (Idx = 0; Idx < PcdGet32 (PcdMaxPeiPcdCallBackNumberPerPcdEntry); Idx++) { if (CallbackTable[Idx] == Compare) { CallbackTable[Idx] = Assign; return EFI_SUCCESS; @@ -126,7 +126,7 @@ BuildPcdDatabase ( CopyMem (&Database->Init, &gPEIPcdDbInit, sizeof (gPEIPcdDbInit)); - SizeOfCallbackFnTable = PEI_LOCAL_TOKEN_NUMBER * sizeof (PCD_PPI_CALLBACK) * FixedPcdGet32(PcdMaxPeiPcdCallBackNumberPerPcdEntry); + SizeOfCallbackFnTable = PEI_LOCAL_TOKEN_NUMBER * sizeof (PCD_PPI_CALLBACK) * PcdGet32 (PcdMaxPeiPcdCallBackNumberPerPcdEntry); CallbackFnTable = BuildGuidHob (&gEfiCallerIdGuid, SizeOfCallbackFnTable); @@ -300,9 +300,9 @@ InvokeCallbackOnSet ( CallbackTable = GET_GUID_HOB_DATA (GuidHob); - CallbackTable += (TokenNumber * FixedPcdGet32(PcdMaxPeiPcdCallBackNumberPerPcdEntry)); + CallbackTable += (TokenNumber * PcdGet32 (PcdMaxPeiPcdCallBackNumberPerPcdEntry)); - for (Idx = 0; Idx < FixedPcdGet32(PcdMaxPeiPcdCallBackNumberPerPcdEntry); Idx++) { + for (Idx = 0; Idx < PcdGet32 (PcdMaxPeiPcdCallBackNumberPerPcdEntry); Idx++) { if (CallbackTable[Idx] != NULL) { CallbackTable[Idx] (Guid, (Guid == NULL)? TokenNumber: ExTokenNumber, @@ -621,7 +621,7 @@ GetWorker ( { VPD_HEAD *VpdHead; VpdHead = (VPD_HEAD *) ((UINT8 *)PeiPcdDb + Offset); - return (VOID *) (UINTN) (FixedPcdGet32(PcdVpdBaseAddress) + VpdHead->Offset); + return (VOID *) (UINTN) (PcdGet32 (PcdVpdBaseAddress) + VpdHead->Offset); } case PCD_TYPE_HII: -- cgit v1.2.3