Add in support for MaxSize and CurrentSize for PCD entry.

Change the behavior for PcdSET for Variable_Enabled Pcd entry. If a Variable does not exist, we will only save the value to a volatile space. We save it to variable ONLY when the variable exist. 

Fix a few bugs in Pcd Build tool when generated Pcd database for Pcd entry with Unicode String type.

Support PcdSet to return MaxSize if the input SizeOfBuffer is greater than the Max Size declared in FPD file.

Add SetValueWorker and GetValueWoker for each PcdSET and PcdGET function to reduce code size.

Sync function prototype definition for PCD_PPI_SET_POINTER, PCD_PPI_SET_EX_POINTER, PCD_PROTOCOL_SET_POINTER and PCD_PROTOCOL_SET_EX_POINTER with PCD arch spec 0.52.

Add ASSERTION in LibPcdSetPtr.





git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@789 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qwang12
2006-07-06 06:10:20 +00:00
parent 71baa24b69
commit 1de04b4f83
14 changed files with 1091 additions and 350 deletions

View File

@@ -40,25 +40,49 @@ GetPcdDatabase (
)
;
EFI_STATUS
SetWorker (
IN UINTN TokenNumber,
IN VOID *Data,
IN UINTN Size,
IN BOOLEAN PtrType
SetValueWorker (
IN UINTN TokenNumber,
IN VOID *Data,
IN UINTN Size
)
;
EFI_STATUS
ExSetWorker (
IN UINTN ExTokenNumber,
IN CONST EFI_GUID *Guid,
IN VOID *Data,
IN UINTN Size,
IN BOOLEAN PtrType
SetWorker (
IN UINTN TokenNumber,
IN VOID *Data,
IN OUT UINTN *Size,
IN BOOLEAN PtrType
)
;
EFI_STATUS
ExSetValueWorker (
IN UINTN ExTokenNumber,
IN CONST EFI_GUID *Guid,
IN VOID *Data,
IN UINTN Size
)
;
EFI_STATUS
ExSetWorker (
IN UINTN ExTokenNumber,
IN CONST EFI_GUID *Guid,
IN VOID *Data,
IN OUT UINTN *Size,
IN BOOLEAN PtrType
)
;
VOID *
GetWorker (
IN UINTN TokenNumber,
@@ -66,6 +90,8 @@ GetWorker (
)
;
VOID *
ExGetWorker (
IN CONST EFI_GUID *Guid,
@@ -109,6 +135,27 @@ BuildPcdDatabase (
;
UINTN
GetPtrTypeSize (
IN UINTN LocalTokenNumberTableIdx,
OUT UINTN *MaxSize,
IN PEI_PCD_DATABASE *Database
)
;
BOOLEAN
SetPtrTypeSize (
IN UINTN LocalTokenNumberTableIdx,
IN OUT UINTN *CurrentSize,
IN PEI_PCD_DATABASE *Database
)
;
//
// PPI Interface Implementation Declaration.
//
@@ -276,9 +323,9 @@ PeiPcdSet64 (
EFI_STATUS
EFIAPI
PeiPcdSetPtr (
IN UINTN TokenNumber,
IN UINTN SizeOfBuffer,
IN VOID *Buffer
IN UINTN TokenNumber,
IN OUT UINTN *SizeOfBuffer,
IN VOID *Buffer
)
;
@@ -334,10 +381,10 @@ PeiPcdSet64Ex (
EFI_STATUS
EFIAPI
PeiPcdSetPtrEx (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN UINTN SizeOfBuffer,
IN VOID *Buffer
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN OUT UINTN *SizeOfBuffer,
IN VOID *Buffer
)
;