Add in support for GetNextTokenNumber API.
Use PCD_TOKEN_NUMBER as type for parameter of internal APIs. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@312 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -500,13 +500,13 @@ PeiPcdGetNextToken (
|
||||
(*TokenNumber)++;
|
||||
|
||||
if (*TokenNumber >= PEI_NEX_TOKEN_NUMBER) {
|
||||
*TokenNumber = 0;
|
||||
*TokenNumber = PCD_INVALID_TOKEN_NUMBER;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if (PEI_EXMAP_TABLE_EMPTY) {
|
||||
*TokenNumber = (UINTN) PCD_INVALID_TOKEN_NUMBER;
|
||||
*TokenNumber = PCD_INVALID_TOKEN_NUMBER;
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
@@ -62,10 +62,12 @@ PeiRegisterCallBackWorker (
|
||||
ASSERT (GuidHob != NULL);
|
||||
|
||||
CallbackTable = GET_GUID_HOB_DATA (GuidHob);
|
||||
CallbackTable = CallbackTable + (TokenNumber * FixedPcdGet32(PcdMaxPeiPcdCallBackNumberPerPcdEntry));
|
||||
|
||||
Compare = Register? NULL: CallBackFunction;
|
||||
Assign = Register? CallBackFunction: NULL;
|
||||
|
||||
|
||||
for (Idx = 0; Idx < FixedPcdGet32(PcdMaxPeiPcdCallBackNumberPerPcdEntry); Idx++) {
|
||||
if (CallbackTable[Idx] == Compare) {
|
||||
CallbackTable[Idx] = Assign;
|
||||
|
@@ -42,43 +42,43 @@ GetPcdDatabase (
|
||||
|
||||
EFI_STATUS
|
||||
SetWorker (
|
||||
IN UINTN TokenNumber,
|
||||
IN PCD_TOKEN_NUMBER TokenNumber,
|
||||
IN VOID *Data,
|
||||
IN UINTN Size,
|
||||
IN BOOLEAN PtrType
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
SetWorkerByLocalTokenNumber (
|
||||
IN UINT32 LocalTokenNumber,
|
||||
IN VOID *Data,
|
||||
IN UINTN Size,
|
||||
IN BOOLEAN PtrType
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
SetWorkerByLocalTokenNumber (
|
||||
UINT32 LocalTokenNumber,
|
||||
VOID *Data,
|
||||
UINTN Size,
|
||||
BOOLEAN PtrType
|
||||
)
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
ExSetWorker (
|
||||
IN UINT32 ExTokenNumber,
|
||||
IN PCD_TOKEN_NUMBER ExTokenNumber,
|
||||
IN CONST EFI_GUID *Guid,
|
||||
VOID *Data,
|
||||
UINTN Size,
|
||||
BOOLEAN PtrType
|
||||
IN VOID *Data,
|
||||
IN UINTN Size,
|
||||
IN BOOLEAN PtrType
|
||||
)
|
||||
;
|
||||
|
||||
VOID *
|
||||
GetWorker (
|
||||
UINTN TokenNumber,
|
||||
UINTN GetSize
|
||||
IN PCD_TOKEN_NUMBER TokenNumber,
|
||||
IN UINTN GetSize
|
||||
)
|
||||
;
|
||||
|
||||
VOID *
|
||||
ExGetWorker (
|
||||
IN CONST EFI_GUID *Guid,
|
||||
IN UINT32 ExTokenNumber,
|
||||
IN PCD_TOKEN_NUMBER ExTokenNumber,
|
||||
IN UINTN GetSize
|
||||
)
|
||||
;
|
||||
@@ -92,19 +92,25 @@ typedef struct {
|
||||
VOID
|
||||
GetExPcdTokenAttributes (
|
||||
IN CONST EFI_GUID *Guid,
|
||||
IN UINT32 ExTokenNumber,
|
||||
IN PCD_TOKEN_NUMBER ExTokenNumber,
|
||||
OUT EX_PCD_ENTRY_ATTRIBUTE *ExAttr
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
EFI_STATUS
|
||||
PeiRegisterCallBackWorker (
|
||||
IN UINTN TokenNumber,
|
||||
IN PCD_TOKEN_NUMBER TokenNumber,
|
||||
IN CONST GUID *Guid, OPTIONAL
|
||||
IN PCD_PPI_CALLBACK CallBackFunction,
|
||||
IN BOOLEAN Register
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
VOID
|
||||
BuildPcdDatabase (
|
||||
VOID
|
||||
|
Reference in New Issue
Block a user