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

@@ -45,29 +45,49 @@ typedef struct {
//
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
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 SetSize
)
;
EFI_STATUS
ExSetWorker (
IN UINTN ExTokenNumber,
IN CONST EFI_GUID *Guid,
VOID *Data,
UINTN Size,
BOOLEAN PtrType
IN UINTN ExTokenNumber,
IN CONST EFI_GUID *Guid,
IN VOID *Data,
IN OUT UINTN *Size,
IN BOOLEAN PtrType
)
;
VOID *
GetWorker (
UINTN TokenNumber,
UINTN GetSize
IN UINTN TokenNumber,
IN UINTN GetSize
)
;
@@ -132,6 +152,24 @@ GetExPcdTokenNumber (
IN UINT32 ExTokenNumber
)
;
UINTN
GetPtrTypeSize (
IN UINTN LocalTokenNumberTableIdx,
OUT UINTN *MaxSize
)
;
BOOLEAN
SetPtrTypeSize (
IN UINTN LocalTokenNumberTableIdx,
IN OUT UINTN *CurrentSize
)
;
//
// Protocol Interface function declaration.
//
@@ -303,9 +341,9 @@ DxePcdSet64 (
EFI_STATUS
EFIAPI
DxePcdSetPtr (
IN UINTN TokenNumber,
IN UINTN SizeOfBuffer,
IN VOID *Buffer
IN UINTN TokenNumber,
IN UINTN *SizeOfBuffer,
IN VOID *Buffer
)
;
@@ -362,10 +400,10 @@ DxePcdSet64Ex (
EFI_STATUS
EFIAPI
DxePcdSetPtrEx (
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
)
;