diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-03-01 06:14:46 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-03-01 06:14:46 +0000 |
commit | d6b58d3219bccd98867bae0733bed5b2228aeef1 (patch) | |
tree | 63a8b162c3391ec15820d43a649a76580d1748fd /MdePkg | |
parent | be04587c86ad728413586feeb648a5fd586adb24 (diff) | |
download | edk2-d6b58d3219bccd98867bae0733bed5b2228aeef1.zip edk2-d6b58d3219bccd98867bae0733bed5b2228aeef1.tar.gz edk2-d6b58d3219bccd98867bae0733bed5b2228aeef1.tar.bz2 |
updated definitions of PCD PPI/Protocol per latest UEFI Spec.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10134 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg')
-rw-r--r-- | MdePkg/Include/Ppi/PiPcd.h | 216 | ||||
-rw-r--r-- | MdePkg/Include/Protocol/PiPcd.h | 170 | ||||
-rw-r--r-- | MdePkg/Library/PeiPcdLib/PeiPcdLib.c | 4 |
3 files changed, 197 insertions, 193 deletions
diff --git a/MdePkg/Include/Ppi/PiPcd.h b/MdePkg/Include/Ppi/PiPcd.h index d0b43ca..372bb11 100644 --- a/MdePkg/Include/Ppi/PiPcd.h +++ b/MdePkg/Include/Ppi/PiPcd.h @@ -1,10 +1,10 @@ /** @file
Platform Configuration Database (PCD) Protocol defined in PI 1.2 Vol3
- A platform database that contains a variety of current platform settings or
+ A platform database that contains a variety of current platform settings or
directives that can be accessed by a driver or application.
PI PCD protocol only provide the accessing interfaces for Dynamic-Ex type PCD.
-
+
Callers to this protocol must be at a TPL_APPLICATION task priority level.
This is the base PCD service API that provides an abstraction for accessing configuration content in
the platform. It a seamless mechanism for extracting information regardless of where the
@@ -12,16 +12,16 @@ This protocol allows access to data through size-granular APIs and provides a mechanism for a
firmware component to monitor specific settings and be alerted when a setting is changed.
- Copyright (c) 2009, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
+ Copyright (c) 2009 - 2010, Intel Corporation
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- @par Revision Reference:
+ @par Revision Reference:
PI Version 1.2 Vol 3.
**/
@@ -47,7 +47,7 @@ extern EFI_GUID gEfiPeiPcdPpiGuid; SKU Id is set or the currently set SKU Id isn't valid for the specified token, the system uses the
default SKU Id. If the system attempts to use the default SKU Id and no value has been set for that
Id, the results are unpredictable.
-
+
@param[in] SkuId The SKU value to set.
**/
typedef
@@ -59,15 +59,15 @@ VOID /**
Retrieves the current byte-sized value for a PCD token number. If the TokenNumber is invalid,
the results are unpredictable.
-
+
@param[in] Guid The 128-bit unique value that designates which namespace to extract the value from.
@param[in] TokenNumber The PCD token number.
-
+
@return 8-bit value for a given PCD token.
**/
typedef
UINT8
-(EFIAPI *EFI_PEI_PCD_PPI_GET_EX_8)(
+(EFIAPI *EFI_PEI_PCD_PPI_GET_8)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
);
@@ -75,15 +75,15 @@ UINT8 /**
Retrieves the current byte-sized value for a PCD token number. If the TokenNumber is invalid,
the results are unpredictable.
-
+
@param[in] Guid The 128-bit unique value that designates which namespace to extract the value from.
@param[in] TokenNumber The PCD token number.
-
+
@return 16-bit value for a given PCD token.
**/
typedef
UINT16
-(EFIAPI *EFI_PEI_PCD_PPI_GET_EX_16)(
+(EFIAPI *EFI_PEI_PCD_PPI_GET_16)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
);
@@ -91,15 +91,15 @@ UINT16 /**
Retrieves the current 32-bit value for a PCD token number. If the TokenNumber is invalid, the
results are unpredictable.
-
+
@param[in] Guid The 128-bit unique value that designates which namespace to extract the value from.
@param[in] TokenNumber The PCD token number.
-
- @return 32-bit value for a given PCD token.
+
+ @return 32-bit value for a given PCD token.
**/
typedef
UINT32
-(EFIAPI *EFI_PEI_PCD_PPI_GET_EX_32)(
+(EFIAPI *EFI_PEI_PCD_PPI_GET_32)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
);
@@ -107,15 +107,15 @@ UINT32 /**
Retrieves the current 64-bit value for a PCD token number. If the TokenNumber is invalid, the
results are unpredictable.
-
+
@param[in] Guid The 128-bit unique value that designates which namespace to extract the value from.
@param[in] TokenNumber The PCD token number.
-
- @return 64-bit value for a given PCD token.
+
+ @return 64-bit value for a given PCD token.
**/
typedef
UINT64
-(EFIAPI *EFI_PEI_PCD_PPI_GET_EX_64)(
+(EFIAPI *EFI_PEI_PCD_PPI_GET_64)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
);
@@ -124,13 +124,13 @@ UINT64 Retrieves the current pointer to the value for a PCD token number. There should not be any
alignment assumptions about the pointer that is returned by this function call. If the TokenNumber
is invalid, the results are unpredictable.
-
+
@param[in] Guid The 128-bit unique value that designates which namespace to extract the value from.
@param[in] TokenNumber The PCD token number.
**/
typedef
VOID *
-(EFIAPI *EFI_PEI_PCD_PPI_GET_EX_POINTER)(
+(EFIAPI *EFI_PEI_PCD_PPI_GET_POINTER)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
);
@@ -141,12 +141,12 @@ VOID * @param[in] Guid The 128-bit unique value that designates which namespace to extract the value from.
@param[in] TokenNumber The PCD token number.
-
+
@return Boolean value for a given PCD token.
**/
typedef
BOOLEAN
-(EFIAPI *EFI_PEI_PCD_PPI_GET_EX_BOOLEAN)(
+(EFIAPI *EFI_PEI_PCD_PPI_GET_BOOLEAN)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
);
@@ -154,38 +154,38 @@ BOOLEAN /**
Retrieves the current size of a particular PCD token. If the TokenNumber is invalid, the results are
unpredictable.
-
+
@param[in] Guid The 128-bit unique value that designates which namespace to extract the value from.
- @param[in] TokenNumber The PCD token number.
-
+ @param[in] TokenNumber The PCD token number.
+
@return the size of the value for a given PCD token.
**/
typedef
UINTN
-(EFIAPI *EFI_PEI_PCD_PPI_GET_EX_SIZE)(
+(EFIAPI *EFI_PEI_PCD_PPI_GET_SIZE)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
);
/**
Sets an 8-bit value for a given PCD token.
-
+
When the PCD service sets a value, it will check to ensure that the size of the value being set is
compatible with the Token's existing definition. If it is not, an error will be returned.
-
+
@param[in] Guid The 128-bit unique value that designates which namespace to extract the value from.
- @param[in] TokenNumber The PCD token number.
+ @param[in] TokenNumber The PCD token number.
@param[in] Value The value to set for the PCD token.
-
+
@retval EFI_SUCCESS The PCD service has set the value requested
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data being set was
incompatible with a call to this function. Use GetSizeEx() to
retrieve the size of the target data.
- @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
+ @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
**/
typedef
EFI_STATUS
-(EFIAPI *EFI_PEI_PCD_PPI_SET_EX_8)(
+(EFIAPI *EFI_PEI_PCD_PPI_SET_8)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN UINT8 Value
@@ -193,23 +193,23 @@ EFI_STATUS /**
Sets an 16-bit value for a given PCD token.
-
+
When the PCD service sets a value, it will check to ensure that the size of the value being set is
compatible with the Token's existing definition. If it is not, an error will be returned.
-
+
@param[in] Guid The 128-bit unique value that designates which namespace to extract the value from.
- @param[in] TokenNumber The PCD token number.
+ @param[in] TokenNumber The PCD token number.
@param[in] Value The value to set for the PCD token.
-
+
@retval EFI_SUCCESS The PCD service has set the value requested
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data being set was
incompatible with a call to this function. Use GetSizeEx() to
retrieve the size of the target data.
- @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
+ @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
**/
typedef
EFI_STATUS
-(EFIAPI *EFI_PEI_PCD_PPI_SET_EX_16)(
+(EFIAPI *EFI_PEI_PCD_PPI_SET_16)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN UINT16 Value
@@ -217,23 +217,23 @@ EFI_STATUS /**
Sets an 32-bit value for a given PCD token.
-
+
When the PCD service sets a value, it will check to ensure that the size of the value being set is
compatible with the Token's existing definition. If it is not, an error will be returned.
-
+
@param[in] Guid The 128-bit unique value that designates which namespace to extract the value from.
- @param[in] TokenNumber The PCD token number.
+ @param[in] TokenNumber The PCD token number.
@param[in] Value The value to set for the PCD token.
-
+
@retval EFI_SUCCESS The PCD service has set the value requested
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data being set was
incompatible with a call to this function. Use GetSizeEx() to
retrieve the size of the target data.
- @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
+ @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
**/
typedef
EFI_STATUS
-(EFIAPI *EFI_PEI_PCD_PPI_SET_EX_32)(
+(EFIAPI *EFI_PEI_PCD_PPI_SET_32)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN UINT32 Value
@@ -241,23 +241,23 @@ EFI_STATUS /**
Sets an 64-bit value for a given PCD token.
-
+
When the PCD service sets a value, it will check to ensure that the size of the value being set is
compatible with the Token's existing definition. If it is not, an error will be returned.
-
+
@param[in] Guid The 128-bit unique value that designates which namespace to extract the value from.
- @param[in] TokenNumber The PCD token number.
+ @param[in] TokenNumber The PCD token number.
@param[in] Value The value to set for the PCD token.
-
+
@retval EFI_SUCCESS The PCD service has set the value requested
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data being set was
incompatible with a call to this function. Use GetSizeEx() to
retrieve the size of the target data.
- @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
+ @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
**/
typedef
EFI_STATUS
-(EFIAPI *EFI_PEI_PCD_PPI_SET_EX_64)(
+(EFIAPI *EFI_PEI_PCD_PPI_SET_64)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN UINT64 Value
@@ -265,24 +265,26 @@ EFI_STATUS /**
Sets a value of the specified size for a given PCD token.
-
+
When the PCD service sets a value, it will check to ensure that the size of the value being set is
compatible with the Token's existing definition. If it is not, an error will be returned.
-
+
@param[in] Guid The 128-bit unique value that designates which namespace to extract the value from.
- @param[in] TokenNumber The PCD token number.
- @param[in] SizeOfValue The length of the Value being set for the PCD token.
+ @param[in] TokenNumber The PCD token number.
+ @param[in] SizeOfValue The length of the value being set for the PCD token. If too large of a length is
+ specified, upon return from this function the value of SizeOfValue will reflect the
+ maximum size for the PCD token.
@param[in] Buffer A pointer to the buffer containing the value to set for the PCD token.
-
+
@retval EFI_SUCCESS The PCD service has set the value requested
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data being set was
incompatible with a call to this function. Use GetSizeEx() to
retrieve the size of the target data.
- @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
+ @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
**/
typedef
EFI_STATUS
-(EFIAPI *EFI_PEI_PCD_PPI_SET_EX_POINTER)(
+(EFIAPI *EFI_PEI_PCD_PPI_SET_POINTER)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN OUT UINTN *SizeOfValue,
@@ -291,23 +293,23 @@ EFI_STATUS /**
Sets a Boolean value for a given PCD token.
-
+
When the PCD service sets a value, it will check to ensure that the size of the value being set is
compatible with the Token's existing definition. If it is not, an error will be returned.
-
+
@param[in] Guid The 128-bit unique value that designates which namespace to extract the value from.
- @param[in] TokenNumber The PCD token number.
+ @param[in] TokenNumber The PCD token number.
@param[in] Value The value to set for the PCD token.
-
+
@retval EFI_SUCCESS The PCD service has set the value requested
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data being set was
incompatible with a call to this function. Use GetSizeEx() to
retrieve the size of the target data.
- @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
+ @retval EFI_NOT_FOUND The PCD service could not find the requested token number.
**/
typedef
EFI_STATUS
-(EFIAPI *EFI_PEI_PCD_PPI_SET_EX_BOOLEAN)(
+(EFIAPI *EFI_PEI_PCD_PPI_SET_BOOLEAN)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN BOOLEAN Value
@@ -315,16 +317,16 @@ EFI_STATUS typedef
VOID
-(EFIAPI *EFI_PCD_PPI_CALLBACK)(
- IN EFI_GUID *Guid OPTIONAL,
- IN UINTN CallBackToken,
- IN VOID *TokenData,
- IN UINTN TokenDatSize
+(EFIAPI *EFI_PEI_PCD_PPI_CALLBACK)(
+ IN EFI_GUID *Guid OPTIONAL,
+ IN UINTN CallBackToken,
+ IN OUT VOID *TokenData,
+ IN UINTN TokenDatSize
);
/**
Specifies a function to be called anytime the value of a designated token is changed.
-
+
@param[in] Guid The 128-bit unique value that designates which namespace to monitor. If NULL, use
the standard platform namespace.
@param[in] CallBackToken The PCD token number to monitor.
@@ -333,48 +335,48 @@ VOID @retval EFI_SUCCESS The PCD service has successfully established a call event for the
CallBackToken requested.
- @retval EFI_NOT_FOUND The PCD service could not find the referenced token number.
+ @retval EFI_NOT_FOUND The PCD service could not find the referenced token number.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_PCD_PPI_CALLBACK_ON_SET)(
- IN CONST EFI_GUID *Guid OPTIONAL,
- IN UINTN CallBackToken,
- IN EFI_PCD_PPI_CALLBACK CallBackFunction
+ IN CONST EFI_GUID *Guid OPTIONAL,
+ IN UINTN CallBackToken,
+ IN EFI_PEI_PCD_PPI_CALLBACK CallBackFunction
);
/**
Cancels a previously set callback function for a particular PCD token number.
-
+
@param[in] Guid The 128-bit unique value that designates which namespace to monitor. If NULL, use
the standard platform namespace.
@param[in] CallBackToken The PCD token number to cancel monitoring.
@param[in] CallBackFunction The function prototype that was originally passed to the CallBackOnSet function.
-
+
@retval EFI_SUCCESS The PCD service has cancelled the call event associated with the
CallBackToken.
@retval EFI_INVALID_PARAMETER The PCD service did not match the CallBackFunction to one
that is currently being monitored.
- @retval EFI_NOT_FOUND The PCD service could not find data the requested token number.
+ @retval EFI_NOT_FOUND The PCD service could not find data the requested token number.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_PCD_PPI_CANCEL_CALLBACK)(
- IN CONST EFI_GUID *Guid OPTIONAL,
- IN UINTN CallBackToken,
- IN EFI_PCD_PPI_CALLBACK CallBackFunction
+ IN CONST EFI_GUID *Guid OPTIONAL,
+ IN UINTN CallBackToken,
+ IN EFI_PEI_PCD_PPI_CALLBACK CallBackFunction
);
/**
Retrieves the next valid PCD token for a given namespace.
-
+
This provides a means by which to get the next valid token number in a given namespace. This is
useful since the PCD infrastructure has a sparse list of token numbers in it, and one cannot a priori
know what token numbers are valid in the database.
-
+
@param[in] Guid The 128-bit unique value that designates which namespace to extract the value from.
- @param[in] TokenNumber The PCD token number.
-
+ @param[in] TokenNumber The PCD token number.
+
@retval EFI_SUCCESS The PCD service has retrieved the value requested.
@retval EFI_NOT_FOUND The PCD service could not find data from the requested token number.
**/
@@ -387,18 +389,18 @@ EFI_STATUS /**
Retrieves the next valid PCD token namespace for a given namespace.
-
+
Gets the next valid token namespace for a given namespace. This is useful to traverse the valid
token namespaces on a platform.
-
+
@param[in, out] Guid An indirect pointer to EFI_GUID. On input it designates a known token
namespace from which the search will start. On output, it designates the next valid
token namespace on the platform. If *Guid is NULL, then the GUID of the first token
space of the current platform is returned. If the search cannot locate the next valid
token namespace, an error is returned and the value of *Guid is undefined.
-
+
@retval EFI_SUCCESS The PCD service retrieved the value requested.
- @retval EFI_NOT_FOUND The PCD service could not find the next valid token namespace.
+ @retval EFI_NOT_FOUND The PCD service could not find the next valid token namespace.
**/
typedef
EFI_STATUS
@@ -408,19 +410,19 @@ EFI_STATUS typedef struct {
EFI_PEI_PCD_PPI_SET_SKU SetSku;
- EFI_PEI_PCD_PPI_GET_EX_8 GetEx8;
- EFI_PEI_PCD_PPI_GET_EX_16 GetEx16;
- EFI_PEI_PCD_PPI_GET_EX_32 GetEx32;
- EFI_PEI_PCD_PPI_GET_EX_64 GetEx64;
- EFI_PEI_PCD_PPI_GET_EX_POINTER GetExPtr;
- EFI_PEI_PCD_PPI_GET_EX_BOOLEAN GetExBool;
- EFI_PEI_PCD_PPI_GET_EX_SIZE GetExSize;
- EFI_PEI_PCD_PPI_SET_EX_8 SetEx8;
- EFI_PEI_PCD_PPI_SET_EX_16 SetEx16;
- EFI_PEI_PCD_PPI_SET_EX_32 SetEx32;
- EFI_PEI_PCD_PPI_SET_EX_64 SetEx64;
- EFI_PEI_PCD_PPI_SET_EX_POINTER SetExPtr;
- EFI_PEI_PCD_PPI_SET_EX_BOOLEAN SetExBool;
+ EFI_PEI_PCD_PPI_GET_8 GetEx8;
+ EFI_PEI_PCD_PPI_GET_16 GetEx16;
+ EFI_PEI_PCD_PPI_GET_32 GetEx32;
+ EFI_PEI_PCD_PPI_GET_64 GetEx64;
+ EFI_PEI_PCD_PPI_GET_POINTER GetExPtr;
+ EFI_PEI_PCD_PPI_GET_BOOLEAN GetExBool;
+ EFI_PEI_PCD_PPI_GET_SIZE GetExSize;
+ EFI_PEI_PCD_PPI_SET_8 SetEx8;
+ EFI_PEI_PCD_PPI_SET_16 SetEx16;
+ EFI_PEI_PCD_PPI_SET_32 SetEx32;
+ EFI_PEI_PCD_PPI_SET_64 SetEx64;
+ EFI_PEI_PCD_PPI_SET_POINTER SetExPtr;
+ EFI_PEI_PCD_PPI_SET_BOOLEAN SetExBool;
EFI_PEI_PCD_PPI_CALLBACK_ON_SET CallbackOnSet;
EFI_PEI_PCD_PPI_CANCEL_CALLBACK CancelCallback;
EFI_PEI_PCD_PPI_GET_NEXT_TOKEN GetNextToken;
diff --git a/MdePkg/Include/Protocol/PiPcd.h b/MdePkg/Include/Protocol/PiPcd.h index 19376f4..bfb5588 100644 --- a/MdePkg/Include/Protocol/PiPcd.h +++ b/MdePkg/Include/Protocol/PiPcd.h @@ -1,10 +1,10 @@ /** @file
Platform Configuration Database (PCD) Protocol defined in PI 1.2 Vol3
- A platform database that contains a variety of current platform settings or
+ A platform database that contains a variety of current platform settings or
directives that can be accessed by a driver or application.
PI PCD protocol only provide the accessing interfaces for Dynamic-Ex type PCD.
-
+
Callers to this protocol must be at a TPL_APPLICATION task priority level.
This is the base PCD service API that provides an abstraction for accessing configuration content in
the platform. It a seamless mechanism for extracting information regardless of where the
@@ -12,16 +12,16 @@ This protocol allows access to data through size-granular APIs and provides a mechanism for a
firmware component to monitor specific settings and be alerted when a setting is changed.
- Copyright (c) 2009, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
+ Copyright (c) 2009 - 2010, Intel Corporation
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- @par Revision Reference:
+ @par Revision Reference:
PI Version 1.2 Vol 3.
**/
@@ -47,7 +47,7 @@ extern EFI_GUID gEfiPcdProtocolGuid; Id is set or the currently set SKU Id isn't valid for the specified token, the system uses the default
SKU Id. If the system attempts to use the default SKU Id and no value has been set for that Id, the
results are unpredictable.
-
+
@param[in] SkuId The SKU value to set.
**/
typedef
@@ -59,37 +59,37 @@ VOID /**
Retrieves an 8-bit value for a given PCD token.
If the TokenNumber is invalid, the results are unpredictable.
-
+
@param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
@param[in] TokenNumber The PCD token number.
-
+
@return 8-bit value for a given PCD token.
**/
typedef
UINT8
-(EFIAPI *EFI_PCD_PROTOCOL_GET_EX_8)(
+(EFIAPI *EFI_PCD_PROTOCOL_GET_8)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
);
/**
- Retrieves the current word-sized value for a PCD token number.
+ Retrieves the current word-sized value for a PCD token number.
If the TokenNumber is invalid, the results are unpredictable.
-
+
@param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
@param[in] TokenNumber The PCD token number.
-
- @return word-sized value for a given PCD token.
+
+ @return word-sized value for a given PCD token.
**/
typedef
UINT16
-(EFIAPI *EFI_PCD_PROTOCOL_GET_EX_16)(
+(EFIAPI *EFI_PCD_PROTOCOL_GET_16)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
);
/**
- Retrieves the current 32-bit sized value for a PCD token number.
+ Retrieves the current 32-bit sized value for a PCD token number.
If the TokenNumber is invalid, the results are unpredictable.
@param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
@@ -99,24 +99,24 @@ UINT16 **/
typedef
UINT32
-(EFIAPI *EFI_PCD_PROTOCOL_GET_EX_32)(
+(EFIAPI *EFI_PCD_PROTOCOL_GET_32)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
);
/**
- Retrieves the 64-bit sized value for a PCD token number.
+ Retrieves the 64-bit sized value for a PCD token number.
If the TokenNumber is invalid, the results are unpredictable.
-
+
@param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
@param[in] TokenNumber The PCD token number.
@return 64-bit value for a given PCD token.
-
+
**/
typedef
UINT64
-(EFIAPI *EFI_PCD_PROTOCOL_GET_EX_64)(
+(EFIAPI *EFI_PCD_PROTOCOL_GET_64)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
);
@@ -125,7 +125,7 @@ UINT64 Retrieves the current pointer to the value for a PCD token number. Do not make any assumptions
about the alignment of the pointer that is returned by this function call. If the TokenNumber is
invalid, the results are unpredictable.
-
+
@param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
@param[in] TokenNumber The PCD token number.
@@ -133,7 +133,7 @@ UINT64 **/
typedef
VOID *
-(EFIAPI *EFI_PCD_PROTOCOL_GET_EX_POINTER)(
+(EFIAPI *EFI_PCD_PROTOCOL_GET_POINTER)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
);
@@ -141,15 +141,15 @@ VOID * /**
Retrieves the current BOOLEAN-sized value for a PCD token number. If the TokenNumber is
invalid, the results are unpredictable.
-
+
@param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
@param[in] TokenNumber The PCD token number.
-
+
@return Boolean value for a given PCD token.
**/
typedef
BOOLEAN
-(EFIAPI *EFI_PCD_PROTOCOL_GET_EX_BOOLEAN)(
+(EFIAPI *EFI_PCD_PROTOCOL_GET_BOOLEAN)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
);
@@ -157,29 +157,29 @@ BOOLEAN /**
Retrieves the current size of a particular PCD token. If the TokenNumber is invalid, the results are
unpredictable.
-
+
@param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
@param[in] TokenNumber The PCD token number.
-
+
@return the size of the value for a given PCD token.
**/
typedef
UINTN
-(EFIAPI *EFI_PCD_PROTOCOL_GET_EX_SIZE)(
+(EFIAPI *EFI_PCD_PROTOCOL_GET_SIZE)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
);
/**
Sets an 8-bit value for a given PCD token.
-
+
When the PCD service sets a value, it will check to ensure that the size of the value being set is
compatible with the Token's existing definition. If it is not, an error will be returned.
-
+
@param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
@param[in] TokenNumber The PCD token number.
@param[in] Value The value to set for the PCD token.
-
+
@retval EFI_SUCCESS The PCD service has set the value requested
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data being set was
incompatible with a call to this function. Use GetSizeEx() to
@@ -188,7 +188,7 @@ UINTN **/
typedef
EFI_STATUS
-(EFIAPI *EFI_PCD_PROTOCOL_SET_EX_8)(
+(EFIAPI *EFI_PCD_PROTOCOL_SET_8)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN UINT8 Value
@@ -196,14 +196,14 @@ EFI_STATUS /**
Sets an 16-bit value for a given PCD token.
-
+
When the PCD service sets a value, it will check to ensure that the size of the value being set is
compatible with the Token's existing definition. If it is not, an error will be returned.
-
+
@param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
@param[in] TokenNumber The PCD token number.
@param[in] Value The value to set for the PCD token.
-
+
@retval EFI_SUCCESS The PCD service has set the value requested
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data being set was
incompatible with a call to this function. Use GetSizeEx() to
@@ -212,7 +212,7 @@ EFI_STATUS **/
typedef
EFI_STATUS
-(EFIAPI *EFI_PCD_PROTOCOL_SET_EX_16)(
+(EFIAPI *EFI_PCD_PROTOCOL_SET_16)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN UINT16 Value
@@ -220,14 +220,14 @@ EFI_STATUS /**
Sets an 32-bit value for a given PCD token.
-
+
When the PCD service sets a value, it will check to ensure that the size of the value being set is
compatible with the Token's existing definition. If it is not, an error will be returned.
-
+
@param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
@param[in] TokenNumber The PCD token number.
@param[in] Value The value to set for the PCD token.
-
+
@retval EFI_SUCCESS The PCD service has set the value requested
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data being set was
incompatible with a call to this function. Use GetSizeEx() to
@@ -236,7 +236,7 @@ EFI_STATUS **/
typedef
EFI_STATUS
-(EFIAPI *EFI_PCD_PROTOCOL_SET_EX_32)(
+(EFIAPI *EFI_PCD_PROTOCOL_SET_32)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN UINT32 Value
@@ -244,14 +244,14 @@ EFI_STATUS /**
Sets an 64-bit value for a given PCD token.
-
+
When the PCD service sets a value, it will check to ensure that the size of the value being set is
compatible with the Token's existing definition. If it is not, an error will be returned.
-
+
@param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
@param[in] TokenNumber The PCD token number.
@param[in] Value The value to set for the PCD token.
-
+
@retval EFI_SUCCESS The PCD service has set the value requested
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data being set was
incompatible with a call to this function. Use GetSizeEx() to
@@ -260,7 +260,7 @@ EFI_STATUS **/
typedef
EFI_STATUS
-(EFIAPI *EFI_PCD_PROTOCOL_SET_EX_64)(
+(EFIAPI *EFI_PCD_PROTOCOL_SET_64)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN UINT64 Value
@@ -268,15 +268,17 @@ EFI_STATUS /**
Sets a value of a specified size for a given PCD token.
-
+
When the PCD service sets a value, it will check to ensure that the size of the value being set is
compatible with the Token's existing definition. If it is not, an error will be returned.
-
+
@param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
@param[in] TokenNumber The PCD token number.
- @param[in] SizeOfValue The length of the value being set for the PCD token.
+ @param[in] SizeOfValue The length of the value being set for the PCD token. If too large of a length is
+ specified, upon return from this function the value of SizeOfValue will
+ reflect the maximum size for the PCD token.
@param[in] Buffer A pointer to the buffer containing the value to set for the PCD token.
-
+
@retval EFI_SUCCESS The PCD service has set the value requested
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data being set was
incompatible with a call to this function. Use GetSizeEx() to
@@ -285,23 +287,23 @@ EFI_STATUS **/
typedef
EFI_STATUS
-(EFIAPI *EFI_PCD_PROTOCOL_SET_EX_POINTER)(
+(EFIAPI *EFI_PCD_PROTOCOL_SET_POINTER)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
- IN UINTN *SizeOfValue,
+ IN OUT UINTN *SizeOfValue,
IN VOID *Buffer
);
/**
Sets a Boolean value for a given PCD token.
-
+
When the PCD service sets a value, it will check to ensure that the size of the value being set is
compatible with the Token's existing definition. If it is not, an error will be returned.
-
+
@param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
@param[in] TokenNumber The PCD token number.
@param[in] Value The value to set for the PCD token.
-
+
@retval EFI_SUCCESS The PCD service has set the value requested
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data being set was
incompatible with a call to this function. Use GetSizeEx() to
@@ -310,7 +312,7 @@ EFI_STATUS **/
typedef
EFI_STATUS
-(EFIAPI *EFI_PCD_PROTOCOL_SET_EX_BOOLEAN)(
+(EFIAPI *EFI_PCD_PROTOCOL_SET_BOOLEAN)(
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN BOOLEAN Value
@@ -319,19 +321,19 @@ EFI_STATUS typedef
VOID
(EFIAPI *EFI_PCD_PROTOCOL_CALLBACK)(
- IN EFI_GUID *Guid OPTIONAL,
- IN UINTN CallBackToken,
- IN VOID *TokenData,
- IN UINTN TokenDataSize
+ IN EFI_GUID *Guid OPTIONAL,
+ IN UINTN CallBackToken,
+ IN OUT VOID *TokenData,
+ IN UINTN TokenDataSize
);
/**
Specifies a function to be called anytime the value of a designated token is changed.
-
+
@param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
@param[in] CallBackToken The PCD token number to monitor.
@param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set.
-
+
@retval EFI_SUCCESS The PCD service has successfully established a call event for the CallBackToken requested.
@retval EFI_NOT_FOUND The PCD service could not find the referenced token number.
**/
@@ -345,11 +347,11 @@ EFI_STATUS /**
Cancels a callback function that was set through a previous call to the CallBackOnSet function.
-
+
@param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
@param[in] CallBackToken The PCD token number to monitor.
@param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set.
-
+
@retval EFI_SUCCESS The PCD service has successfully established a call event for the CallBackToken requested.
@retval EFI_NOT_FOUND The PCD service could not find the referenced token number.
**/
@@ -365,12 +367,12 @@ EFI_STATUS Gets the next valid token number in a given namespace. This is useful since the PCD infrastructure
contains a sparse list of token numbers, and one cannot a priori know what token numbers are valid
in the database.
-
+
@param[in] Guid The 128-bit unique value that designates the namespace from which to retrieve the next token.
@param[in] TokenNumber A pointer to the PCD token number to use to find the subsequent token number. To
retrieve the "first" token, have the pointer reference a TokenNumber value of 0.
@retval EFI_SUCCESS The PCD service has retrieved the value requested
- @retval EFI_NOT_FOUND The PCD service could not find data from the requested token number.
+ @retval EFI_NOT_FOUND The PCD service could not find data from the requested token number.
**/
typedef
EFI_STATUS
@@ -382,13 +384,13 @@ EFI_STATUS /**
Gets the next valid token namespace for a given namespace. This is useful to traverse the valid
token namespaces on a platform.
-
+
@param[in, out] Guid An indirect pointer to EFI_GUID. On input it designates a known token namespace
from which the search will start. On output, it designates the next valid token
namespace on the platform. If *Guid is NULL, then the GUID of the first token
space of the current platform is returned. If the search cannot locate the next valid
token namespace, an error is returned and the value of *Guid is undefined.
-
+
@retval EFI_SUCCESS The PCD service retrieved the value requested.
@retval EFI_NOT_FOUND The PCD service could not find the next valid token namespace.
**/
@@ -400,19 +402,19 @@ EFI_STATUS typedef struct _EFI_PCD_PROTOCOL {
EFI_PCD_PROTOCOL_SET_SKU SetSku;
- EFI_PCD_PROTOCOL_GET_EX_8 Get8Ex;
- EFI_PCD_PROTOCOL_GET_EX_16 Get16Ex;
- EFI_PCD_PROTOCOL_GET_EX_32 Get32Ex;
- EFI_PCD_PROTOCOL_GET_EX_64 Get64Ex;
- EFI_PCD_PROTOCOL_GET_EX_POINTER GetPtrEx;
- EFI_PCD_PROTOCOL_GET_EX_BOOLEAN GetBoolEx;
- EFI_PCD_PROTOCOL_GET_EX_SIZE GetSizeEx;
- EFI_PCD_PROTOCOL_SET_EX_8 Set8Ex;
- EFI_PCD_PROTOCOL_SET_EX_16 Set16Ex;
- EFI_PCD_PROTOCOL_SET_EX_32 Set32Ex;
- EFI_PCD_PROTOCOL_SET_EX_64 Set64Ex;
- EFI_PCD_PROTOCOL_SET_EX_POINTER SetPtrEx;
- EFI_PCD_PROTOCOL_SET_EX_BOOLEAN SetBoolEx;
+ EFI_PCD_PROTOCOL_GET_8 Get8Ex;
+ EFI_PCD_PROTOCOL_GET_16 Get16Ex;
+ EFI_PCD_PROTOCOL_GET_32 Get32Ex;
+ EFI_PCD_PROTOCOL_GET_64 Get64Ex;
+ EFI_PCD_PROTOCOL_GET_POINTER GetPtrEx;
+ EFI_PCD_PROTOCOL_GET_BOOLEAN GetBoolEx;
+ EFI_PCD_PROTOCOL_GET_SIZE GetSizeEx;
+ EFI_PCD_PROTOCOL_SET_8 Set8Ex;
+ EFI_PCD_PROTOCOL_SET_16 Set16Ex;
+ EFI_PCD_PROTOCOL_SET_32 Set32Ex;
+ EFI_PCD_PROTOCOL_SET_64 Set64Ex;
+ EFI_PCD_PROTOCOL_SET_POINTER SetPtrEx;
+ EFI_PCD_PROTOCOL_SET_BOOLEAN SetBoolEx;
EFI_PCD_PROTOCOL_CALLBACK_ON_SET CallbackOnSet;
EFI_PCD_PROTOCOL_CANCEL_CALLBACK CancelCallback;
EFI_PCD_PROTOCOL_GET_NEXT_TOKEN GetNextToken;
diff --git a/MdePkg/Library/PeiPcdLib/PeiPcdLib.c b/MdePkg/Library/PeiPcdLib/PeiPcdLib.c index 2b88326..057a957 100644 --- a/MdePkg/Library/PeiPcdLib/PeiPcdLib.c +++ b/MdePkg/Library/PeiPcdLib/PeiPcdLib.c @@ -893,7 +893,7 @@ LibPcdCallbackOnSet ( ASSERT (NotificationFunction != NULL);
- Status = (GetPiPcdPpiPointer ())->CallbackOnSet (Guid, TokenNumber, (EFI_PCD_PPI_CALLBACK) NotificationFunction);
+ Status = (GetPiPcdPpiPointer ())->CallbackOnSet (Guid, TokenNumber, (EFI_PEI_PCD_PPI_CALLBACK) NotificationFunction);
ASSERT_EFI_ERROR (Status);
@@ -927,7 +927,7 @@ LibPcdCancelCallback ( ASSERT (NotificationFunction != NULL);
- Status = (GetPiPcdPpiPointer ())->CancelCallback (Guid, TokenNumber, (EFI_PCD_PPI_CALLBACK) NotificationFunction);
+ Status = (GetPiPcdPpiPointer ())->CancelCallback (Guid, TokenNumber, (EFI_PEI_PCD_PPI_CALLBACK) NotificationFunction);
ASSERT_EFI_ERROR (Status);
|