From 8a43e8dd550a3e92238b3c22bb6ea67d41097e86 Mon Sep 17 00:00:00 2001 From: qwang12 Date: Wed, 7 Jun 2006 12:31:33 +0000 Subject: Sync Pcd Service Driver, PEIM and library with MDE Spec 0.55a. 1) change all PCD_TOKEN_NUMBER to UINTN 2) change all SKU_ID to UINTN git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@437 6f19259b-4bc3-4df7-8a09-765794883524 --- EdkModulePkg/Universal/PCD/Dxe/Pcd.c | 64 ++++++++++++------------- EdkModulePkg/Universal/PCD/Dxe/Service.c | 24 +++++----- EdkModulePkg/Universal/PCD/Dxe/Service.h | 80 ++++++++++++++++---------------- EdkModulePkg/Universal/PCD/Pei/Pcd.c | 62 ++++++++++++------------- EdkModulePkg/Universal/PCD/Pei/Service.c | 16 +++---- EdkModulePkg/Universal/PCD/Pei/Service.h | 74 ++++++++++++++--------------- 6 files changed, 160 insertions(+), 160 deletions(-) (limited to 'EdkModulePkg') diff --git a/EdkModulePkg/Universal/PCD/Dxe/Pcd.c b/EdkModulePkg/Universal/PCD/Dxe/Pcd.c index 64191a7161..ffb62256c3 100644 --- a/EdkModulePkg/Universal/PCD/Dxe/Pcd.c +++ b/EdkModulePkg/Universal/PCD/Dxe/Pcd.c @@ -100,10 +100,10 @@ PcdDxeInit ( VOID EFIAPI DxePcdSetSku ( - IN SKU_ID SkuId + IN UINTN SkuId ) { - mPcdDatabase->PeiDb.Init.SystemSkuId = SkuId; + mPcdDatabase->PeiDb.Init.SystemSkuId = (SKU_ID) SkuId; return; } @@ -113,7 +113,7 @@ DxePcdSetSku ( UINT8 EFIAPI DxePcdGet8 ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) { return *((UINT8 *) GetWorker (TokenNumber, sizeof (UINT8))); @@ -124,7 +124,7 @@ DxePcdGet8 ( UINT16 EFIAPI DxePcdGet16 ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) { return ReadUnaligned16 (GetWorker (TokenNumber, sizeof (UINT16))); @@ -135,7 +135,7 @@ DxePcdGet16 ( UINT32 EFIAPI DxePcdGet32 ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) { return ReadUnaligned32 (GetWorker (TokenNumber, sizeof (UINT32))); @@ -146,7 +146,7 @@ DxePcdGet32 ( UINT64 EFIAPI DxePcdGet64 ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) { return ReadUnaligned64(GetWorker (TokenNumber, sizeof (UINT64))); @@ -157,7 +157,7 @@ DxePcdGet64 ( VOID * EFIAPI DxePcdGetPtr ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) { return GetWorker (TokenNumber, 0); @@ -168,7 +168,7 @@ DxePcdGetPtr ( BOOLEAN EFIAPI DxePcdGetBool ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) { return *((BOOLEAN *) GetWorker (TokenNumber, sizeof (BOOLEAN))); @@ -179,7 +179,7 @@ DxePcdGetBool ( UINTN EFIAPI DxePcdGetSize ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) { UINT16 * SizeTable; @@ -199,7 +199,7 @@ UINT8 EFIAPI DxePcdGet8Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber + IN UINTN ExTokenNumber ) { return *((UINT8 *) ExGetWorker (Guid, ExTokenNumber, sizeof(UINT8))); @@ -211,7 +211,7 @@ UINT16 EFIAPI DxePcdGet16Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber + IN UINTN ExTokenNumber ) { return ReadUnaligned16 (ExGetWorker (Guid, ExTokenNumber, sizeof(UINT16))); @@ -223,7 +223,7 @@ UINT32 EFIAPI DxePcdGet32Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber + IN UINTN ExTokenNumber ) { return ReadUnaligned32 (ExGetWorker (Guid, ExTokenNumber, sizeof(UINT32))); @@ -235,7 +235,7 @@ UINT64 EFIAPI DxePcdGet64Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber + IN UINTN ExTokenNumber ) { return ReadUnaligned64 (ExGetWorker (Guid, ExTokenNumber, sizeof(UINT64))); @@ -247,7 +247,7 @@ VOID * EFIAPI DxePcdGetPtrEx ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber + IN UINTN ExTokenNumber ) { return ExGetWorker (Guid, ExTokenNumber, 0); @@ -259,7 +259,7 @@ BOOLEAN EFIAPI DxePcdGetBoolEx ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber + IN UINTN ExTokenNumber ) { return *((BOOLEAN *) ExGetWorker (Guid, ExTokenNumber, sizeof(BOOLEAN))); @@ -271,7 +271,7 @@ UINTN EFIAPI DxePcdGetSizeEx ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber + IN UINTN ExTokenNumber ) { return DxePcdGetSize(GetExPcdTokenNumber (Guid, ExTokenNumber)); @@ -282,7 +282,7 @@ DxePcdGetSizeEx ( EFI_STATUS EFIAPI DxePcdSet8 ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT8 Value ) { @@ -294,7 +294,7 @@ DxePcdSet8 ( EFI_STATUS EFIAPI DxePcdSet16 ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT16 Value ) { @@ -306,7 +306,7 @@ DxePcdSet16 ( EFI_STATUS EFIAPI DxePcdSet32 ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT32 Value ) { @@ -318,7 +318,7 @@ DxePcdSet32 ( EFI_STATUS EFIAPI DxePcdSet64 ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT64 Value ) { @@ -330,7 +330,7 @@ DxePcdSet64 ( EFI_STATUS EFIAPI DxePcdSetPtr ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINTN SizeOfBuffer, IN VOID *Buffer ) @@ -343,7 +343,7 @@ DxePcdSetPtr ( EFI_STATUS EFIAPI DxePcdSetBool ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN BOOLEAN Value ) { @@ -356,7 +356,7 @@ EFI_STATUS EFIAPI DxePcdSet8Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber, + IN UINTN ExTokenNumber, IN UINT8 Value ) { @@ -375,7 +375,7 @@ EFI_STATUS EFIAPI DxePcdSet16Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber, + IN UINTN ExTokenNumber, IN UINT16 Value ) { @@ -394,7 +394,7 @@ EFI_STATUS EFIAPI DxePcdSet32Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber, + IN UINTN ExTokenNumber, IN UINT32 Value ) { @@ -413,7 +413,7 @@ EFI_STATUS EFIAPI DxePcdSet64Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber, + IN UINTN ExTokenNumber, IN UINT64 Value ) { @@ -432,7 +432,7 @@ EFI_STATUS EFIAPI DxePcdSetPtrEx ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber, + IN UINTN ExTokenNumber, IN UINTN SizeOfBuffer, IN VOID *Buffer ) @@ -452,7 +452,7 @@ EFI_STATUS EFIAPI DxePcdSetBoolEx ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber, + IN UINTN ExTokenNumber, IN BOOLEAN Value ) { @@ -471,7 +471,7 @@ DxePcdSetBoolEx ( EFI_STATUS EFIAPI DxeRegisterCallBackOnSet ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN CONST EFI_GUID *Guid, OPTIONAL IN PCD_PROTOCOL_CALLBACK CallBackFunction ) @@ -486,7 +486,7 @@ DxeRegisterCallBackOnSet ( EFI_STATUS EFIAPI DxeUnRegisterCallBackOnSet ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN CONST EFI_GUID *Guid, OPTIONAL IN PCD_PROTOCOL_CALLBACK CallBackFunction ) @@ -502,10 +502,10 @@ EFI_STATUS EFIAPI DxePcdGetNextToken ( IN CONST EFI_GUID *Guid, OPTIONAL - IN OUT PCD_TOKEN_NUMBER *TokenNumber + IN OUT UINTN *TokenNumber ) { - PCD_TOKEN_NUMBER ExTokenNumber; + UINTN ExTokenNumber; // // Scan the local token space diff --git a/EdkModulePkg/Universal/PCD/Dxe/Service.c b/EdkModulePkg/Universal/PCD/Dxe/Service.c index 00437f116c..8cb08dcd7c 100644 --- a/EdkModulePkg/Universal/PCD/Dxe/Service.c +++ b/EdkModulePkg/Universal/PCD/Dxe/Service.c @@ -28,7 +28,7 @@ LIST_ENTRY *mCallbackFnTable; VOID * GetWorker ( - PCD_TOKEN_NUMBER TokenNumber, + UINTN TokenNumber, UINTN GetSize ) { @@ -124,7 +124,7 @@ GetWorker ( EFI_STATUS DxeRegisterCallBackWorker ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN CONST GUID *Guid, OPTIONAL IN PCD_PROTOCOL_CALLBACK CallBackFunction ) @@ -167,7 +167,7 @@ DxeRegisterCallBackWorker ( EFI_STATUS DxeUnRegisterCallBackWorker ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN CONST GUID *Guid, OPTIONAL IN PCD_PROTOCOL_CALLBACK CallBackFunction ) @@ -205,10 +205,10 @@ DxeUnRegisterCallBackWorker ( -PCD_TOKEN_NUMBER +UINTN ExGetNextTokeNumber ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN EFI_GUID *GuidTable, IN UINTN SizeOfGuidTable, IN DYNAMICEX_MAPPING *ExMapTable, @@ -272,7 +272,7 @@ ExGetNextTokeNumber ( VOID BuildPcdDxeDataBase ( VOID -) + ) { PEI_PCD_DATABASE *PeiDatabase; EFI_HOB_GUID_TYPE *GuidHob; @@ -312,7 +312,7 @@ BuildPcdDxeDataBase ( // if (PCD_TOTAL_TOKEN_NUMBER != 0) { - mCallbackFnTable = AllocateZeroPool (PCD_TOTAL_TOKEN_NUMBER); + mCallbackFnTable = AllocateZeroPool (PCD_TOTAL_TOKEN_NUMBER * sizeof (LIST_ENTRY)); } for (Idx = 0; Idx < PCD_TOTAL_TOKEN_NUMBER; Idx++) { @@ -457,7 +457,7 @@ InvokeCallbackOnSet ( EFI_STATUS SetWorker ( - PCD_TOKEN_NUMBER TokenNumber, + UINTN TokenNumber, VOID *Data, UINTN Size, BOOLEAN PtrType @@ -592,14 +592,14 @@ ExGetWorker ( EFI_STATUS ExSetWorker ( - IN PCD_TOKEN_NUMBER ExTokenNumber, + IN UINTN ExTokenNumber, IN CONST EFI_GUID *Guid, VOID *Data, UINTN SetSize, BOOLEAN PtrType ) { - PCD_TOKEN_NUMBER TokenNumber; + UINTN TokenNumber; TokenNumber = GetExPcdTokenNumber (Guid, ExTokenNumber); @@ -669,10 +669,10 @@ SetHiiVariable ( -PCD_TOKEN_NUMBER +UINTN GetExPcdTokenNumber ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber + IN UINTN ExTokenNumber ) { UINT32 i; diff --git a/EdkModulePkg/Universal/PCD/Dxe/Service.h b/EdkModulePkg/Universal/PCD/Dxe/Service.h index af9fc420a3..2784d28891 100644 --- a/EdkModulePkg/Universal/PCD/Dxe/Service.h +++ b/EdkModulePkg/Universal/PCD/Dxe/Service.h @@ -46,7 +46,7 @@ typedef struct { EFI_STATUS SetWorker ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN VOID *Data, IN UINTN Size, IN BOOLEAN PtrType @@ -55,7 +55,7 @@ SetWorker ( EFI_STATUS ExSetWorker ( - IN PCD_TOKEN_NUMBER ExTokenNumber, + IN UINTN ExTokenNumber, IN CONST EFI_GUID *Guid, VOID *Data, UINTN Size, @@ -66,7 +66,7 @@ ExSetWorker ( VOID * GetWorker ( - PCD_TOKEN_NUMBER TokenNumber, + UINTN TokenNumber, UINTN GetSize ) ; @@ -74,7 +74,7 @@ GetWorker ( VOID * ExGetWorker ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber, + IN UINTN ExTokenNumber, IN UINTN GetSize ) ; @@ -98,14 +98,14 @@ GetHiiVariable ( EFI_STATUS DxeRegisterCallBackWorker ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN CONST EFI_GUID *Guid, OPTIONAL IN PCD_PROTOCOL_CALLBACK CallBackFunction ); EFI_STATUS DxeUnRegisterCallBackWorker ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN CONST EFI_GUID *Guid, OPTIONAL IN PCD_PROTOCOL_CALLBACK CallBackFunction ); @@ -116,10 +116,10 @@ BuildPcdDxeDataBase ( ); -PCD_TOKEN_NUMBER +UINTN GetExPcdTokenNumber ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber + IN UINTN ExTokenNumber ) ; // @@ -128,7 +128,7 @@ GetExPcdTokenNumber ( VOID EFIAPI DxePcdSetSku ( - IN SKU_ID SkuId + IN UINTN SkuId ) ; @@ -136,7 +136,7 @@ DxePcdSetSku ( UINT8 EFIAPI DxePcdGet8 ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -144,7 +144,7 @@ DxePcdGet8 ( UINT16 EFIAPI DxePcdGet16 ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -152,7 +152,7 @@ DxePcdGet16 ( UINT32 EFIAPI DxePcdGet32 ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -160,7 +160,7 @@ DxePcdGet32 ( UINT64 EFIAPI DxePcdGet64 ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -168,7 +168,7 @@ DxePcdGet64 ( VOID * EFIAPI DxePcdGetPtr ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -176,7 +176,7 @@ DxePcdGetPtr ( BOOLEAN EFIAPI DxePcdGetBool ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -184,7 +184,7 @@ DxePcdGetBool ( UINTN EFIAPI DxePcdGetSize ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -193,7 +193,7 @@ UINT8 EFIAPI DxePcdGet8Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -202,7 +202,7 @@ UINT16 EFIAPI DxePcdGet16Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -211,7 +211,7 @@ UINT32 EFIAPI DxePcdGet32Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -221,7 +221,7 @@ UINT64 EFIAPI DxePcdGet64Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -231,7 +231,7 @@ VOID * EFIAPI DxePcdGetPtrEx ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -240,7 +240,7 @@ BOOLEAN EFIAPI DxePcdGetBoolEx ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -249,7 +249,7 @@ UINTN EFIAPI DxePcdGetSizeEx ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -257,7 +257,7 @@ DxePcdGetSizeEx ( EFI_STATUS EFIAPI DxePcdSet8 ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT8 Value ) ; @@ -266,7 +266,7 @@ DxePcdSet8 ( EFI_STATUS EFIAPI DxePcdSet16 ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT16 Value ) ; @@ -275,7 +275,7 @@ DxePcdSet16 ( EFI_STATUS EFIAPI DxePcdSet32 ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT32 Value ) ; @@ -284,7 +284,7 @@ DxePcdSet32 ( EFI_STATUS EFIAPI DxePcdSet64 ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT64 Value ) ; @@ -293,7 +293,7 @@ DxePcdSet64 ( EFI_STATUS EFIAPI DxePcdSetPtr ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINTN SizeOfBuffer, IN VOID *Buffer ) @@ -303,7 +303,7 @@ DxePcdSetPtr ( EFI_STATUS EFIAPI DxePcdSetBool ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN BOOLEAN Value ) ; @@ -313,7 +313,7 @@ EFI_STATUS EFIAPI DxePcdSet8Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT8 Value ) ; @@ -323,7 +323,7 @@ EFI_STATUS EFIAPI DxePcdSet16Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT16 Value ) ; @@ -333,7 +333,7 @@ EFI_STATUS EFIAPI DxePcdSet32Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT32 Value ) ; @@ -343,7 +343,7 @@ EFI_STATUS EFIAPI DxePcdSet64Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT64 Value ) ; @@ -353,7 +353,7 @@ EFI_STATUS EFIAPI DxePcdSetPtrEx ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINTN SizeOfBuffer, IN VOID *Buffer ) @@ -364,7 +364,7 @@ EFI_STATUS EFIAPI DxePcdSetBoolEx ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN BOOLEAN Value ) ; @@ -374,7 +374,7 @@ DxePcdSetBoolEx ( EFI_STATUS EFIAPI DxeRegisterCallBackOnSet ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN CONST EFI_GUID *Guid, OPTIONAL IN PCD_PROTOCOL_CALLBACK CallBackFunction ) @@ -384,7 +384,7 @@ DxeRegisterCallBackOnSet ( EFI_STATUS EFIAPI DxeUnRegisterCallBackOnSet ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN CONST EFI_GUID *Guid, OPTIONAL IN PCD_PROTOCOL_CALLBACK CallBackFunction ) @@ -395,14 +395,14 @@ EFI_STATUS EFIAPI DxePcdGetNextToken ( IN CONST EFI_GUID *Guid, OPTIONAL - IN OUT PCD_TOKEN_NUMBER *TokenNumber + IN OUT UINTN *TokenNumber ) ; -PCD_TOKEN_NUMBER +UINTN ExGetNextTokeNumber ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN EFI_GUID *GuidTable, IN UINTN SizeOfGuidTable, IN DYNAMICEX_MAPPING *ExMapTable, diff --git a/EdkModulePkg/Universal/PCD/Pei/Pcd.c b/EdkModulePkg/Universal/PCD/Pei/Pcd.c index 70b229e3a9..52390e404c 100644 --- a/EdkModulePkg/Universal/PCD/Pei/Pcd.c +++ b/EdkModulePkg/Universal/PCD/Pei/Pcd.c @@ -86,11 +86,11 @@ PcdPeimInit ( VOID EFIAPI PeiPcdSetSku ( - IN SKU_ID SkuId + IN UINTN SkuId ) { - GetPcdDatabase()->Init.SystemSkuId = SkuId; + GetPcdDatabase()->Init.SystemSkuId = (SKU_ID) SkuId; return; } @@ -100,7 +100,7 @@ PeiPcdSetSku ( UINT8 EFIAPI PeiPcdGet8 ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) { return *((UINT8 *) GetWorker (TokenNumber, sizeof (UINT8))); @@ -111,7 +111,7 @@ PeiPcdGet8 ( UINT16 EFIAPI PeiPcdGet16 ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) { return ReadUnaligned16 (GetWorker (TokenNumber, sizeof (UINT16))); @@ -122,7 +122,7 @@ PeiPcdGet16 ( UINT32 EFIAPI PeiPcdGet32 ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) { return ReadUnaligned32 (GetWorker (TokenNumber, sizeof (UINT32))); @@ -133,7 +133,7 @@ PeiPcdGet32 ( UINT64 EFIAPI PeiPcdGet64 ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) { return ReadUnaligned64 (GetWorker (TokenNumber, sizeof (UINT64))); @@ -144,7 +144,7 @@ PeiPcdGet64 ( VOID * EFIAPI PeiPcdGetPtr ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) { return GetWorker (TokenNumber, 0); @@ -155,7 +155,7 @@ PeiPcdGetPtr ( BOOLEAN EFIAPI PeiPcdGetBool ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) { return *((BOOLEAN *) GetWorker (TokenNumber, sizeof (BOOLEAN))); @@ -166,7 +166,7 @@ PeiPcdGetBool ( UINTN EFIAPI PeiPcdGetSize ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) { ASSERT (TokenNumber < PEI_LOCAL_TOKEN_NUMBER); @@ -180,7 +180,7 @@ UINT8 EFIAPI PeiPcdGet8Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber + IN UINTN ExTokenNumber ) { return *((UINT8 *) ExGetWorker (Guid, ExTokenNumber, sizeof (UINT8))); @@ -192,7 +192,7 @@ UINT16 EFIAPI PeiPcdGet16Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber + IN UINTN ExTokenNumber ) { return ReadUnaligned16 (ExGetWorker (Guid, ExTokenNumber, sizeof (UINT16))); @@ -204,7 +204,7 @@ UINT32 EFIAPI PeiPcdGet32Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber + IN UINTN ExTokenNumber ) { return ReadUnaligned32 (ExGetWorker (Guid, ExTokenNumber, sizeof (UINT32))); @@ -216,7 +216,7 @@ UINT64 EFIAPI PeiPcdGet64Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber + IN UINTN ExTokenNumber ) { return ReadUnaligned64 (ExGetWorker (Guid, ExTokenNumber, sizeof (UINT64))); @@ -228,7 +228,7 @@ VOID * EFIAPI PeiPcdGetPtrEx ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber + IN UINTN ExTokenNumber ) { return ExGetWorker (Guid, ExTokenNumber, 0); @@ -240,7 +240,7 @@ BOOLEAN EFIAPI PeiPcdGetBoolEx ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber + IN UINTN ExTokenNumber ) { return *((BOOLEAN *) ExGetWorker (Guid, ExTokenNumber, sizeof (BOOLEAN))); @@ -252,7 +252,7 @@ UINTN EFIAPI PeiPcdGetSizeEx ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber + IN UINTN ExTokenNumber ) { return PeiPcdGetSize (GetExPcdTokenNumber (Guid, ExTokenNumber)); @@ -263,7 +263,7 @@ PeiPcdGetSizeEx ( EFI_STATUS EFIAPI PeiPcdSet8 ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT8 Value ) { @@ -275,7 +275,7 @@ PeiPcdSet8 ( EFI_STATUS EFIAPI PeiPcdSet16 ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT16 Value ) { @@ -287,7 +287,7 @@ PeiPcdSet16 ( EFI_STATUS EFIAPI PeiPcdSet32 ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT32 Value ) { @@ -299,7 +299,7 @@ PeiPcdSet32 ( EFI_STATUS EFIAPI PeiPcdSet64 ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT64 Value ) { @@ -310,7 +310,7 @@ PeiPcdSet64 ( EFI_STATUS EFIAPI PeiPcdSetPtr ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINTN SizeOfBuffer, IN VOID *Buffer ) @@ -323,7 +323,7 @@ PeiPcdSetPtr ( EFI_STATUS EFIAPI PeiPcdSetBool ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN BOOLEAN Value ) { @@ -336,7 +336,7 @@ EFI_STATUS EFIAPI PeiPcdSet8Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber, + IN UINTN ExTokenNumber, IN UINT8 Value ) { @@ -355,7 +355,7 @@ EFI_STATUS EFIAPI PeiPcdSet16Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber, + IN UINTN ExTokenNumber, IN UINT16 Value ) { @@ -374,7 +374,7 @@ EFI_STATUS EFIAPI PeiPcdSet32Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber, + IN UINTN ExTokenNumber, IN UINT32 Value ) { @@ -393,7 +393,7 @@ EFI_STATUS EFIAPI PeiPcdSet64Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber, + IN UINTN ExTokenNumber, IN UINT64 Value ) { @@ -412,7 +412,7 @@ EFI_STATUS EFIAPI PeiPcdSetPtrEx ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber, + IN UINTN ExTokenNumber, IN UINTN SizeOfBuffer, IN VOID *Value ) @@ -432,7 +432,7 @@ EFI_STATUS EFIAPI PeiPcdSetBoolEx ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber, + IN UINTN ExTokenNumber, IN BOOLEAN Value ) { @@ -451,7 +451,7 @@ PeiPcdSetBoolEx ( EFI_STATUS EFIAPI PeiRegisterCallBackOnSet ( - IN PCD_TOKEN_NUMBER ExTokenNumber, + IN UINTN ExTokenNumber, IN CONST EFI_GUID *Guid, OPTIONAL IN PCD_PPI_CALLBACK CallBackFunction ) @@ -466,7 +466,7 @@ PeiRegisterCallBackOnSet ( EFI_STATUS EFIAPI PcdUnRegisterCallBackOnSet ( - IN PCD_TOKEN_NUMBER ExTokenNumber, + IN UINTN ExTokenNumber, IN CONST EFI_GUID *Guid, OPTIONAL IN PCD_PPI_CALLBACK CallBackFunction ) @@ -482,7 +482,7 @@ EFI_STATUS EFIAPI PeiPcdGetNextToken ( IN CONST EFI_GUID *Guid, OPTIONAL - IN OUT PCD_TOKEN_NUMBER *TokenNumber + IN OUT UINTN *TokenNumber ) { UINTN GuidTableIdx; diff --git a/EdkModulePkg/Universal/PCD/Pei/Service.c b/EdkModulePkg/Universal/PCD/Pei/Service.c index 62e2f9c114..247ebadcd7 100644 --- a/EdkModulePkg/Universal/PCD/Pei/Service.c +++ b/EdkModulePkg/Universal/PCD/Pei/Service.c @@ -30,7 +30,7 @@ Module Name: Service.c --*/ EFI_STATUS PeiRegisterCallBackWorker ( - IN PCD_TOKEN_NUMBER ExTokenNumber, + IN UINTN ExTokenNumber, IN CONST EFI_GUID *Guid, OPTIONAL IN PCD_PPI_CALLBACK CallBackFunction, IN BOOLEAN Register @@ -41,7 +41,7 @@ PeiRegisterCallBackWorker ( PCD_PPI_CALLBACK Compare; PCD_PPI_CALLBACK Assign; UINT32 LocalTokenNumber; - PCD_TOKEN_NUMBER TokenNumber; + UINTN TokenNumber; UINTN Idx; if (Guid == NULL) { @@ -271,7 +271,7 @@ InvokeCallbackOnSet ( EFI_STATUS SetWorker ( - PCD_TOKEN_NUMBER TokenNumber, + UINTN TokenNumber, VOID *Data, UINTN Size, BOOLEAN PtrType @@ -367,14 +367,14 @@ SetWorker ( EFI_STATUS ExSetWorker ( - IN PCD_TOKEN_NUMBER ExTokenNumber, + IN UINTN ExTokenNumber, IN CONST EFI_GUID *Guid, VOID *Data, UINTN Size, BOOLEAN PtrType ) { - PCD_TOKEN_NUMBER TokenNumber; + UINTN TokenNumber; TokenNumber = GetExPcdTokenNumber (Guid, ExTokenNumber); @@ -392,7 +392,7 @@ ExSetWorker ( VOID * ExGetWorker ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber, + IN UINTN ExTokenNumber, IN UINTN GetSize ) { @@ -404,7 +404,7 @@ ExGetWorker ( VOID * GetWorker ( - PCD_TOKEN_NUMBER TokenNumber, + UINTN TokenNumber, UINTN GetSize ) { @@ -481,7 +481,7 @@ GetWorker ( } -PCD_TOKEN_NUMBER +UINTN GetExPcdTokenNumber ( IN CONST EFI_GUID *Guid, IN UINT32 ExTokenNumber diff --git a/EdkModulePkg/Universal/PCD/Pei/Service.h b/EdkModulePkg/Universal/PCD/Pei/Service.h index df774c9d39..e62d0307a7 100644 --- a/EdkModulePkg/Universal/PCD/Pei/Service.h +++ b/EdkModulePkg/Universal/PCD/Pei/Service.h @@ -42,7 +42,7 @@ GetPcdDatabase ( EFI_STATUS SetWorker ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN VOID *Data, IN UINTN Size, IN BOOLEAN PtrType @@ -51,7 +51,7 @@ SetWorker ( EFI_STATUS ExSetWorker ( - IN PCD_TOKEN_NUMBER ExTokenNumber, + IN UINTN ExTokenNumber, IN CONST EFI_GUID *Guid, IN VOID *Data, IN UINTN Size, @@ -61,7 +61,7 @@ ExSetWorker ( VOID * GetWorker ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINTN GetSize ) ; @@ -69,7 +69,7 @@ GetWorker ( VOID * ExGetWorker ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber, + IN UINTN ExTokenNumber, IN UINTN GetSize ) ; @@ -81,10 +81,10 @@ typedef struct { } EX_PCD_ENTRY_ATTRIBUTE; -PCD_TOKEN_NUMBER +UINTN GetExPcdTokenNumber ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER ExTokenNumber + IN UINTN ExTokenNumber ) ; @@ -93,7 +93,7 @@ GetExPcdTokenNumber ( EFI_STATUS PeiRegisterCallBackWorker ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN CONST GUID *Guid, OPTIONAL IN PCD_PPI_CALLBACK CallBackFunction, IN BOOLEAN Register @@ -115,7 +115,7 @@ BuildPcdDatabase ( VOID EFIAPI PeiPcdSetSku ( - IN SKU_ID SkuId + IN UINTN SkuId ) ; @@ -123,7 +123,7 @@ PeiPcdSetSku ( UINT8 EFIAPI PeiPcdGet8 ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -131,7 +131,7 @@ PeiPcdGet8 ( UINT16 EFIAPI PeiPcdGet16 ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -139,7 +139,7 @@ PeiPcdGet16 ( UINT32 EFIAPI PeiPcdGet32 ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -147,7 +147,7 @@ PeiPcdGet32 ( UINT64 EFIAPI PeiPcdGet64 ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -155,7 +155,7 @@ PeiPcdGet64 ( VOID * EFIAPI PeiPcdGetPtr ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -163,7 +163,7 @@ PeiPcdGetPtr ( BOOLEAN EFIAPI PeiPcdGetBool ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -171,7 +171,7 @@ PeiPcdGetBool ( UINTN EFIAPI PeiPcdGetSize ( - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -180,7 +180,7 @@ UINT8 EFIAPI PeiPcdGet8Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -189,7 +189,7 @@ UINT16 EFIAPI PeiPcdGet16Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -197,7 +197,7 @@ UINT32 EFIAPI PeiPcdGet32Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -206,7 +206,7 @@ UINT64 EFIAPI PeiPcdGet64Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -215,7 +215,7 @@ VOID * EFIAPI PeiPcdGetPtrEx ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -224,7 +224,7 @@ BOOLEAN EFIAPI PeiPcdGetBoolEx ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -233,7 +233,7 @@ UINTN EFIAPI PeiPcdGetSizeEx ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber + IN UINTN TokenNumber ) ; @@ -241,7 +241,7 @@ PeiPcdGetSizeEx ( EFI_STATUS EFIAPI PeiPcdSet8 ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT8 Value ) ; @@ -250,7 +250,7 @@ PeiPcdSet8 ( EFI_STATUS EFIAPI PeiPcdSet16 ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT16 Value ) ; @@ -259,7 +259,7 @@ PeiPcdSet16 ( EFI_STATUS EFIAPI PeiPcdSet32 ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT32 Value ) ; @@ -268,7 +268,7 @@ PeiPcdSet32 ( EFI_STATUS EFIAPI PeiPcdSet64 ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT64 Value ) ; @@ -276,7 +276,7 @@ PeiPcdSet64 ( EFI_STATUS EFIAPI PeiPcdSetPtr ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINTN SizeOfBuffer, IN VOID *Buffer ) @@ -286,7 +286,7 @@ PeiPcdSetPtr ( EFI_STATUS EFIAPI PeiPcdSetBool ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN BOOLEAN Value ) ; @@ -296,7 +296,7 @@ EFI_STATUS EFIAPI PeiPcdSet8Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT8 Value ) ; @@ -305,7 +305,7 @@ EFI_STATUS EFIAPI PeiPcdSet16Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT16 Value ) ; @@ -315,7 +315,7 @@ EFI_STATUS EFIAPI PeiPcdSet32Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT32 Value ) ; @@ -325,7 +325,7 @@ EFI_STATUS EFIAPI PeiPcdSet64Ex ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINT64 Value ) ; @@ -335,7 +335,7 @@ EFI_STATUS EFIAPI PeiPcdSetPtrEx ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN UINTN SizeOfBuffer, IN VOID *Buffer ) @@ -346,7 +346,7 @@ EFI_STATUS EFIAPI PeiPcdSetBoolEx ( IN CONST EFI_GUID *Guid, - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN BOOLEAN Value ) ; @@ -356,7 +356,7 @@ PeiPcdSetBoolEx ( EFI_STATUS EFIAPI PeiRegisterCallBackOnSet ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN CONST EFI_GUID *Guid, OPTIONAL IN PCD_PPI_CALLBACK CallBackFunction ) @@ -366,7 +366,7 @@ PeiRegisterCallBackOnSet ( EFI_STATUS EFIAPI PcdUnRegisterCallBackOnSet ( - IN PCD_TOKEN_NUMBER TokenNumber, + IN UINTN TokenNumber, IN CONST EFI_GUID *Guid, OPTIONAL IN PCD_PPI_CALLBACK CallBackFunction ) @@ -377,7 +377,7 @@ EFI_STATUS EFIAPI PeiPcdGetNextToken ( IN CONST EFI_GUID *Guid, OPTIONAL - IN OUT PCD_TOKEN_NUMBER *TokenNumber + IN OUT UINTN *TokenNumber ) ; -- cgit v1.2.3