/** @file\r
- Platform Configuration Database (PCD) Protocol\r
+ Platform Configuration Database (PCD) PPI\r
\r
- Copyright (c) 2006, Intel Corporation \r
+ Copyright (c) 2006 - 2007, Intel Corporation \r
All rights reserved. This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
- Module Name: Pcd.h\r
-\r
**/\r
\r
-#ifndef __PCD_H__\r
-#define __PCD_H__\r
-\r
-extern EFI_GUID gPcdPpiGuid;\r
+#ifndef __PCD_PPI_H__\r
+#define __PCD_PPI_H__\r
\r
#define PCD_PPI_GUID \\r
{ 0x6e81c58, 0x4ad7, 0x44bc, { 0x83, 0x90, 0xf1, 0x2, 0x65, 0xf7, 0x24, 0x80 } }\r
**/\r
typedef \r
VOID\r
-(EFIAPI *PCD_PPI_SET_SKU) (\r
+(EFIAPI *PCD_PPI_SET_SKU)(\r
IN UINTN SkuId\r
);\r
\r
**/\r
typedef\r
UINT8\r
-(EFIAPI *PCD_PPI_GET8) (\r
+(EFIAPI *PCD_PPI_GET8)(\r
IN UINTN TokenNumber\r
);\r
\r
**/\r
typedef\r
UINT16\r
-(EFIAPI *PCD_PPI_GET16) (\r
+(EFIAPI *PCD_PPI_GET16)(\r
IN UINTN TokenNumber\r
);\r
\r
**/\r
typedef\r
UINT32\r
-(EFIAPI *PCD_PPI_GET32) (\r
+(EFIAPI *PCD_PPI_GET32)(\r
IN UINTN TokenNumber\r
);\r
\r
**/\r
typedef\r
UINT64\r
-(EFIAPI *PCD_PPI_GET64) (\r
+(EFIAPI *PCD_PPI_GET64)(\r
IN UINTN TokenNumber\r
);\r
\r
**/\r
typedef\r
VOID *\r
-(EFIAPI *PCD_PPI_GET_POINTER) (\r
+(EFIAPI *PCD_PPI_GET_POINTER)(\r
IN UINTN TokenNumber\r
);\r
\r
**/\r
typedef\r
BOOLEAN\r
-(EFIAPI *PCD_PPI_GET_BOOLEAN) (\r
+(EFIAPI *PCD_PPI_GET_BOOLEAN)(\r
IN UINTN TokenNumber\r
);\r
\r
**/\r
typedef\r
UINTN\r
-(EFIAPI *PCD_PPI_GET_SIZE) (\r
+(EFIAPI *PCD_PPI_GET_SIZE)(\r
IN UINTN TokenNumber\r
);\r
\r
\r
\r
/**\r
- Retrieves an 8-bit value for a given PCD token.\r
+ Retrieves an 8-bit value for a given PCD token and token space.\r
\r
Retrieves the 8-bit value of a particular PCD token. \r
If the TokenNumber is invalid or the token space\r
**/\r
typedef\r
UINT8\r
-(EFIAPI *PCD_PPI_GET_EX_8) (\r
+(EFIAPI *PCD_PPI_GET_EX_8)(\r
IN CONST EFI_GUID *Guid,\r
IN UINTN TokenNumber\r
);\r
\r
\r
/**\r
- Retrieves an 16-bit value for a given PCD token.\r
+ Retrieves an 16-bit value for a given PCD token and token space.\r
\r
Retrieves the 16-bit value of a particular PCD token. \r
If the TokenNumber is invalid or the token space\r
**/\r
typedef\r
UINT16\r
-(EFIAPI *PCD_PPI_GET_EX_16) (\r
+(EFIAPI *PCD_PPI_GET_EX_16)(\r
IN CONST EFI_GUID *Guid,\r
IN UINTN TokenNumber\r
);\r
\r
\r
/**\r
- Retrieves an 32-bit value for a given PCD token.\r
+ Retrieves an 32-bit value for a given PCD token and token space.\r
\r
Retrieves the 32-bit value of a particular PCD token. \r
If the TokenNumber is invalid or the token space\r
**/\r
typedef\r
UINT32\r
-(EFIAPI *PCD_PPI_GET_EX_32) (\r
+(EFIAPI *PCD_PPI_GET_EX_32)(\r
IN CONST EFI_GUID *Guid,\r
IN UINTN TokenNumber\r
);\r
\r
\r
/**\r
- Retrieves an 64-bit value for a given PCD token.\r
+ Retrieves an 64-bit value for a given PCD token and token space.\r
\r
Retrieves the 64-bit value of a particular PCD token. \r
If the TokenNumber is invalid or the token space\r
**/\r
typedef\r
UINT64\r
-(EFIAPI *PCD_PPI_GET_EX_64) (\r
+(EFIAPI *PCD_PPI_GET_EX_64)(\r
IN CONST EFI_GUID *Guid,\r
IN UINTN TokenNumber\r
);\r
\r
\r
/**\r
- Retrieves a pointer to a value for a given PCD token.\r
+ Retrieves a pointer to a value for a given PCD token and token space.\r
\r
Retrieves the current pointer to the buffer for a PCD token number. \r
Do not make any assumptions about the alignment of the pointer that \r
**/\r
typedef\r
VOID *\r
-(EFIAPI *PCD_PPI_GET_EX_POINTER) (\r
+(EFIAPI *PCD_PPI_GET_EX_POINTER)(\r
IN CONST EFI_GUID *Guid,\r
IN UINTN TokenNumber\r
);\r
\r
\r
/**\r
- Retrieves an Boolean value for a given PCD token.\r
+ Retrieves an Boolean value for a given PCD token and token space.\r
\r
Retrieves the Boolean value of a particular PCD token. \r
If the TokenNumber is invalid or the token space\r
**/\r
typedef\r
BOOLEAN\r
-(EFIAPI *PCD_PPI_GET_EX_BOOLEAN) (\r
+(EFIAPI *PCD_PPI_GET_EX_BOOLEAN)(\r
IN CONST EFI_GUID *Guid,\r
IN UINTN TokenNumber\r
);\r
\r
\r
/**\r
- Retrieves the size of the value for a given PCD token.\r
+ Retrieves the size of the value for a given PCD token and token space.\r
\r
Retrieves the current size of a particular PCD token. \r
If the TokenNumber is invalid, the results are unpredictable.\r
**/\r
typedef\r
UINTN\r
-(EFIAPI *PCD_PPI_GET_EX_SIZE) (\r
+(EFIAPI *PCD_PPI_GET_EX_SIZE)(\r
IN CONST EFI_GUID *Guid,\r
IN UINTN TokenNumber\r
);\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *PCD_PPI_SET8) (\r
+(EFIAPI *PCD_PPI_SET8)(\r
IN UINTN TokenNumber,\r
IN UINT8 Value\r
);\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *PCD_PPI_SET16) (\r
+(EFIAPI *PCD_PPI_SET16)(\r
IN UINTN TokenNumber,\r
IN UINT16 Value\r
);\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *PCD_PPI_SET32) (\r
+(EFIAPI *PCD_PPI_SET32)(\r
IN UINTN TokenNumber,\r
IN UINT32 Value\r
);\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *PCD_PPI_SET64) (\r
+(EFIAPI *PCD_PPI_SET64)(\r
IN UINTN TokenNumber,\r
IN UINT64 Value\r
);\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *PCD_PPI_SET_POINTER) (\r
+(EFIAPI *PCD_PPI_SET_POINTER)(\r
IN UINTN TokenNumber,\r
IN OUT UINTN *SizeOfBuffer,\r
IN VOID *Buffer\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *PCD_PPI_SET_BOOLEAN) (\r
+(EFIAPI *PCD_PPI_SET_BOOLEAN)(\r
IN UINTN TokenNumber,\r
IN BOOLEAN Value\r
);\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *PCD_PPI_SET_EX_8) (\r
+(EFIAPI *PCD_PPI_SET_EX_8)(\r
IN CONST EFI_GUID *Guid,\r
IN UINTN TokenNumber,\r
IN UINT8 Value\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *PCD_PPI_SET_EX_16) (\r
+(EFIAPI *PCD_PPI_SET_EX_16)(\r
IN CONST EFI_GUID *Guid,\r
IN UINTN TokenNumber,\r
IN UINT16 Value\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *PCD_PPI_SET_EX_32) (\r
+(EFIAPI *PCD_PPI_SET_EX_32)(\r
IN CONST EFI_GUID *Guid,\r
IN UINTN TokenNumber,\r
IN UINT32 Value\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *PCD_PPI_SET_EX_64) (\r
+(EFIAPI *PCD_PPI_SET_EX_64)(\r
IN CONST EFI_GUID *Guid,\r
IN UINTN TokenNumber,\r
IN UINT64 Value\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *PCD_PPI_SET_EX_POINTER) (\r
+(EFIAPI *PCD_PPI_SET_EX_POINTER)(\r
IN CONST EFI_GUID *Guid,\r
IN UINTN TokenNumber,\r
IN OUT UINTN *SizeOfBuffer,\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *PCD_PPI_SET_EX_BOOLEAN) (\r
+(EFIAPI *PCD_PPI_SET_EX_BOOLEAN)(\r
IN CONST EFI_GUID *Guid,\r
IN UINTN TokenNumber,\r
IN BOOLEAN Value\r
**/\r
typedef\r
VOID\r
-(EFIAPI *PCD_PPI_CALLBACK) (\r
+(EFIAPI *PCD_PPI_CALLBACK)(\r
IN CONST EFI_GUID *CallBackGuid, OPTIONAL\r
IN UINTN CallBackToken,\r
IN OUT VOID *TokenData,\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *PCD_PPI_CALLBACK_ONSET) (\r
+(EFIAPI *PCD_PPI_CALLBACK_ONSET)(\r
IN CONST EFI_GUID *Guid, OPTIONAL\r
IN UINTN TokenNumber,\r
IN PCD_PPI_CALLBACK CallBackFunction\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *PCD_PPI_CANCEL_CALLBACK) (\r
+(EFIAPI *PCD_PPI_CANCEL_CALLBACK)(\r
IN CONST EFI_GUID *Guid, OPTIONAL\r
IN UINTN TokenNumber,\r
IN PCD_PPI_CALLBACK CallBackFunction\r
@param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.\r
@param[in, out] TokenNumber A pointer to the PCD token number to use to find the subsequent token number.\r
If the input token namespace or token number does not exist on the platform, an error is \r
- returned and the value of *TokenNumber is undefined. To retrieve the ¡°first¡± token, \r
+ returned and the value of *TokenNumber is undefined. To retrieve the "first" token, \r
have the pointer reference a TokenNumber value of 0. If the input token number is 0 \r
and there is no valid token number for this token namespace, *TokenNumber will be \r
assigned to 0 and the function return EFI_SUCCESS. If the token number is the last valid \r
**/\r
typedef \r
EFI_STATUS\r
-(EFIAPI *PCD_PPI_GET_NEXT_TOKEN) (\r
+(EFIAPI *PCD_PPI_GET_NEXT_TOKEN)(\r
IN CONST EFI_GUID *Guid, OPTIONAL\r
IN OUT UINTN *TokenNumber\r
);\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *PCD_PPI_GET_NEXT_TOKENSPACE) (\r
+(EFIAPI *PCD_PPI_GET_NEXT_TOKENSPACE)(\r
IN OUT CONST EFI_GUID **Guid\r
);\r
\r
//\r
// Interface structure for the PCD PPI\r
//\r
+/**\r
+ @par Ppi Description:\r
+ This service abstracts the ability to set/get Platform Configuration Database (PCD).\r
+\r
+ @param SetSku\r
+ Sets the SKU value for subsequent calls to set or get PCD token values.\r
+ \r
+ @param Get8\r
+ Retrieves an 8-bit value for a given PCD token.\r
+\r
+ @param Get16\r
+ Retrieves an 16-bit value for a given PCD token.\r
+\r
+ @param Get32\r
+ Retrieves an 32-bit value for a given PCD token.\r
+\r
+ @param Get64\r
+ Retrieves an 64-bit value for a given PCD token.\r
+\r
+ @param GetPtr\r
+ Retrieves a pointer to a value for a given PCD token.\r
+\r
+ @param GetBool\r
+ Retrieves an Boolean value for a given PCD token.\r
+\r
+ @param GetSize\r
+ Retrieves the size of the value for a given PCD token.\r
+\r
+ @param Get8Ex\r
+ Retrieves an 8-bit value for a given PCD token and token space.\r
+\r
+ @param Get16Ex\r
+ Retrieves an 16-bit value for a given PCD token and token space.\r
+\r
+ @param Get32Ex\r
+ Retrieves an 32-bit value for a given PCD token and token space.\r
+\r
+ @param Get64Ex\r
+ Retrieves an 64-bit value for a given PCD token and token space.\r
+\r
+ @param GetPtrEx\r
+ Retrieves a pointer to a value for a given PCD token and token space.\r
+\r
+ @param GetBoolEx\r
+ Retrieves an Boolean value for a given PCD token and token space.\r
+\r
+ @param GetSizeEx\r
+ Retrieves the size of the value for a given PCD token and token space.\r
+\r
+ @param Set8\r
+ Sets an 8-bit value for a given PCD token.\r
+\r
+ @param Set16\r
+ Sets an 16-bit value for a given PCD token.\r
+\r
+ @param Set32\r
+ Sets an 32-bit value for a given PCD token.\r
+\r
+ @param Set64\r
+ Sets an 64-bit value for a given PCD token.\r
+\r
+ @param SetPtr\r
+ Sets the buffer of a specified size for a given PCD token.\r
+\r
+ @param SetBool\r
+ Sets an Boolean value for a given PCD token.\r
+\r
+ @param Set8Ex\r
+ Sets an 8-bit value for a given PCD token and token space.\r
+\r
+ @param Set16Ex\r
+ Sets an 16-bit value for a given PCD token and token space.\r
+\r
+ @param Set32Ex\r
+ Sets an 32-bit value for a given PCD token and token space.\r
+\r
+ @param Set64Ex\r
+ Sets an 64-bit value for a given PCD token and token space.\r
+\r
+ @param SetPtrEx\r
+ Sets the buffer of a specified size for a given PCD token and token space.\r
+\r
+ @param SetBoolEx\r
+ Sets an Boolean value for a given PCD token and token space.\r
+ \r
+ @param CallbackOnSet\r
+ Specifies a function to be called anytime the value of a designated token is changed.\r
+ \r
+ @param CancelCallback\r
+ Cancels a previously set callback function for a particular PCD token number.\r
+ \r
+ @param GetNextToken\r
+ Retrieves the next valid PCD token for a given namespace.\r
+ \r
+ @param GetNextTokenSpace\r
+ Retrieves the next valid PCD token namespace for a given namespace.\r
+ \r
+**/\r
typedef struct {\r
PCD_PPI_SET_SKU SetSku;\r
\r
} PCD_PPI;\r
\r
\r
+extern EFI_GUID gPcdPpiGuid;\r
+\r
#endif\r