45 Status =
gBS->LocateProtocol (&gEfiPcdProtocolGuid,
NULL, (VOID **)&mPiPcd);
47 ASSERT (mPiPcd !=
NULL);
71 Status =
gBS->LocateProtocol (&gPcdProtocolGuid,
NULL, (VOID **)&mPcd);
73 ASSERT (mPcd !=
NULL);
91 if (mPiPcdInfo ==
NULL) {
92 Status =
gBS->LocateProtocol (&gEfiGetPcdInfoProtocolGuid,
NULL, (VOID **)&mPiPcdInfo);
94 ASSERT (mPiPcdInfo !=
NULL);
112 if (mPcdInfo ==
NULL) {
113 Status =
gBS->LocateProtocol (&gGetPcdInfoProtocolGuid,
NULL, (VOID **)&mPcdInfo);
115 ASSERT (mPcdInfo !=
NULL);
295 ASSERT (Guid !=
NULL);
321 ASSERT (Guid !=
NULL);
344 ASSERT (Guid !=
NULL);
370 ASSERT (Guid !=
NULL);
396 ASSERT (Guid !=
NULL);
422 ASSERT (Guid !=
NULL);
448 ASSERT (Guid !=
NULL);
571 ASSERT (SizeOfBuffer !=
NULL);
573 if (*SizeOfBuffer > 0) {
574 ASSERT (Buffer !=
NULL);
577 return GetPcdProtocol ()->SetPtr (TokenNumber, SizeOfBuffer, (VOID *)Buffer);
626 ASSERT (Guid !=
NULL);
655 ASSERT (Guid !=
NULL);
684 ASSERT (Guid !=
NULL);
713 ASSERT (Guid !=
NULL);
749 ASSERT (Guid !=
NULL);
751 ASSERT (SizeOfBuffer !=
NULL);
753 if (*SizeOfBuffer > 0) {
754 ASSERT (Buffer !=
NULL);
757 return GetPiPcdProtocol ()->SetPtr (Guid, TokenNumber, SizeOfBuffer, Buffer);
784 ASSERT (Guid !=
NULL);
883 ASSERT (!EFI_ERROR (Status) || TokenNumber == 0);
909 return (
GUID *)TokenSpaceGuid;
938 OUT VOID *PatchVariable,
944 ASSERT (PatchVariable !=
NULL);
945 ASSERT (SizeOfBuffer !=
NULL);
947 if (*SizeOfBuffer > 0) {
948 ASSERT (Buffer !=
NULL);
951 if ((*SizeOfBuffer > MaximumDatumSize) ||
954 *SizeOfBuffer = MaximumDatumSize;
958 CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
960 return (VOID *)Buffer;
989 OUT VOID *PatchVariable,
995 ASSERT (PatchVariable !=
NULL);
996 ASSERT (SizeOfBuffer !=
NULL);
998 if (*SizeOfBuffer > 0) {
999 ASSERT (Buffer !=
NULL);
1002 if ((*SizeOfBuffer > MaximumDatumSize) ||
1005 *SizeOfBuffer = MaximumDatumSize;
1009 CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
1042 OUT VOID *PatchVariable,
1049 ASSERT (PatchVariable !=
NULL);
1050 ASSERT (SizeOfPatchVariable !=
NULL);
1051 ASSERT (SizeOfBuffer !=
NULL);
1053 if (*SizeOfBuffer > 0) {
1054 ASSERT (Buffer !=
NULL);
1057 if ((*SizeOfBuffer > MaximumDatumSize) ||
1060 *SizeOfBuffer = MaximumDatumSize;
1064 CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
1065 *SizeOfPatchVariable = *SizeOfBuffer;
1067 return (VOID *)Buffer;
1098 OUT VOID *PatchVariable,
1105 ASSERT (PatchVariable !=
NULL);
1106 ASSERT (SizeOfPatchVariable !=
NULL);
1107 ASSERT (SizeOfBuffer !=
NULL);
1109 if (*SizeOfBuffer > 0) {
1110 ASSERT (Buffer !=
NULL);
1113 if ((*SizeOfBuffer > MaximumDatumSize) ||
1116 *SizeOfBuffer = MaximumDatumSize;
1120 CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
1121 *SizeOfPatchVariable = *SizeOfBuffer;
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
EFI_STATUS EFIAPI NotificationFunction(IN EFI_KEY_DATA *KeyData)
VOID EFIAPI LibPcdCallbackOnSet(IN CONST GUID *Guid OPTIONAL, IN UINTN TokenNumber, IN PCD_CALLBACK NotificationFunction)
RETURN_STATUS EFIAPI LibPcdSetEx16S(IN CONST GUID *Guid, IN UINTN TokenNumber, IN UINT16 Value)
RETURN_STATUS EFIAPI LibPcdSet8S(IN UINTN TokenNumber, IN UINT8 Value)
RETURN_STATUS EFIAPI LibPatchPcdSetPtrS(OUT VOID *PatchVariable, IN UINTN MaximumDatumSize, IN OUT UINTN *SizeOfBuffer, IN CONST VOID *Buffer)
UINTN EFIAPI LibPcdGetNextToken(IN CONST GUID *Guid OPTIONAL, IN UINTN TokenNumber)
UINT32 EFIAPI LibPcdGetEx32(IN CONST GUID *Guid, IN UINTN TokenNumber)
UINT8 EFIAPI LibPcdGetEx8(IN CONST GUID *Guid, IN UINTN TokenNumber)
VOID EFIAPI LibPcdGetInfoEx(IN CONST GUID *Guid, IN UINTN TokenNumber, OUT PCD_INFO *PcdInfo)
RETURN_STATUS EFIAPI LibPatchPcdSetPtrAndSizeS(OUT VOID *PatchVariable, OUT UINTN *SizeOfPatchVariable, IN UINTN MaximumDatumSize, IN OUT UINTN *SizeOfBuffer, IN CONST VOID *Buffer)
UINT16 EFIAPI LibPcdGet16(IN UINTN TokenNumber)
UINT64 EFIAPI LibPcdGetEx64(IN CONST GUID *Guid, IN UINTN TokenNumber)
UINT16 EFIAPI LibPcdGetEx16(IN CONST GUID *Guid, IN UINTN TokenNumber)
RETURN_STATUS EFIAPI LibPcdSetExPtrS(IN CONST GUID *Guid, IN UINTN TokenNumber, IN OUT UINTN *SizeOfBuffer, IN VOID *Buffer)
VOID EFIAPI LibPcdGetInfo(IN UINTN TokenNumber, OUT PCD_INFO *PcdInfo)
UINTN EFIAPI LibPcdGetSize(IN UINTN TokenNumber)
RETURN_STATUS EFIAPI LibPcdSetPtrS(IN UINTN TokenNumber, IN OUT UINTN *SizeOfBuffer, IN CONST VOID *Buffer)
UINT64 EFIAPI LibPcdGet64(IN UINTN TokenNumber)
GET_PCD_INFO_PROTOCOL * GetPcdInfoProtocolPointer(VOID)
UINTN EFIAPI LibPcdGetSku(VOID)
GUID *EFIAPI LibPcdGetNextTokenSpace(IN CONST GUID *TokenSpaceGuid)
RETURN_STATUS EFIAPI LibPcdSetEx8S(IN CONST GUID *Guid, IN UINTN TokenNumber, IN UINT8 Value)
RETURN_STATUS EFIAPI LibPcdSetExBoolS(IN CONST GUID *Guid, IN UINTN TokenNumber, IN BOOLEAN Value)
RETURN_STATUS EFIAPI LibPcdSetEx64S(IN CONST GUID *Guid, IN UINTN TokenNumber, IN UINT64 Value)
VOID *EFIAPI LibPatchPcdSetPtrAndSize(OUT VOID *PatchVariable, OUT UINTN *SizeOfPatchVariable, IN UINTN MaximumDatumSize, IN OUT UINTN *SizeOfBuffer, IN CONST VOID *Buffer)
UINT8 EFIAPI LibPcdGet8(IN UINTN TokenNumber)
EFI_GET_PCD_INFO_PROTOCOL * GetPiPcdInfoProtocolPointer(VOID)
VOID *EFIAPI LibPatchPcdSetPtr(OUT VOID *PatchVariable, IN UINTN MaximumDatumSize, IN OUT UINTN *SizeOfBuffer, IN CONST VOID *Buffer)
RETURN_STATUS EFIAPI LibPcdSet32S(IN UINTN TokenNumber, IN UINT32 Value)
RETURN_STATUS EFIAPI LibPcdSet16S(IN UINTN TokenNumber, IN UINT16 Value)
VOID EFIAPI LibPcdCancelCallback(IN CONST GUID *Guid OPTIONAL, IN UINTN TokenNumber, IN PCD_CALLBACK NotificationFunction)
UINT32 EFIAPI LibPcdGet32(IN UINTN TokenNumber)
RETURN_STATUS EFIAPI LibPcdSetEx32S(IN CONST GUID *Guid, IN UINTN TokenNumber, IN UINT32 Value)
VOID *EFIAPI LibPcdGetExPtr(IN CONST GUID *Guid, IN UINTN TokenNumber)
VOID *EFIAPI LibPcdGetPtr(IN UINTN TokenNumber)
PCD_PROTOCOL *EFIAPI GetPcdProtocol(VOID)
RETURN_STATUS EFIAPI LibPcdSet64S(IN UINTN TokenNumber, IN UINT64 Value)
UINTN EFIAPI LibPcdGetExSize(IN CONST GUID *Guid, IN UINTN TokenNumber)
UINTN EFIAPI LibPcdSetSku(IN UINTN SkuId)
EFI_PCD_PROTOCOL *EFIAPI GetPiPcdProtocol(VOID)
BOOLEAN EFIAPI LibPcdGetBool(IN UINTN TokenNumber)
RETURN_STATUS EFIAPI LibPcdSetBoolS(IN UINTN TokenNumber, IN BOOLEAN Value)
BOOLEAN EFIAPI LibPcdGetExBool(IN CONST GUID *Guid, IN UINTN TokenNumber)
#define RETURN_INVALID_PARAMETER
#define ASSERT_EFI_ERROR(StatusParameter)
VOID(EFIAPI * PCD_CALLBACK)(IN CONST GUID *CallBackGuid OPTIONAL, IN UINTN CallBackToken, IN OUT VOID *TokenData, IN UINTN TokenDataSize)
EFI_GET_PCD_INFO_PROTOCOL_GET_SKU GetSku
EFI_GET_PCD_INFO_PROTOCOL_GET_INFO GetInfo
GET_PCD_INFO_PROTOCOL_GET_INFO GetInfo