Sync up Pcd Library Instances and PCD Driver/PEIM with Pcd spec 0.51 and Mde 0.51

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@285 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qwang12 2006-05-26 01:05:31 +00:00
parent 54de7486cf
commit b16ef80556
9 changed files with 266 additions and 271 deletions

View File

@ -20,14 +20,6 @@
typedef UINT32 PCD_TOKEN_NUMBER;
typedef UINT8 SKU_ID;
#define PCD_INVALID_TOKEN ((PCD_TOKEN_NUMBER)(-1))
typedef
VOID
(EFIAPI *PCD_PROTOCOL_CALLBACK) (
IN UINT32 CallBackToken,
IN VOID *TokenData,
IN UINTN TokenDataSize
);
#define PCD_INVALID_TOKEN_NUMBER ((PCD_TOKEN_NUMBER)(-1))
#endif

View File

@ -46,6 +46,5 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Guid/DataHubRecords.h>
#include <Protocol/Pcd.h>
#include <Common/PcdTemp.h> //This will be removed when PCD PEIM is completed!
#endif

View File

@ -18,6 +18,8 @@ Module Name: PcdLib.h
#ifndef __PCD_LIB_H__
#define __PCD_LIB_H__
#include <Common/Pcd.h>
#define PcdToken(TokenName) _PCD_TOKEN_##TokenName
@ -54,6 +56,12 @@ Module Name: PcdLib.h
#define PatchPcdGetBool(TokenName) _gPcd_BinaryPatch_##TokenName
#define PatchPcdGetPtr(TokenName) ((VOID *)_gPcd_BinaryPatch_##TokenName)
#define PatchPcdSet8(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = Value)
#define PatchPcdSet16(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = Value)
#define PatchPcdSet32(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = Value)
#define PatchPcdSet64(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = Value)
#define PatchPcdSetBool(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = Value)
#define PatchPcdSetPtr(TokenName, Value, Size) CopyMem (_gPcd_BinaryPatch_##TokenName, Value, Size)
//
// Dynamic is via the protocol with only the TokenNumber as argument
@ -106,13 +114,13 @@ Module Name: PcdLib.h
@param[in] SkuId The SKU value that will be used when the PCD service will retrieve and
set values associated with a PCD token.
@retval UINTN Return the SKU ID that just be set.
@retval SKU_ID Return the SKU ID that just be set.
**/
UINTN
SKU_ID
EFIAPI
LibPcdSetSku (
IN UINTN SkuId
IN SKU_ID SkuId
);
@ -127,7 +135,7 @@ LibPcdSetSku (
UINT8
EFIAPI
LibPcdGet8 (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
@ -142,7 +150,7 @@ LibPcdGet8 (
UINT16
EFIAPI
LibPcdGet16 (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
@ -157,7 +165,7 @@ LibPcdGet16 (
UINT32
EFIAPI
LibPcdGet32 (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
@ -172,7 +180,7 @@ LibPcdGet32 (
UINT64
EFIAPI
LibPcdGet64 (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
@ -187,7 +195,7 @@ LibPcdGet64 (
VOID *
EFIAPI
LibPcdGetPtr (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
@ -202,7 +210,7 @@ LibPcdGetPtr (
BOOLEAN
EFIAPI
LibPcdGetBool (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
@ -217,7 +225,7 @@ LibPcdGetBool (
UINTN
EFIAPI
LibPcdGetSize (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
@ -236,7 +244,7 @@ UINT8
EFIAPI
LibPcdGetEx8 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
@ -255,7 +263,7 @@ UINT16
EFIAPI
LibPcdGetEx16 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
@ -274,7 +282,7 @@ UINT32
EFIAPI
LibPcdGetEx32 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
@ -293,7 +301,7 @@ UINT64
EFIAPI
LibPcdGetEx64 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
@ -312,7 +320,7 @@ VOID *
EFIAPI
LibPcdGetExPtr (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
@ -331,7 +339,7 @@ BOOLEAN
EFIAPI
LibPcdGetExBool (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
@ -350,7 +358,7 @@ UINTN
EFIAPI
LibPcdGetExSize (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
@ -367,7 +375,7 @@ LibPcdGetExSize (
UINT8
EFIAPI
LibPcdSet8 (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT8 Value
);
@ -385,7 +393,7 @@ LibPcdSet8 (
UINT16
EFIAPI
LibPcdSet16 (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT16 Value
);
@ -403,7 +411,7 @@ LibPcdSet16 (
UINT32
EFIAPI
LibPcdSet32 (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT32 Value
);
@ -421,7 +429,7 @@ LibPcdSet32 (
UINT64
EFIAPI
LibPcdSet64 (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT64 Value
);
@ -440,7 +448,8 @@ LibPcdSet64 (
VOID*
EFIAPI
LibPcdSetPtr (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINTN SizeOfBuffer,
IN CONST VOID *Value
);
@ -458,7 +467,7 @@ LibPcdSetPtr (
BOOLEAN
EFIAPI
LibPcdSetBool (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN BOOLEAN Value
);
@ -480,7 +489,7 @@ UINT8
EFIAPI
LibPcdSetEx8 (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT8 Value
);
@ -502,7 +511,7 @@ UINT16
EFIAPI
LibPcdSetEx16 (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT16 Value
);
@ -524,7 +533,7 @@ UINT32
EFIAPI
LibPcdSetEx32 (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT32 Value
);
@ -546,7 +555,7 @@ UINT64
EFIAPI
LibPcdSetEx64 (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT64 Value
);
@ -569,7 +578,8 @@ VOID *
EFIAPI
LibPcdSetExPtr (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINTN SizeOfBuffer,
IN CONST VOID *Value
);
@ -591,7 +601,7 @@ BOOLEAN
EFIAPI
LibPcdSetExBool (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN BOOLEAN Value
);
@ -613,10 +623,10 @@ LibPcdSetExBool (
typedef
VOID
(EFIAPI *PCD_CALLBACK) (
IN CONST GUID *CallBackGuid, OPTIONAL
IN UINTN CallBackToken,
IN VOID *TokenData,
IN UINTN TokenDataSize
IN CONST GUID *CallBackGuid, OPTIONAL
IN PCD_TOKEN_NUMBER CallBackToken,
IN OUT VOID *TokenData,
IN UINTN TokenDataSize
);
@ -640,7 +650,7 @@ VOID
EFIAPI
LibPcdCallbackOnSet (
IN CONST GUID *Guid, OPTIONAL
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN PCD_CALLBACK NotificationFunction
);
@ -659,7 +669,7 @@ VOID
EFIAPI
LibPcdCancelCallback (
IN CONST GUID *Guid, OPTIONAL
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN PCD_CALLBACK NotificationFunction
);
@ -677,14 +687,14 @@ LibPcdCancelCallback (
@param[in] The previous PCD token number. If 0, then retrieves the first PCD
token number.
@retval UINTN The next valid token number.
@retval PCD_TOKEN_NUMBER The next valid token number.
**/
UINTN
PCD_TOKEN_NUMBER
EFIAPI
LibPcdGetNextToken (
IN CONST GUID *Guid, OPTIONAL
IN UINTN *TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
#endif

View File

@ -49,6 +49,5 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Guid/GlobalVariable.h>
#include <Ppi/Pcd.h>
#include <Common/PcdTemp.h> //This will be removed when PCD PEIM is completed!
#endif

View File

@ -17,149 +17,150 @@
#ifndef __PCD_H__
#define __PCD_H__
#include <Common/Pcd.h>
extern EFI_GUID gPcdPpiGuid;
#define PCD_PPI_GUID \
{ 0x632df884, 0x8023, 0x4872, { 0xb6, 0x70, 0xb7, 0x4a, 0x30, 0x19, 0x16, 0xe9 } }
typedef UINT8 SKU_ID;
typedef
EFI_STATUS
VOID
(EFIAPI *PCD_PPI_SET_SKU) (
IN UINTN SkuId
IN SKU_ID SkuId
);
typedef
UINT8
(EFIAPI *PCD_PPI_GET8) (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
UINT16
(EFIAPI *PCD_PPI_GET16) (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
UINT32
(EFIAPI *PCD_PPI_GET32) (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
UINT64
(EFIAPI *PCD_PPI_GET64) (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
VOID *
(EFIAPI *PCD_PPI_GET_POINTER) (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
BOOLEAN
(EFIAPI *PCD_PPI_GET_BOOLEAN) (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
UINTN
(EFIAPI *PCD_PPI_GET_SIZE) (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
UINT8
(EFIAPI *PCD_PPI_GET_EX_8) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
UINT16
(EFIAPI *PCD_PPI_GET_EX_16) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
UINT32
(EFIAPI *PCD_PPI_GET_EX_32) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
UINT64
(EFIAPI *PCD_PPI_GET_EX_64) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
VOID *
(EFIAPI *PCD_PPI_GET_EX_POINTER) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
BOOLEAN
(EFIAPI *PCD_PPI_GET_EX_BOOLEAN) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
UINTN
(EFIAPI *PCD_PPI_GET_EX_SIZE) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
EFI_STATUS
(EFIAPI *PCD_PPI_SET8) (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT8 Value
);
typedef
EFI_STATUS
(EFIAPI *PCD_PPI_SET16) (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT16 Value
);
typedef
EFI_STATUS
(EFIAPI *PCD_PPI_SET32) (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT32 Value
);
typedef
EFI_STATUS
(EFIAPI *PCD_PPI_SET64) (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT64 Value
);
typedef
EFI_STATUS
(EFIAPI *PCD_PPI_SET_POINTER) (
IN UINTN TokenNumber,
IN CONST VOID *Value
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINTN SizeOfBuffer,
IN VOID *Buffer
);
typedef
EFI_STATUS
(EFIAPI *PCD_PPI_SET_BOOLEAN) (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN BOOLEAN Value
);
@ -167,7 +168,7 @@ typedef
EFI_STATUS
(EFIAPI *PCD_PPI_SET_EX_8) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT8 Value
);
@ -175,7 +176,7 @@ typedef
EFI_STATUS
(EFIAPI *PCD_PPI_SET_EX_16) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT16 Value
);
@ -183,7 +184,7 @@ typedef
EFI_STATUS
(EFIAPI *PCD_PPI_SET_EX_32) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT32 Value
);
@ -191,7 +192,7 @@ typedef
EFI_STATUS
(EFIAPI *PCD_PPI_SET_EX_64) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT64 Value
);
@ -199,15 +200,16 @@ typedef
EFI_STATUS
(EFIAPI *PCD_PPI_SET_EX_POINTER) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN CONST VOID *Value
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINTN SizeOfBuffer,
IN VOID *Buffer
);
typedef
EFI_STATUS
(EFIAPI *PCD_PPI_SET_EX_BOOLEAN) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN BOOLEAN Value
);
@ -225,16 +227,16 @@ EFI_STATUS
typedef
VOID
(EFIAPI *PCD_PPI_CALLBACK) (
IN CONST EFI_GUID *CallBackGuid, OPTIONAL
IN UINTN CallBackToken,
IN VOID *TokenData,
IN UINTN TokenDataSize
IN CONST EFI_GUID *CallBackGuid, OPTIONAL
IN PCD_TOKEN_NUMBER CallBackToken,
IN OUT VOID *TokenData,
IN UINTN TokenDataSize
);
typedef
EFI_STATUS
(EFIAPI *PCD_PPI_CALLBACK_ONSET) (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN CONST EFI_GUID *Guid, OPTIONAL
IN PCD_PPI_CALLBACK CallBackFunction
);
@ -242,7 +244,7 @@ EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *PCD_PPI_CANCEL_CALLBACK) (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN CONST EFI_GUID *Guid, OPTIONAL
IN PCD_PPI_CALLBACK CallBackFunction
);
@ -251,7 +253,7 @@ typedef
EFI_STATUS
(EFIAPI *PCD_PPI_GET_NEXT_TOKEN) (
IN CONST EFI_GUID *Guid, OPTIONAL
IN OUT UINTN *TokenNumber
IN OUT PCD_TOKEN_NUMBER *TokenNumber
);
typedef struct {

View File

@ -17,149 +17,150 @@
#ifndef __PCD_H__
#define __PCD_H__
#include <Common/Pcd.h>
extern EFI_GUID gPcdProtocolGuid;
#define PCD_PROTOCOL_GUID \
{ 0x11b34006, 0xd85b, 0x4d0a, { 0xa2, 0x90, 0xd5, 0xa5, 0x71, 0x31, 0xe, 0xf7 } }
typedef UINT8 SKU_ID;
typedef
EFI_STATUS
VOID
(EFIAPI *PCD_PROTOCOL_SET_SKU) (
IN UINTN SkuId
IN SKU_ID SkuId
);
typedef
UINT8
(EFIAPI *PCD_PROTOCOL_GET8) (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
UINT16
(EFIAPI *PCD_PROTOCOL_GET16) (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
UINT32
(EFIAPI *PCD_PROTOCOL_GET32) (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
UINT64
(EFIAPI *PCD_PROTOCOL_GET64) (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
VOID *
(EFIAPI *PCD_PROTOCOL_GET_POINTER) (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
BOOLEAN
(EFIAPI *PCD_PROTOCOL_GET_BOOLEAN) (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
UINTN
(EFIAPI *PCD_PROTOCOL_GET_SIZE) (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
UINT8
(EFIAPI *PCD_PROTOCOL_GET_EX_8) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
UINT16
(EFIAPI *PCD_PROTOCOL_GET_EX_16) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
UINT32
(EFIAPI *PCD_PROTOCOL_GET_EX_32) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
UINT64
(EFIAPI *PCD_PROTOCOL_GET_EX_64) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
VOID *
(EFIAPI *PCD_PROTOCOL_GET_EX_POINTER) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
BOOLEAN
(EFIAPI *PCD_PROTOCOL_GET_EX_BOOLEAN) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
UINTN
(EFIAPI *PCD_PROTOCOL_GET_EX_SIZE) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
);
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET8) (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT8 Value
);
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET16) (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT16 Value
);
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET32) (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT32 Value
);
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET64) (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT64 Value
);
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET_POINTER) (
IN UINTN TokenNumber,
IN CONST VOID *Value
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINTN SizeOfBuffer,
IN VOID *Buffer
);
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET_BOOLEAN) (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN BOOLEAN Value
);
@ -167,7 +168,7 @@ typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET_EX_8) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT8 Value
);
@ -175,7 +176,7 @@ typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET_EX_16) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT16 Value
);
@ -183,7 +184,7 @@ typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET_EX_32) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT32 Value
);
@ -191,7 +192,7 @@ typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET_EX_64) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT64 Value
);
@ -199,15 +200,16 @@ typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET_EX_POINTER) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN CONST VOID *Value
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINTN SizeOfBuffer,
IN VOID *Buffer
);
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET_EX_BOOLEAN) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN BOOLEAN Value
);
@ -225,16 +227,16 @@ EFI_STATUS
typedef
VOID
(EFIAPI *PCD_PROTOCOL_CALLBACK) (
IN CONST EFI_GUID *CallBackGuid, OPTIONAL
IN UINTN CallBackToken,
IN VOID *TokenData,
IN UINTN TokenDataSize
IN CONST EFI_GUID *CallBackGuid, OPTIONAL
IN PCD_TOKEN_NUMBER CallBackToken,
IN OUT VOID *TokenData,
IN UINTN TokenDataSize
);
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_CALLBACK_ONSET) (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN CONST EFI_GUID *Guid, OPTIONAL
IN PCD_PROTOCOL_CALLBACK CallBackFunction
);
@ -242,7 +244,7 @@ EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_CANCEL_CALLBACK) (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN CONST EFI_GUID *Guid, OPTIONAL
IN PCD_PROTOCOL_CALLBACK CallBackFunction
);
@ -251,7 +253,7 @@ typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_GET_NEXT_TOKEN) (
IN CONST EFI_GUID *Guid, OPTIONAL
IN OUT UINTN *TokenNumber
IN OUT PCD_TOKEN_NUMBER *TokenNumber
);
typedef struct {

View File

@ -22,13 +22,13 @@
@param[in] SkuId The SKU value that will be used when the PCD service will retrieve and
set values associated with a PCD token.
@retval UINTN Return the SKU ID that just be set.
@retval SKU_ID Return the SKU ID that just be set.
**/
UINTN
SKU_ID
EFIAPI
LibPcdSetSku (
IN UINTN SkuId
IN SKU_ID SkuId
)
{
return SkuId;
@ -47,7 +47,7 @@ LibPcdSetSku (
UINT8
EFIAPI
LibPcdGet8 (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
return 0;
@ -66,7 +66,7 @@ LibPcdGet8 (
UINT16
EFIAPI
LibPcdGet16 (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
return 0;
@ -85,7 +85,7 @@ LibPcdGet16 (
UINT32
EFIAPI
LibPcdGet32 (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
return 0;
@ -104,7 +104,7 @@ LibPcdGet32 (
UINT64
EFIAPI
LibPcdGet64 (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
return 0;
@ -123,7 +123,7 @@ LibPcdGet64 (
VOID *
EFIAPI
LibPcdGetPtr (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
return 0;
@ -142,7 +142,7 @@ LibPcdGetPtr (
BOOLEAN
EFIAPI
LibPcdGetBool (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
return 0;
@ -161,7 +161,7 @@ LibPcdGetBool (
UINTN
EFIAPI
LibPcdGetSize (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
return 0;
@ -184,7 +184,7 @@ UINT8
EFIAPI
LibPcdGetEx8 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
ASSERT (Guid != NULL);
@ -209,7 +209,7 @@ UINT16
EFIAPI
LibPcdGetEx16 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
ASSERT (Guid != NULL);
@ -234,7 +234,7 @@ UINT32
EFIAPI
LibPcdGetEx32 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
ASSERT (Guid != NULL);
@ -259,7 +259,7 @@ UINT64
EFIAPI
LibPcdGetEx64 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
ASSERT (Guid != NULL);
@ -284,7 +284,7 @@ VOID *
EFIAPI
LibPcdGetExPtr (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
ASSERT (Guid != NULL);
@ -309,7 +309,7 @@ BOOLEAN
EFIAPI
LibPcdGetExBool (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
ASSERT (Guid != NULL);
@ -334,7 +334,7 @@ UINTN
EFIAPI
LibPcdGetExSize (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
ASSERT (Guid != NULL);
@ -357,7 +357,7 @@ LibPcdGetExSize (
UINT8
EFIAPI
LibPcdSet8 (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT8 Value
)
{
@ -379,7 +379,7 @@ LibPcdSet8 (
UINT16
EFIAPI
LibPcdSet16 (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT16 Value
)
{
@ -401,7 +401,7 @@ LibPcdSet16 (
UINT32
EFIAPI
LibPcdSet32 (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT32 Value
)
{
@ -423,7 +423,7 @@ LibPcdSet32 (
UINT64
EFIAPI
LibPcdSet64 (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT64 Value
)
{
@ -446,15 +446,14 @@ LibPcdSet64 (
VOID *
EFIAPI
LibPcdSetPtr (
IN UINTN TokenNumber,
IN CONST VOID *Value
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINTN SizeOfBuffer,
IN VOID *Buffer
)
{
ASSERT (Value != NULL);
//
// Remove the CONST
//
return (VOID *)Value;
ASSERT (Buffer != NULL);
return Buffer;
}
@ -472,7 +471,7 @@ LibPcdSetPtr (
BOOLEAN
EFIAPI
LibPcdSetBool (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN BOOLEAN Value
)
{
@ -498,7 +497,7 @@ UINT8
EFIAPI
LibPcdSetEx8 (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT8 Value
)
{
@ -526,7 +525,7 @@ UINT16
EFIAPI
LibPcdSetEx16 (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT16 Value
)
{
@ -554,7 +553,7 @@ UINT32
EFIAPI
LibPcdSetEx32 (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT32 Value
)
{
@ -582,7 +581,7 @@ UINT64
EFIAPI
LibPcdSetEx64 (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT64 Value
)
{
@ -611,17 +610,15 @@ VOID *
EFIAPI
LibPcdSetExPtr (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN CONST VOID *Value
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINTN SizeOfBuffer,
IN VOID *Buffer
)
{
//
// Remove the CONST
//
ASSERT (Guid != NULL);
ASSERT (Value != NULL);
ASSERT (Buffer != NULL);
return (VOID *)Value;
return Buffer;
}
@ -643,7 +640,7 @@ BOOLEAN
EFIAPI
LibPcdSetExBool (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN BOOLEAN Value
)
{
@ -674,7 +671,7 @@ VOID
EFIAPI
LibPcdCallbackOnSet (
IN CONST GUID *Guid, OPTIONAL
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN PCD_CALLBACK NotificationFunction
)
{
@ -698,7 +695,7 @@ VOID
EFIAPI
LibPcdCancelCallback (
IN CONST GUID *Guid, OPTIONAL
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN PCD_CALLBACK NotificationFunction
)
{
@ -720,14 +717,14 @@ LibPcdCancelCallback (
@param[in] The previous PCD token number. If 0, then retrieves the first PCD
token number.
@retval UINTN The next valid token number.
@retval PCD_TOKEN_NUMBER The next valid token number.
**/
UINTN
PCD_TOKEN_NUMBER
EFIAPI
LibPcdGetNextToken (
IN CONST GUID *Guid, OPTIONAL
IN OUT UINTN *TokenNumber
IN OUT PCD_TOKEN_NUMBER TokenNumber
)
{
return 0;

View File

@ -48,19 +48,16 @@ PcdLibConstructor (
@param[in] SkuId The SKU value that will be used when the PCD service will retrieve and
set values associated with a PCD token.
@retval UINTN Return the SKU ID that just be set.
@retval SKU_ID Return the SKU ID that just be set.
**/
UINTN
SKU_ID
EFIAPI
LibPcdSetSku (
IN UINTN SkuId
IN SKU_ID SkuId
)
{
EFI_STATUS Status;
Status = mPcd->SetSku (SkuId);
ASSERT_EFI_ERROR (Status);
mPcd->SetSku (SkuId);
return SkuId;
}
@ -78,7 +75,7 @@ LibPcdSetSku (
UINT8
EFIAPI
LibPcdGet8 (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
return mPcd->Get8 (TokenNumber);
@ -97,7 +94,7 @@ LibPcdGet8 (
UINT16
EFIAPI
LibPcdGet16 (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
return mPcd->Get16 (TokenNumber);
@ -116,7 +113,7 @@ LibPcdGet16 (
UINT32
EFIAPI
LibPcdGet32 (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
return mPcd->Get32 (TokenNumber);
@ -135,7 +132,7 @@ LibPcdGet32 (
UINT64
EFIAPI
LibPcdGet64 (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
return mPcd->Get64 (TokenNumber);
@ -154,7 +151,7 @@ LibPcdGet64 (
VOID *
EFIAPI
LibPcdGetPtr (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
return mPcd->GetPtr (TokenNumber);
@ -173,7 +170,7 @@ LibPcdGetPtr (
BOOLEAN
EFIAPI
LibPcdGetBool (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
return mPcd->GetBool (TokenNumber);
@ -192,7 +189,7 @@ LibPcdGetBool (
UINTN
EFIAPI
LibPcdGetSize (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
return mPcd->GetSize (TokenNumber);
@ -215,7 +212,7 @@ UINT8
EFIAPI
LibPcdGetEx8 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
ASSERT (Guid != NULL);
@ -239,7 +236,7 @@ UINT16
EFIAPI
LibPcdGetEx16 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
ASSERT (Guid != NULL);
@ -263,7 +260,7 @@ UINT32
EFIAPI
LibPcdGetEx32 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
ASSERT (Guid != NULL);
@ -288,7 +285,7 @@ UINT64
EFIAPI
LibPcdGetEx64 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
ASSERT (Guid != NULL);
@ -313,7 +310,7 @@ VOID *
EFIAPI
LibPcdGetExPtr (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
ASSERT (Guid != NULL);
@ -338,7 +335,7 @@ BOOLEAN
EFIAPI
LibPcdGetExBool (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
ASSERT (Guid != NULL);
@ -363,7 +360,7 @@ UINTN
EFIAPI
LibPcdGetExSize (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
ASSERT (Guid != NULL);
@ -386,7 +383,7 @@ LibPcdGetExSize (
UINT8
EFIAPI
LibPcdSet8 (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT8 Value
)
{
@ -414,7 +411,7 @@ LibPcdSet8 (
UINT16
EFIAPI
LibPcdSet16 (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT16 Value
)
{
@ -442,7 +439,7 @@ LibPcdSet16 (
UINT32
EFIAPI
LibPcdSet32 (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT32 Value
)
{
@ -469,7 +466,7 @@ LibPcdSet32 (
UINT64
EFIAPI
LibPcdSet64 (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT64 Value
)
{
@ -498,19 +495,20 @@ LibPcdSet64 (
VOID *
EFIAPI
LibPcdSetPtr (
IN UINTN TokenNumber,
IN CONST VOID *Value
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINTN SizeOfBuffer,
IN VOID *Buffer
)
{
EFI_STATUS Status;
ASSERT (Value != NULL);
ASSERT (Buffer != NULL);
Status = mPcd->SetPtr (TokenNumber, Value);
Status = mPcd->SetPtr (TokenNumber, SizeOfBuffer, Buffer);
ASSERT_EFI_ERROR (Status);
return (VOID *)Value;
return Buffer;
}
@ -528,7 +526,7 @@ LibPcdSetPtr (
BOOLEAN
EFIAPI
LibPcdSetBool (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN BOOLEAN Value
)
{
@ -560,7 +558,7 @@ UINT8
EFIAPI
LibPcdSetEx8 (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT8 Value
)
{
@ -594,7 +592,7 @@ UINT16
EFIAPI
LibPcdSetEx16 (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT16 Value
)
{
@ -628,7 +626,7 @@ UINT32
EFIAPI
LibPcdSetEx32 (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT32 Value
)
{
@ -662,7 +660,7 @@ UINT64
EFIAPI
LibPcdSetEx64 (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT64 Value
)
{
@ -697,20 +695,21 @@ VOID *
EFIAPI
LibPcdSetExPtr (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN CONST VOID *Value
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINTN SizeOfBuffer,
IN VOID *Buffer
)
{
EFI_STATUS Status;
ASSERT (Guid != NULL);
ASSERT (Value != NULL);
ASSERT (Buffer != NULL);
Status = mPcd->SetPtrEx (Guid, TokenNumber, Value);
Status = mPcd->SetPtrEx (Guid, TokenNumber, SizeOfBuffer, Buffer);
ASSERT_EFI_ERROR (Status);
return (VOID *)Value;
return Buffer;
}
@ -732,7 +731,7 @@ BOOLEAN
EFIAPI
LibPcdSetExBool (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN BOOLEAN Value
)
{
@ -769,7 +768,7 @@ VOID
EFIAPI
LibPcdCallbackOnSet (
IN CONST GUID *Guid, OPTIONAL
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN PCD_CALLBACK NotificationFunction
)
{
@ -801,7 +800,7 @@ VOID
EFIAPI
LibPcdCancelCallback (
IN CONST GUID *Guid, OPTIONAL
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN PCD_CALLBACK NotificationFunction
)
{
@ -831,22 +830,22 @@ LibPcdCancelCallback (
@param[in] The previous PCD token number. If 0, then retrieves the first PCD
token number.
@retval UINTN The next valid token number.
@retval PCD_TOKEN_NUMBER The next valid token number.
**/
UINTN
PCD_TOKEN_NUMBER
EFIAPI
LibPcdGetNextToken (
IN CONST GUID *Guid, OPTIONAL
IN OUT UINTN *TokenNumber
IN OUT PCD_TOKEN_NUMBER TokenNumber
)
{
EFI_STATUS Status;
Status = mPcd->GetNextToken (Guid, TokenNumber);
Status = mPcd->GetNextToken (Guid, &TokenNumber);
ASSERT_EFI_ERROR (Status);
return (*TokenNumber);
return TokenNumber;
}

View File

@ -58,23 +58,17 @@ GetPcdPpiPtr (
@param[in] SkuId The SKU value that will be used when the PCD service will retrieve and
set values associated with a PCD token.
@retval UINTN Return the SKU ID that just be set.
@retval SKU_ID Return the SKU ID that just be set.
**/
UINTN
SKU_ID
EFIAPI
LibPcdSetSku (
IN UINTN SkuId
IN SKU_ID SkuId
)
{
EFI_STATUS Status;
PCD_PPI *PcdPpi;
PcdPpi = GetPcdPpiPtr ();
Status = PcdPpi->SetSku (SkuId);
ASSERT_EFI_ERROR (Status);
GetPcdPpiPtr()->SetSku (SkuId);;
return SkuId;
}
@ -92,7 +86,7 @@ LibPcdSetSku (
UINT8
EFIAPI
LibPcdGet8 (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
PCD_PPI * PcdPpi;
@ -115,7 +109,7 @@ LibPcdGet8 (
UINT16
EFIAPI
LibPcdGet16 (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
PCD_PPI *PcdPpi;
@ -138,7 +132,7 @@ LibPcdGet16 (
UINT32
EFIAPI
LibPcdGet32 (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
PCD_PPI * PcdPpi;
@ -161,7 +155,7 @@ LibPcdGet32 (
UINT64
EFIAPI
LibPcdGet64 (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
PCD_PPI * PcdPpi;
@ -184,7 +178,7 @@ LibPcdGet64 (
VOID *
EFIAPI
LibPcdGetPtr (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
PCD_PPI * PcdPpi;
@ -207,7 +201,7 @@ LibPcdGetPtr (
BOOLEAN
EFIAPI
LibPcdGetBool (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
PCD_PPI * PcdPpi;
@ -230,7 +224,7 @@ LibPcdGetBool (
UINTN
EFIAPI
LibPcdGetSize (
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
PCD_PPI * PcdPpi;
@ -257,7 +251,7 @@ UINT8
EFIAPI
LibPcdGetEx8 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
PCD_PPI * PcdPpi;
@ -284,7 +278,7 @@ UINT16
EFIAPI
LibPcdGetEx16 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
PCD_PPI * PcdPpi;
@ -311,7 +305,7 @@ UINT32
EFIAPI
LibPcdGetEx32 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
PCD_PPI * PcdPpi;
@ -339,7 +333,7 @@ UINT64
EFIAPI
LibPcdGetEx64 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
PCD_PPI * PcdPpi;
@ -366,7 +360,7 @@ VOID *
EFIAPI
LibPcdGetExPtr (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
PCD_PPI * PcdPpi;
@ -393,7 +387,7 @@ BOOLEAN
EFIAPI
LibPcdGetExBool (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
PCD_PPI * PcdPpi;
@ -420,7 +414,7 @@ UINTN
EFIAPI
LibPcdGetExSize (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN PCD_TOKEN_NUMBER TokenNumber
)
{
PCD_PPI * PcdPpi;
@ -445,7 +439,7 @@ LibPcdGetExSize (
UINT8
EFIAPI
LibPcdSet8 (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT8 Value
)
{
@ -477,7 +471,7 @@ LibPcdSet8 (
UINT16
EFIAPI
LibPcdSet16 (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT16 Value
)
{
@ -509,7 +503,7 @@ LibPcdSet16 (
UINT32
EFIAPI
LibPcdSet32 (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT32 Value
)
{
@ -540,7 +534,7 @@ LibPcdSet32 (
UINT64
EFIAPI
LibPcdSet64 (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT64 Value
)
{
@ -573,8 +567,9 @@ LibPcdSet64 (
VOID *
EFIAPI
LibPcdSetPtr (
IN UINTN TokenNumber,
IN CONST VOID *Value
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINTN SizeOfBuffer,
IN VOID *Buffer
)
{
EFI_STATUS Status;
@ -583,11 +578,11 @@ LibPcdSetPtr (
PcdPpi = GetPcdPpiPtr ();
Status = PcdPpi->SetPtr (TokenNumber, Value);
Status = PcdPpi->SetPtr (TokenNumber, SizeOfBuffer, Buffer);
ASSERT_EFI_ERROR (Status);
return (VOID *)Value;
return Buffer;
}
@ -605,7 +600,7 @@ LibPcdSetPtr (
BOOLEAN
EFIAPI
LibPcdSetBool (
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN BOOLEAN Value
)
{
@ -641,7 +636,7 @@ UINT8
EFIAPI
LibPcdSetEx8 (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT8 Value
)
{
@ -677,7 +672,7 @@ UINT16
EFIAPI
LibPcdSetEx16 (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT16 Value
)
{
@ -713,7 +708,7 @@ UINT32
EFIAPI
LibPcdSetEx32 (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT32 Value
)
{
@ -749,7 +744,7 @@ UINT64
EFIAPI
LibPcdSetEx64 (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINT64 Value
)
{
@ -786,8 +781,9 @@ VOID *
EFIAPI
LibPcdSetExPtr (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN CONST VOID *Value
IN PCD_TOKEN_NUMBER TokenNumber,
IN UINTN SizeOfBuffer,
IN VOID *Buffer
)
{
EFI_STATUS Status;
@ -795,12 +791,11 @@ LibPcdSetExPtr (
PcdPpi = GetPcdPpiPtr ();
Status = PcdPpi->SetPtrEx (Guid, TokenNumber, Value);
Status = PcdPpi->SetPtrEx (Guid, TokenNumber, SizeOfBuffer, Buffer);
ASSERT_EFI_ERROR (Status);
return (VOID *)Value;
return Buffer;
}
@ -822,7 +817,7 @@ BOOLEAN
EFIAPI
LibPcdSetExBool (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN BOOLEAN Value
)
{
@ -861,7 +856,7 @@ VOID
EFIAPI
LibPcdCallbackOnSet (
IN CONST GUID *Guid, OPTIONAL
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN PCD_CALLBACK NotificationFunction
)
{
@ -895,7 +890,7 @@ VOID
EFIAPI
LibPcdCancelCallback (
IN CONST GUID *Guid, OPTIONAL
IN UINTN TokenNumber,
IN PCD_TOKEN_NUMBER TokenNumber,
IN PCD_CALLBACK NotificationFunction
)
{
@ -927,14 +922,14 @@ LibPcdCancelCallback (
@param[in] The previous PCD token number. If 0, then retrieves the first PCD
token number.
@retval UINTN The next valid token number.
@retval PCD_TOKEN_NUMBER The next valid token number.
**/
UINTN
PCD_TOKEN_NUMBER
EFIAPI
LibPcdGetNextToken (
IN CONST GUID *Guid, OPTIONAL
IN OUT UINTN *TokenNumber
IN OUT PCD_TOKEN_NUMBER TokenNumber
)
{
EFI_STATUS Status;
@ -943,9 +938,9 @@ LibPcdGetNextToken (
PcdPpi = GetPcdPpiPtr ();
Status = PcdPpi->GetNextToken (Guid, TokenNumber);
Status = PcdPpi->GetNextToken (Guid, &TokenNumber);
ASSERT_EFI_ERROR (Status);
return (*TokenNumber);
return TokenNumber;
}