MdeModulePkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
produce the implementation of native PCD protocol and EFI_PCD_PROTOCOL defined in
|
||||
PI 1.4a Vol3.
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -22,7 +22,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
EFI_LOCK mPcdDatabaseLock = EFI_INITIALIZE_LOCK_VARIABLE(TPL_NOTIFY);
|
||||
|
||||
///
|
||||
/// PCD_PROTOCOL the EDKII native implementation which support dynamic
|
||||
/// PCD_PROTOCOL the EDKII native implementation which support dynamic
|
||||
/// type and dynamicEx type PCDs.
|
||||
///
|
||||
PCD_PROTOCOL mPcdInstance = {
|
||||
@@ -112,9 +112,9 @@ EFI_HANDLE mPcdHandle = NULL;
|
||||
|
||||
/**
|
||||
Main entry for PCD DXE driver.
|
||||
|
||||
|
||||
This routine initialize the PCD database and install PCD_PROTOCOL.
|
||||
|
||||
|
||||
@param ImageHandle Image handle for PCD DXE driver.
|
||||
@param SystemTable Pointer to SystemTable.
|
||||
|
||||
@@ -245,21 +245,21 @@ DxeGetPcdInfoGetSku (
|
||||
/**
|
||||
Sets the SKU value for subsequent calls to set or get PCD token values.
|
||||
|
||||
SetSku() sets the SKU Id to be used for subsequent calls to set or get PCD values.
|
||||
SetSku() sets the SKU Id to be used for subsequent calls to set or get PCD values.
|
||||
SetSku() is normally called only once by the system.
|
||||
|
||||
For each item (token), the database can hold a single value that applies to all SKUs,
|
||||
or multiple values, where each value is associated with a specific SKU Id. Items with multiple,
|
||||
SKU-specific values are called SKU enabled.
|
||||
|
||||
For each item (token), the database can hold a single value that applies to all SKUs,
|
||||
or multiple values, where each value is associated with a specific SKU Id. Items with multiple,
|
||||
SKU-specific values are called SKU enabled.
|
||||
|
||||
The SKU Id of zero is reserved as a default.
|
||||
For tokens that are not SKU enabled, the system ignores any set SKU Id and works with the
|
||||
single value for that token. For SKU-enabled tokens, the system will use the SKU Id set by the
|
||||
last call to SetSku(). If no 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
|
||||
For tokens that are not SKU enabled, the system ignores any set SKU Id and works with the
|
||||
single value for that token. For SKU-enabled tokens, the system will use the SKU Id set by the
|
||||
last call to SetSku(). If no 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 that will be used when the PCD service will retrieve and
|
||||
@param[in] SkuId The SKU value that will be used when the PCD service will retrieve and
|
||||
set values associated with a PCD token.
|
||||
|
||||
**/
|
||||
@@ -318,13 +318,13 @@ DxePcdSetSku (
|
||||
/**
|
||||
Retrieves an 8-bit value for a given PCD token.
|
||||
|
||||
Retrieves the current byte-sized value for a PCD token number.
|
||||
Retrieves the current byte-sized value for a PCD token number.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The UINT8 value.
|
||||
|
||||
|
||||
**/
|
||||
UINT8
|
||||
EFIAPI
|
||||
@@ -338,13 +338,13 @@ DxePcdGet8 (
|
||||
/**
|
||||
Retrieves an 16-bit value for a given PCD token.
|
||||
|
||||
Retrieves the current 16-bits value for a PCD token number.
|
||||
Retrieves the current 16-bits value for a PCD token number.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The UINT16 value.
|
||||
|
||||
|
||||
**/
|
||||
UINT16
|
||||
EFIAPI
|
||||
@@ -358,13 +358,13 @@ DxePcdGet16 (
|
||||
/**
|
||||
Retrieves an 32-bit value for a given PCD token.
|
||||
|
||||
Retrieves the current 32-bits value for a PCD token number.
|
||||
Retrieves the current 32-bits value for a PCD token number.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The UINT32 value.
|
||||
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
@@ -378,13 +378,13 @@ DxePcdGet32 (
|
||||
/**
|
||||
Retrieves an 64-bit value for a given PCD token.
|
||||
|
||||
Retrieves the current 64-bits value for a PCD token number.
|
||||
Retrieves the current 64-bits value for a PCD token number.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The UINT64 value.
|
||||
|
||||
|
||||
**/
|
||||
UINT64
|
||||
EFIAPI
|
||||
@@ -398,15 +398,15 @@ DxePcdGet64 (
|
||||
/**
|
||||
Retrieves a pointer to a value for a given PCD token.
|
||||
|
||||
Retrieves the current pointer to the buffer 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,
|
||||
Retrieves the current pointer to the buffer 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] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The pointer to the buffer to be retrived.
|
||||
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
@@ -420,15 +420,15 @@ DxePcdGetPtr (
|
||||
/**
|
||||
Retrieves a Boolean value for a given PCD token.
|
||||
|
||||
Retrieves the current boolean 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,
|
||||
Retrieves the current boolean 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] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The Boolean value.
|
||||
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
@@ -442,13 +442,13 @@ DxePcdGetBool (
|
||||
/**
|
||||
Retrieves the size of the value for a given PCD token.
|
||||
|
||||
Retrieves the current size of a particular PCD token.
|
||||
Retrieves the current size of a particular PCD token.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The size of the value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
@@ -470,23 +470,23 @@ DxePcdGetSize (
|
||||
|
||||
//
|
||||
// Backup the TokenNumber passed in as GetPtrTypeSize need the original TokenNumber
|
||||
//
|
||||
//
|
||||
TmpTokenNumber = TokenNumber;
|
||||
|
||||
// EBC compiler is very choosy. It may report warning about comparison
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// comparison.
|
||||
ASSERT (TokenNumber + 1 < mPcdTotalTokenCount + 1);
|
||||
|
||||
// EBC compiler is very choosy. It may report warning about comparison
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// comparison.
|
||||
IsPeiDb = (BOOLEAN) (TokenNumber + 1 < mPeiLocalTokenCount + 1);
|
||||
|
||||
TokenNumber = IsPeiDb ? TokenNumber :
|
||||
|
||||
TokenNumber = IsPeiDb ? TokenNumber :
|
||||
(TokenNumber - mPeiLocalTokenCount);
|
||||
|
||||
LocalTokenNumberTable = IsPeiDb ? (UINT32 *)((UINT8 *)mPcdDatabase.PeiDb + mPcdDatabase.PeiDb->LocalTokenNumberTableOffset)
|
||||
LocalTokenNumberTable = IsPeiDb ? (UINT32 *)((UINT8 *)mPcdDatabase.PeiDb + mPcdDatabase.PeiDb->LocalTokenNumberTableOffset)
|
||||
: (UINT32 *)((UINT8 *)mPcdDatabase.DxeDb + mPcdDatabase.DxeDb->LocalTokenNumberTableOffset);
|
||||
|
||||
Size = (LocalTokenNumberTable[TokenNumber] & PCD_DATUM_TYPE_ALL_SET) >> PCD_DATUM_TYPE_SHIFT;
|
||||
@@ -505,16 +505,16 @@ DxePcdGetSize (
|
||||
/**
|
||||
Retrieves an 8-bit value for a given PCD token.
|
||||
|
||||
Retrieves the 8-bit value of a particular PCD token.
|
||||
Retrieves the 8-bit value of a particular PCD token.
|
||||
If the TokenNumber is invalid or the token space
|
||||
specified by Guid does not exist, the results are
|
||||
specified by Guid does not exist, the results are
|
||||
unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
|
||||
@return The size 8-bit value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINT8
|
||||
EFIAPI
|
||||
@@ -529,16 +529,16 @@ DxePcdGet8Ex (
|
||||
/**
|
||||
Retrieves an 16-bit value for a given PCD token.
|
||||
|
||||
Retrieves the 16-bit value of a particular PCD token.
|
||||
Retrieves the 16-bit value of a particular PCD token.
|
||||
If the TokenNumber is invalid or the token space
|
||||
specified by Guid does not exist, the results are
|
||||
specified by Guid does not exist, the results are
|
||||
unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
|
||||
@return The size 16-bit value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINT16
|
||||
EFIAPI
|
||||
@@ -553,16 +553,16 @@ DxePcdGet16Ex (
|
||||
/**
|
||||
Retrieves an 32-bit value for a given PCD token.
|
||||
|
||||
Retrieves the 32-bit value of a particular PCD token.
|
||||
Retrieves the 32-bit value of a particular PCD token.
|
||||
If the TokenNumber is invalid or the token space
|
||||
specified by Guid does not exist, the results are
|
||||
specified by Guid does not exist, the results are
|
||||
unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
|
||||
@return The size 32-bit value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
@@ -577,16 +577,16 @@ DxePcdGet32Ex (
|
||||
/**
|
||||
Retrieves an 64-bit value for a given PCD token.
|
||||
|
||||
Retrieves the 64-bit value of a particular PCD token.
|
||||
Retrieves the 64-bit value of a particular PCD token.
|
||||
If the TokenNumber is invalid or the token space
|
||||
specified by Guid does not exist, the results are
|
||||
specified by Guid does not exist, the results are
|
||||
unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
|
||||
@return The size 64-bit value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINT64
|
||||
EFIAPI
|
||||
@@ -601,16 +601,16 @@ DxePcdGet64Ex (
|
||||
/**
|
||||
Retrieves a pointer to a value for a given PCD token.
|
||||
|
||||
Retrieves the current pointer to the buffer 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,
|
||||
Retrieves the current pointer to the buffer 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 token space for the token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
|
||||
@return The pointer to the buffer to be retrived.
|
||||
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
@@ -625,16 +625,16 @@ DxePcdGetPtrEx (
|
||||
/**
|
||||
Retrieves an Boolean value for a given PCD token.
|
||||
|
||||
Retrieves the Boolean value of a particular PCD token.
|
||||
Retrieves the Boolean value of a particular PCD token.
|
||||
If the TokenNumber is invalid or the token space
|
||||
specified by Guid does not exist, the results are
|
||||
specified by Guid does not exist, the results are
|
||||
unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
|
||||
@return The size Boolean value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
@@ -649,14 +649,14 @@ DxePcdGetBoolEx (
|
||||
/**
|
||||
Retrieves the size of the value for a given PCD token.
|
||||
|
||||
Retrieves the current size of a particular PCD token.
|
||||
Retrieves the current size of a particular PCD token.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
|
||||
@return The size of the value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
@@ -671,19 +671,19 @@ DxePcdGetSizeEx (
|
||||
/**
|
||||
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.
|
||||
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] 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 Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -698,19 +698,19 @@ DxePcdSet8 (
|
||||
/**
|
||||
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.
|
||||
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] 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 Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -725,19 +725,19 @@ DxePcdSet16 (
|
||||
/**
|
||||
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.
|
||||
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] 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 Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -752,19 +752,19 @@ DxePcdSet32 (
|
||||
/**
|
||||
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.
|
||||
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] 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 Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -779,23 +779,23 @@ DxePcdSet64 (
|
||||
/**
|
||||
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.
|
||||
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] TokenNumber The PCD token number.
|
||||
@param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
|
||||
On input, if the SizeOfValue is greater than the maximum size supported
|
||||
for this TokenNumber then the output value of SizeOfValue will reflect
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
|
||||
On input, if the SizeOfValue is greater than the maximum size supported
|
||||
for this TokenNumber then the output value of SizeOfValue will reflect
|
||||
the maximum size supported for this TokenNumber.
|
||||
@param[in] Buffer The buffer to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -811,19 +811,19 @@ DxePcdSetPtr (
|
||||
/**
|
||||
Sets an 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.
|
||||
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] 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 Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -838,20 +838,20 @@ DxePcdSetBool (
|
||||
/**
|
||||
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.
|
||||
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] ExTokenNumber The PCD token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] Value The value to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -867,20 +867,20 @@ DxePcdSet8Ex (
|
||||
/**
|
||||
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.
|
||||
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] ExTokenNumber The PCD token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] Value The value to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -896,20 +896,20 @@ DxePcdSet16Ex (
|
||||
/**
|
||||
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.
|
||||
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] ExTokenNumber The PCD token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] Value The value to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -925,20 +925,20 @@ DxePcdSet32Ex (
|
||||
/**
|
||||
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.
|
||||
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] ExTokenNumber The PCD token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] Value The value to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -954,24 +954,24 @@ DxePcdSet64Ex (
|
||||
/**
|
||||
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.
|
||||
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] ExTokenNumber The PCD token number.
|
||||
@param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
|
||||
On input, if the SizeOfValue is greater than the maximum size supported
|
||||
for this TokenNumber then the output value of SizeOfValue will reflect
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
|
||||
On input, if the SizeOfValue is greater than the maximum size supported
|
||||
for this TokenNumber then the output value of SizeOfValue will reflect
|
||||
the maximum size supported for this TokenNumber.
|
||||
@param[in] Buffer The buffer to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -988,20 +988,20 @@ DxePcdSetPtrEx (
|
||||
/**
|
||||
Sets an 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.
|
||||
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] ExTokenNumber The PCD token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] Value The value to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -1018,10 +1018,10 @@ DxePcdSetBoolEx (
|
||||
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] TokenNumber The PCD token number.
|
||||
@param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@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
|
||||
@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.
|
||||
|
||||
@@ -1035,7 +1035,7 @@ DxeRegisterCallBackOnSet (
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
|
||||
if (CallBackFunction == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -1047,7 +1047,7 @@ DxeRegisterCallBackOnSet (
|
||||
Status = DxeRegisterCallBackWorker (TokenNumber, Guid, CallBackFunction);
|
||||
|
||||
EfiReleaseLock (&mPcdDatabaseLock);
|
||||
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -1055,10 +1055,10 @@ DxeRegisterCallBackOnSet (
|
||||
Cancels a previously set callback function for a particular PCD token number.
|
||||
|
||||
@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] CallBackFunction The function prototype called when the value associated with the CallBackToken is set.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@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
|
||||
@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.
|
||||
|
||||
@@ -1072,7 +1072,7 @@ DxeUnRegisterCallBackOnSet (
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
|
||||
if (CallBackFunction == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -1081,35 +1081,35 @@ DxeUnRegisterCallBackOnSet (
|
||||
// Aquire lock to prevent reentrance from TPL_CALLBACK level
|
||||
//
|
||||
EfiAcquireLock (&mPcdDatabaseLock);
|
||||
|
||||
|
||||
Status = DxeUnRegisterCallBackWorker (TokenNumber, Guid, CallBackFunction);
|
||||
|
||||
EfiReleaseLock (&mPcdDatabaseLock);
|
||||
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
/**
|
||||
Retrieves 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.
|
||||
|
||||
If TokenNumber is 0 and Guid is not NULL, then the first token from the token space specified by Guid is returned.
|
||||
If TokenNumber is not 0 and Guid is not NULL, then the next token in the token space specified by Guid is returned.
|
||||
If TokenNumber is 0 and Guid is NULL, then the first token in the default token space is returned.
|
||||
If TokenNumber is not 0 and Guid is NULL, then the next token in the default token space is returned.
|
||||
The token numbers in the default token space may not be related to token numbers in token spaces that are named by Guid.
|
||||
If the next token number can be retrieved, then it is returned in TokenNumber, and EFI_SUCCESS is returned.
|
||||
If TokenNumber represents the last token number in the token space specified by Guid, then EFI_NOT_FOUND is returned.
|
||||
Retrieves 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.
|
||||
|
||||
If TokenNumber is 0 and Guid is not NULL, then the first token from the token space specified by Guid is returned.
|
||||
If TokenNumber is not 0 and Guid is not NULL, then the next token in the token space specified by Guid is returned.
|
||||
If TokenNumber is 0 and Guid is NULL, then the first token in the default token space is returned.
|
||||
If TokenNumber is not 0 and Guid is NULL, then the next token in the default token space is returned.
|
||||
The token numbers in the default token space may not be related to token numbers in token spaces that are named by Guid.
|
||||
If the next token number can be retrieved, then it is returned in TokenNumber, and EFI_SUCCESS is returned.
|
||||
If TokenNumber represents the last token number in the token space specified by Guid, then EFI_NOT_FOUND is returned.
|
||||
If TokenNumber is not present in the token space specified by Guid, then EFI_NOT_FOUND is returned.
|
||||
|
||||
|
||||
@param[in] Guid The 128-bit unique value that designates the namespace from which to retrieve the next token.
|
||||
This is an optional parameter that may be NULL. If this parameter is NULL, then a request is
|
||||
@param[in] Guid The 128-bit unique value that designates the namespace from which to retrieve the next token.
|
||||
This is an optional parameter that may be NULL. If this parameter is NULL, then a request is
|
||||
being made to retrieve tokens from the default token space.
|
||||
@param[in, out] TokenNumber
|
||||
A pointer to the PCD token number to use to find the subsequent token number.
|
||||
@param[in, out] TokenNumber
|
||||
A pointer to the PCD token number to use to find the subsequent token number.
|
||||
|
||||
@retval EFI_SUCCESS The PCD service has retrieved the next valid token number.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find data from the requested token number.
|
||||
@@ -1135,18 +1135,18 @@ DxePcdGetNextToken (
|
||||
//
|
||||
if (Guid == NULL) {
|
||||
// EBC compiler is very choosy. It may report warning about comparison
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// comparison.
|
||||
if (((*TokenNumber + 1 > mPeiNexTokenCount + 1) && (*TokenNumber + 1 <= mPeiLocalTokenCount + 1)) ||
|
||||
((*TokenNumber + 1 > (mPeiLocalTokenCount + mDxeNexTokenCount + 1)))) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
(*TokenNumber)++;
|
||||
if ((*TokenNumber + 1 > mPeiNexTokenCount + 1) &&
|
||||
(*TokenNumber + 1 <= mPeiLocalTokenCount + 1)) {
|
||||
//
|
||||
// The first Non-Ex type Token Number for DXE PCD
|
||||
// The first Non-Ex type Token Number for DXE PCD
|
||||
// database is mPeiLocalTokenCount + 1
|
||||
//
|
||||
if (mDxeNexTokenCount > 0) {
|
||||
@@ -1249,9 +1249,9 @@ GetDistinctTokenSpace (
|
||||
//
|
||||
*ExMapTableSize = TsIdx + 1;
|
||||
return DistinctTokenSpace;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Retrieves the next valid PCD token namespace for a given namespace.
|
||||
|
||||
@@ -1263,7 +1263,7 @@ GetDistinctTokenSpace (
|
||||
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.
|
||||
|
||||
@@ -1286,14 +1286,14 @@ DxePcdGetNextTokenSpace (
|
||||
BOOLEAN DxeExMapTableEmpty;
|
||||
|
||||
ASSERT (Guid != NULL);
|
||||
|
||||
|
||||
PeiExMapTableEmpty = mPeiExMapTableEmpty;
|
||||
DxeExMapTableEmpty = mDxeExMapTableEmpty;
|
||||
|
||||
if (PeiExMapTableEmpty && DxeExMapTableEmpty) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
if (TmpTokenSpaceBuffer[0] == NULL) {
|
||||
PeiTokenSpaceTableSize = 0;
|
||||
|
||||
@@ -1340,7 +1340,7 @@ DxePcdGetNextTokenSpace (
|
||||
*Guid = TmpTokenSpaceBuffer[0];
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
for (Idx = 0; Idx < TmpTokenSpaceBufferCount; Idx++) {
|
||||
if (CompareGuid (*Guid, TmpTokenSpaceBuffer[Idx])) {
|
||||
if (Idx == TmpTokenSpaceBufferCount - 1) {
|
||||
|
@@ -1,19 +1,19 @@
|
||||
## @file
|
||||
# PCD DXE driver manage database contains all dynamic PCD entries and produce the implementation of PCD protocol.
|
||||
#
|
||||
# This version PCD DXE depends on the external PCD database binary file, not built in PCD data base.
|
||||
# This version PCD DXE depends on the external PCD database binary file, not built in PCD data base.
|
||||
# There are two PCD Protocols as follows:
|
||||
# 1) PCD_PROTOCOL
|
||||
# 1) PCD_PROTOCOL
|
||||
# It is EDKII implementation which support Dynamic/DynamicEx type Pcds.
|
||||
# 2) EFI_PCD_PROTOCOL
|
||||
# It is defined by PI specification 1.2, Vol 3 which only support dynamicEx
|
||||
# It is defined by PI specification 1.2, Vol 3 which only support dynamicEx
|
||||
# type Pcd.
|
||||
#
|
||||
# For dynamicEx type PCD, it is compatible between PCD_PROTOCOL and EFI_PCD_PROTOCOL.
|
||||
# For dynamicEx type PCD, it is compatible between PCD_PROTOCOL and EFI_PCD_PROTOCOL.
|
||||
# PCD DXE driver will produce above two protocols at same time.
|
||||
#
|
||||
# PCD database is generated as the separate binary image at build time. The binary image
|
||||
# will be intergrated into Firmware volume together with PCD driver.
|
||||
# PCD database is generated as the separate binary image at build time. The binary image
|
||||
# will be intergrated into Firmware volume together with PCD driver.
|
||||
#
|
||||
# ////////////////////////////////////////////////////////////////////////////////
|
||||
# // //
|
||||
@@ -22,94 +22,94 @@
|
||||
# ////////////////////////////////////////////////////////////////////////////////
|
||||
#
|
||||
# 1, Introduction
|
||||
# PCD database hold all dynamic type PCD information. The structure of PEI PCD
|
||||
# database is generated by build tools according to dynamic PCD usage for
|
||||
# PCD database hold all dynamic type PCD information. The structure of PEI PCD
|
||||
# database is generated by build tools according to dynamic PCD usage for
|
||||
# specified platform.
|
||||
#
|
||||
#
|
||||
# 2, Dynamic Type PCD
|
||||
# Dynamic type PCD is used for the configuration/setting which value is determined
|
||||
# dynamic. In contrast, the value of static type PCD (FeatureFlag, FixedPcd,
|
||||
# PatchablePcd) is fixed in final generated FD image in build time.
|
||||
#
|
||||
# dynamic. In contrast, the value of static type PCD (FeatureFlag, FixedPcd,
|
||||
# PatchablePcd) is fixed in final generated FD image in build time.
|
||||
#
|
||||
# 2.1 The "dynamic" determination means one of below cases:
|
||||
# a) The PCD setting value is produced by someone driver and consumed by
|
||||
# a) The PCD setting value is produced by someone driver and consumed by
|
||||
# other driver in execution time.
|
||||
# b) The PCD setting value is set/get by user from FrontPage.
|
||||
# c) The PCD setting value is produced by platform OEM vendor in specified area.
|
||||
#
|
||||
#
|
||||
# 2.2 According to module distribution way, dynamic PCD could be classfied as:
|
||||
# a) Dynamic:
|
||||
# If module is released in source code and will be built with platform
|
||||
# If module is released in source code and will be built with platform
|
||||
# DSC, the dynamic PCD used by this module can be accessed as:
|
||||
# PcdGetxx(PcdSampleDynamicPcd);
|
||||
# PcdGetxx(PcdSampleDynamicPcd);
|
||||
# In building platform, build tools will translate PcdSampleDynamicPcd to
|
||||
# pair of {Token Space Guid: Token Number} for this PCD.
|
||||
# pair of {Token Space Guid: Token Number} for this PCD.
|
||||
# b) DynamicEx:
|
||||
# If module is release as binary and will not pariticpate platform building,
|
||||
# the dynamic PCD used by this module need be accessed as:
|
||||
# PcdGetxxEx(gEfiMyTokenspaceGuid, PcdSampleDynamicPcd)
|
||||
# Developer need explicity gives {Token Space Guid:Token Number} as parameter
|
||||
# in writting source code.
|
||||
#
|
||||
#
|
||||
# 2.3 According to PCD value's storage method, dynamic PCD could be classfied as:
|
||||
# a) Default Storage:
|
||||
# - The PCD value is stored in PCD database maintained by PCD driver in boot
|
||||
# a) Default Storage:
|
||||
# - The PCD value is stored in PCD database maintained by PCD driver in boot
|
||||
# time memory.
|
||||
# - This type is used for communication between PEIM/DXE driver, DXE/DXE
|
||||
# driver. But all set/get value will be losted after boot-time memory
|
||||
# - This type is used for communication between PEIM/DXE driver, DXE/DXE
|
||||
# driver. But all set/get value will be losted after boot-time memory
|
||||
# is turn off.
|
||||
# - [PcdsDynamicDefault] is used as section name for this type PCD in
|
||||
# - [PcdsDynamicDefault] is used as section name for this type PCD in
|
||||
# platform DSC file. [PcdsDynamicExDefault] is used for dynamicEx type PCD.
|
||||
#
|
||||
# b) Variable Storage:
|
||||
# - The PCD value is stored in variable area.
|
||||
#
|
||||
# b) Variable Storage:
|
||||
# - The PCD value is stored in variable area.
|
||||
# - As default storage type, this type PCD could be used for PEI/DXE driver
|
||||
# communication. But beside it, this type PCD could also be used to store
|
||||
# communication. But beside it, this type PCD could also be used to store
|
||||
# the value associate with a HII setting via variable interface.
|
||||
# - In PEI phase, the PCD value could only be got but can not be set due
|
||||
# - In PEI phase, the PCD value could only be got but can not be set due
|
||||
# to variable area is readonly.
|
||||
# - [PcdsDynamicHii] is used as section name for this type PCD in platform
|
||||
# - [PcdsDynamicHii] is used as section name for this type PCD in platform
|
||||
# DSC file. [PcdsDynamicExHii] is for dynamicEx type PCD.
|
||||
#
|
||||
#
|
||||
# c) OEM specificed storage area:
|
||||
# - The PCD value is stored in OEM specified area which base address is
|
||||
# - The PCD value is stored in OEM specified area which base address is
|
||||
# specified by a FixedAtBuild PCD setting - PcdVpdBaseAddress.
|
||||
# - The area is read only for PEI and DXE phase.
|
||||
# - [PcdsDynamicVpd] is used as section name for this type PCD in platform
|
||||
# - [PcdsDynamicVpd] is used as section name for this type PCD in platform
|
||||
# DSC file. [PcdsDynamicExVpd] is for dynamicex type PCD.
|
||||
#
|
||||
#
|
||||
# 2.4 When and how to use dynamic PCD
|
||||
# Module developer do not care the used PCD is dynamic or static when writting
|
||||
# source code/INF. Dynamic PCD and dynamic type is pointed by platform integrator
|
||||
# source code/INF. Dynamic PCD and dynamic type is pointed by platform integrator
|
||||
# in platform DSC file. Please ref section 2.3 to get matching between dynamic
|
||||
# PCD type and section name in DSC file.
|
||||
#
|
||||
#
|
||||
# 3, PCD database:
|
||||
# Although dynamic PCD could be in different storage type as above description,
|
||||
# Although dynamic PCD could be in different storage type as above description,
|
||||
# but the basic information and default value for all dynamic PCD is hold
|
||||
# by PCD database maintained by PEI/DXE driver.
|
||||
#
|
||||
#
|
||||
# As the whole EFI BIOS boot path is divided into PEI/DXE phase, the PCD database
|
||||
# also is divided into Pei/Dxe database maintaied by PcdPeim/PcdDxe driver separatly.
|
||||
# To make PcdPeim's driver image smaller, PEI PCD database only hold all dynamic
|
||||
# PCD information used in PEI phase or use in both PEI/DXE phase. And DXE PCD
|
||||
# database contains all PCDs used in PEI/DXE phase in memory.
|
||||
#
|
||||
# Build tool will generate PCD database into the separate binary file for
|
||||
# PEI/DXE PCD driver according to dynamic PCD section in platform DSC file.
|
||||
#
|
||||
#
|
||||
# Build tool will generate PCD database into the separate binary file for
|
||||
# PEI/DXE PCD driver according to dynamic PCD section in platform DSC file.
|
||||
#
|
||||
# 3.1 PcdPeim and PcdDxe
|
||||
# PEI PCD database is maintained by PcdPeim driver run from flash. PcdPeim driver
|
||||
# build guid hob in temporary memory and copy the binary data base from flash
|
||||
# to temporary memory for PEI PCD database.
|
||||
# build guid hob in temporary memory and copy the binary data base from flash
|
||||
# to temporary memory for PEI PCD database.
|
||||
# DXE PCD database is maintained by PcdDxe driver.At entry point of PcdDxe driver,
|
||||
# a new PCD database is allocated in boot-time memory which including all
|
||||
# PEI PCD and DXE PCD entry.
|
||||
#
|
||||
#
|
||||
# Pcd driver should run as early as possible before any other driver access
|
||||
# dynamic PCD's value. PEI/DXE "Apriori File" mechanism make it possible by
|
||||
# making PcdPeim/PcdDxe as first dispatching driver in PEI/DXE phase.
|
||||
#
|
||||
#
|
||||
# 3.2 Token space Guid/Token number, Platform token, Local token number
|
||||
# Dynamic PCD
|
||||
# +-----------+ +---------+
|
||||
@@ -129,42 +129,42 @@
|
||||
# | Token |
|
||||
# | Number |
|
||||
# +-----------+
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# 3.2.1 Pair of Token space guid + Token number
|
||||
# Any type PCD is identified by pair of "TokenSpaceGuid + TokeNumber". But it
|
||||
# is not easy maintained by PCD driver, and hashed token number will make
|
||||
# searching slowly.
|
||||
# is not easy maintained by PCD driver, and hashed token number will make
|
||||
# searching slowly.
|
||||
#
|
||||
# 3.2.2 Platform Token Number
|
||||
# "Platform token number" concept is introduced for mapping to a pair of
|
||||
# "TokenSpaceGuid + TokenNumber". The platform token number is generated by
|
||||
# build tool in autogen.h and all of them are continual in a platform scope
|
||||
# "Platform token number" concept is introduced for mapping to a pair of
|
||||
# "TokenSpaceGuid + TokenNumber". The platform token number is generated by
|
||||
# build tool in autogen.h and all of them are continual in a platform scope
|
||||
# started from 1.(0 meaning invalid internal token number)
|
||||
# With auto-generated "platform token number", PcdGet(PcdSampleDynamicPcd)
|
||||
# in source code is translated to LibPcdGet(_PCD_TOKEN_PcdSampleDynamicPcd)
|
||||
# in source code is translated to LibPcdGet(_PCD_TOKEN_PcdSampleDynamicPcd)
|
||||
# in autogen.h.
|
||||
# Notes: The mapping between pair of "tokenspace guid + token number" and
|
||||
# "internal token number" need build tool establish, so "platform token number"
|
||||
# mechanism is not suitable for binary module which use DynamicEx type PCD.
|
||||
# To access a dynamicEx type PCD, pair of "token space guid/token number" all need
|
||||
# to be specificed for PcdSet/PcdGet accessing macro.
|
||||
#
|
||||
# Platform Token Number is started from 1, and inceased continuous. From whole
|
||||
#
|
||||
# Platform Token Number is started from 1, and inceased continuous. From whole
|
||||
# platform scope, there are two zones: PEI Zone and DXE Zone
|
||||
# | Platform Token Number
|
||||
# ----------|----------------------------------------------------------------
|
||||
# PEI Zone: | 1 ~ PEI_LOCAL_TOKEN_NUMBER
|
||||
# DXE Zone: | (PEI_LOCAL_TOKEN_NUMBER + 1) ~ (PEI_LOCAL_TOKEN_NUMBER + DXE_LOCAL_TOKEN_NUMBER)
|
||||
#
|
||||
#
|
||||
# 3.2.3 Local Token Number
|
||||
# To fast searching a PCD entry in PCD database, PCD driver translate
|
||||
# To fast searching a PCD entry in PCD database, PCD driver translate
|
||||
# platform token number to local token number via a mapping table.
|
||||
# For binary DynamicEx type PCD, there is a another mapping table to translate
|
||||
# "token space guid + token number" to local token number directly.
|
||||
# Local token number is identifier for all internal interface in PCD PEI/DXE
|
||||
# driver.
|
||||
#
|
||||
#
|
||||
# A local token number is a 32-bit value in following meaning:
|
||||
# 32 ------------- 28 ---------- 24 -------- 0
|
||||
# | PCD type mask | Datum Type | Offset |
|
||||
@@ -184,13 +184,13 @@
|
||||
# Offset : indicate the related offset of PCD value in PCD database array.
|
||||
# Based on local token number, PCD driver could fast determine PCD type, value
|
||||
# type and get PCD entry from PCD database.
|
||||
#
|
||||
#
|
||||
# 3.3 PCD Database binary file
|
||||
# PCD Database binary file will be created at build time as the standalone binary image.
|
||||
# To understand the binary image layout, PCD Database C structure is still generated
|
||||
# PCD Database binary file will be created at build time as the standalone binary image.
|
||||
# To understand the binary image layout, PCD Database C structure is still generated
|
||||
# as comments by build tools in PCD driver's autogen.h/
|
||||
# autogen.c file. In generated C structure, following information is stored:
|
||||
# - ExMapTable: This table is used translate a binary dynamicex type PCD's
|
||||
# - ExMapTable: This table is used translate a binary dynamicex type PCD's
|
||||
# "tokenguid + token" to local token number.
|
||||
# - LocalTokenNumberTable:
|
||||
# This table stores all local token number in array, use "Internal
|
||||
@@ -200,19 +200,19 @@
|
||||
# HII type PCD's variable GUID.
|
||||
# - SkuIdTable: TBD
|
||||
# - SystemSkuId: TBD
|
||||
# - PCD value structure:
|
||||
# - PCD value structure:
|
||||
# Every PCD has a value record in PCD database. For different
|
||||
# datum type PCD has different record structure which will be
|
||||
# datum type PCD has different record structure which will be
|
||||
# introduced in 3.3.1
|
||||
#
|
||||
# In a PCD database structure, there are two major area: Init and UnInit.
|
||||
# Init area is use stored above PCD internal structure such as ExMapTable,
|
||||
# LocalTokenNumberTable etc and the (default) value of PCD which has default
|
||||
#
|
||||
# In a PCD database structure, there are two major area: Init and UnInit.
|
||||
# Init area is use stored above PCD internal structure such as ExMapTable,
|
||||
# LocalTokenNumberTable etc and the (default) value of PCD which has default
|
||||
# value specified in platform DSC file.
|
||||
# Unint area is used stored the value of PCD which has no default value in
|
||||
# platform DSC file, the value of NULL, 0 specified in platform DSC file can
|
||||
# be seemed as "no default value".
|
||||
#
|
||||
#
|
||||
# 3.3.1 Simple Sample PCD Database C Structure
|
||||
# A general sample of PCD database structue is as follows:
|
||||
# typedef struct _PCD_DATABASE {
|
||||
@@ -224,7 +224,7 @@
|
||||
# SIZE_INFO SizeTable[PEI_SIZE_TABLE_SIZE];
|
||||
# UINT8 SkuIdTable[PEI_SKUID_TABLE_SIZE];
|
||||
# SKU_ID SystemSkuId;
|
||||
#
|
||||
#
|
||||
# //===== Following is value structure for PCD with default value
|
||||
# ....
|
||||
# ....
|
||||
@@ -236,11 +236,11 @@
|
||||
# ....
|
||||
# } UnInit;
|
||||
# }
|
||||
#
|
||||
#
|
||||
# 3.3.2 PCD value structure in PCD database C structure
|
||||
# The value's structure is generated by build tool in PCD database C structure.
|
||||
# The PCDs in different datum type has different value structure.
|
||||
#
|
||||
#
|
||||
# 3.3.2.1 UINT8/UINT16/UINT32/UINT64 datum type PCD
|
||||
# The C structure for these datum type PCD is just a UINT8/UINT16/UINT32/UINT64
|
||||
# data member in PCD database, For example:
|
||||
@@ -248,36 +248,36 @@
|
||||
# Above structure is generated by build tool, the member name is "PcdCName_Guidvalue"
|
||||
# Member type is UINT16 according to PcdHardwareErrorRecordLevel declaration
|
||||
# in DEC file.
|
||||
#
|
||||
#
|
||||
# 3.3.2.2 VOID* datum type PCD
|
||||
# The value of VOID* datum type PCD is a UINT8/UINT16 array in PCD database.
|
||||
#
|
||||
#
|
||||
# 3.3.2.2.1 VOID* - string type
|
||||
# If the default value for VOID* datum type PCD like L"xxx", the PCD is
|
||||
# used for unicode string, and C structure of this datum type PCD is
|
||||
# If the default value for VOID* datum type PCD like L"xxx", the PCD is
|
||||
# used for unicode string, and C structure of this datum type PCD is
|
||||
# UINT16 string array in PCD database, for example:
|
||||
# UINT16 StringTable[29];
|
||||
# The number of 29 in above sample is max size of a unicode string.
|
||||
#
|
||||
#
|
||||
# If the default value for VOID* datum type PCD like "xxx", the PCD is
|
||||
# used for ascii string, and C structure of this datum type PCD is
|
||||
# used for ascii string, and C structure of this datum type PCD is
|
||||
# UINT8 string array in PCD database, for example:
|
||||
# UINT8 StringTable[20];
|
||||
# The number of 20 in above sample is max size of a ascii string.
|
||||
#
|
||||
#
|
||||
# 3.3.2.2.2 VOID* - byte array
|
||||
# If the default value of VOID* datum type PCD like {'0x29', '0x01', '0xf2'}
|
||||
# the PCD is used for byte array. The generated structrue is same as
|
||||
# the PCD is used for byte array. The generated structrue is same as
|
||||
# above ascii string table,
|
||||
# UINT8 StringTable[13];
|
||||
# The number of 13 in above sample is max size of byte array.
|
||||
#
|
||||
#
|
||||
# 3.3.3 Some utility structures in PCD Database
|
||||
# 3.3.3.1 GuidTable
|
||||
# GuidTable array is used to store all related GUID value in PCD database:
|
||||
# - Variable GUID for HII type PCD
|
||||
# - Token space GUID for dynamicex type PCD
|
||||
#
|
||||
# - Token space GUID for dynamicex type PCD
|
||||
#
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
|
@@ -8,35 +8,35 @@
|
||||
// 2) EFI_PCD_PROTOCOL
|
||||
// It is defined by PI specification 1.2, Vol 3 which only support dynamicEx
|
||||
// type Pcd.
|
||||
//
|
||||
//
|
||||
// For dynamicEx type PCD, it is compatible between PCD_PROTOCOL and EFI_PCD_PROTOCOL.
|
||||
// PCD DXE driver will produce above two protocols at same time.
|
||||
//
|
||||
//
|
||||
// PCD database is generated as the separate binary image at build time. The binary image
|
||||
// will be intergrated into Firmware volume together with PCD driver.
|
||||
//
|
||||
//
|
||||
// ////////////////////////////////////////////////////////////////////////////////
|
||||
// // //
|
||||
// // Introduction of PCD database //
|
||||
// // //
|
||||
// ////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
// 1, Introduction
|
||||
// PCD database hold all dynamic type PCD information. The structure of PEI PCD
|
||||
// database is generated by build tools according to dynamic PCD usage for
|
||||
// specified platform.
|
||||
//
|
||||
//
|
||||
// 2, Dynamic Type PCD
|
||||
// Dynamic type PCD is used for the configuration/setting which value is determined
|
||||
// dynamic. In contrast, the value of static type PCD (FeatureFlag, FixedPcd,
|
||||
// PatchablePcd) is fixed in final generated FD image in build time.
|
||||
//
|
||||
//
|
||||
// 2.1 The "dynamic" determination means one of below cases:
|
||||
// a) The PCD setting value is produced by someone driver and consumed by
|
||||
// other driver in execution time.
|
||||
// b) The PCD setting value is set/get by user from FrontPage.
|
||||
// c) The PCD setting value is produced by platform OEM vendor in specified area.
|
||||
//
|
||||
//
|
||||
// 2.2 According to module distribution way, dynamic PCD could be classfied as:
|
||||
// a) Dynamic:
|
||||
// If module is released in source code and will be built with platform
|
||||
@@ -50,7 +50,7 @@
|
||||
// PcdGetxxEx(gEfiMyTokenspaceGuid, PcdSampleDynamicPcd)
|
||||
// Developer need explicity gives {Token Space Guid:Token Number} as parameter
|
||||
// in writting source code.
|
||||
//
|
||||
//
|
||||
// 2.3 According to PCD value's storage method, dynamic PCD could be classfied as:
|
||||
// a) Default Storage:
|
||||
// - The PCD value is stored in PCD database maintained by PCD driver in boot
|
||||
@@ -60,7 +60,7 @@
|
||||
// is turn off.
|
||||
// - [PcdsDynamicDefault] is used as section name for this type PCD in
|
||||
// platform DSC file. [PcdsDynamicExDefault] is used for dynamicEx type PCD.
|
||||
//
|
||||
//
|
||||
// b) Variable Storage:
|
||||
// - The PCD value is stored in variable area.
|
||||
// - As default storage type, this type PCD could be used for PEI/DXE driver
|
||||
@@ -70,34 +70,34 @@
|
||||
// to variable area is readonly.
|
||||
// - [PcdsDynamicHii] is used as section name for this type PCD in platform
|
||||
// DSC file. [PcdsDynamicExHii] is for dynamicEx type PCD.
|
||||
//
|
||||
//
|
||||
// c) OEM specificed storage area:
|
||||
// - The PCD value is stored in OEM specified area which base address is
|
||||
// specified by a FixedAtBuild PCD setting - PcdVpdBaseAddress.
|
||||
// - The area is read only for PEI and DXE phase.
|
||||
// - [PcdsDynamicVpd] is used as section name for this type PCD in platform
|
||||
// DSC file. [PcdsDynamicExVpd] is for dynamicex type PCD.
|
||||
//
|
||||
//
|
||||
// 2.4 When and how to use dynamic PCD
|
||||
// Module developer do not care the used PCD is dynamic or static when writting
|
||||
// source code/INF. Dynamic PCD and dynamic type is pointed by platform integrator
|
||||
// in platform DSC file. Please ref section 2.3 to get matching between dynamic
|
||||
// PCD type and section name in DSC file.
|
||||
//
|
||||
//
|
||||
// 3, PCD database:
|
||||
// Although dynamic PCD could be in different storage type as above description,
|
||||
// but the basic information and default value for all dynamic PCD is hold
|
||||
// by PCD database maintained by PEI/DXE driver.
|
||||
//
|
||||
//
|
||||
// As the whole EFI BIOS boot path is divided into PEI/DXE phase, the PCD database
|
||||
// also is divided into Pei/Dxe database maintaied by PcdPeim/PcdDxe driver separatly.
|
||||
// To make PcdPeim's driver image smaller, PEI PCD database only hold all dynamic
|
||||
// PCD information used in PEI phase or use in both PEI/DXE phase. And DXE PCD
|
||||
// database contains all PCDs used in PEI/DXE phase in memory.
|
||||
//
|
||||
//
|
||||
// Build tool will generate PCD database into the separate binary file for
|
||||
// PEI/DXE PCD driver according to dynamic PCD section in platform DSC file.
|
||||
//
|
||||
//
|
||||
// 3.1 PcdPeim and PcdDxe
|
||||
// PEI PCD database is maintained by PcdPeim driver run from flash. PcdPeim driver
|
||||
// build guid hob in temporary memory and copy the binary data base from flash
|
||||
@@ -105,11 +105,11 @@
|
||||
// DXE PCD database is maintained by PcdDxe driver.At entry point of PcdDxe driver,
|
||||
// a new PCD database is allocated in boot-time memory which including all
|
||||
// PEI PCD and DXE PCD entry.
|
||||
//
|
||||
//
|
||||
// Pcd driver should run as early as possible before any other driver access
|
||||
// dynamic PCD's value. PEI/DXE "Apriori File" mechanism make it possible by
|
||||
// making PcdPeim/PcdDxe as first dispatching driver in PEI/DXE phase.
|
||||
//
|
||||
//
|
||||
// 3.2 Token space Guid/Token number, Platform token, Local token number
|
||||
// Dynamic PCD
|
||||
// +-----------+ +---------+
|
||||
@@ -129,13 +129,13 @@
|
||||
// | Token |
|
||||
// | Number |
|
||||
// +-----------+
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// 3.2.1 Pair of Token space guid + Token number
|
||||
// Any type PCD is identified by pair of "TokenSpaceGuid + TokeNumber". But it
|
||||
// is not easy maintained by PCD driver, and hashed token number will make
|
||||
// searching slowly.
|
||||
//
|
||||
//
|
||||
// 3.2.2 Platform Token Number
|
||||
// "Platform token number" concept is introduced for mapping to a pair of
|
||||
// "TokenSpaceGuid + TokenNumber". The platform token number is generated by
|
||||
@@ -149,14 +149,14 @@
|
||||
// mechanism is not suitable for binary module which use DynamicEx type PCD.
|
||||
// To access a dynamicEx type PCD, pair of "token space guid/token number" all need
|
||||
// to be specificed for PcdSet/PcdGet accessing macro.
|
||||
//
|
||||
//
|
||||
// Platform Token Number is started from 1, and inceased continuous. From whole
|
||||
// platform scope, there are two zones: PEI Zone and DXE Zone
|
||||
// | Platform Token Number
|
||||
// ----------|----------------------------------------------------------------
|
||||
// PEI Zone: | 1 ~ PEI_LOCAL_TOKEN_NUMBER
|
||||
// DXE Zone: | (PEI_LOCAL_TOKEN_NUMBER + 1) ~ (PEI_LOCAL_TOKEN_NUMBER + DXE_LOCAL_TOKEN_NUMBER)
|
||||
//
|
||||
//
|
||||
// 3.2.3 Local Token Number
|
||||
// To fast searching a PCD entry in PCD database, PCD driver translate
|
||||
// platform token number to local token number via a mapping table.
|
||||
@@ -164,7 +164,7 @@
|
||||
// "token space guid + token number" to local token number directly.
|
||||
// Local token number is identifier for all internal interface in PCD PEI/DXE
|
||||
// driver.
|
||||
//
|
||||
//
|
||||
// A local token number is a 32-bit value in following meaning:
|
||||
// 32 ------------- 28 ---------- 24 -------- 0
|
||||
// | PCD type mask | Datum Type | Offset |
|
||||
@@ -184,7 +184,7 @@
|
||||
// Offset : indicate the related offset of PCD value in PCD database array.
|
||||
// Based on local token number, PCD driver could fast determine PCD type, value
|
||||
// type and get PCD entry from PCD database.
|
||||
//
|
||||
//
|
||||
// 3.3 PCD Database binary file
|
||||
// PCD Database binary file will be created at build time as the standalone binary image.
|
||||
// To understand the binary image layout, PCD Database C structure is still generated
|
||||
@@ -204,7 +204,7 @@
|
||||
// Every PCD has a value record in PCD database. For different
|
||||
// datum type PCD has different record structure which will be
|
||||
// introduced in 3.3.1
|
||||
//
|
||||
//
|
||||
// In a PCD database structure, there are two major area: Init and UnInit.
|
||||
// Init area is use stored above PCD internal structure such as ExMapTable,
|
||||
// LocalTokenNumberTable etc and the (default) value of PCD which has default
|
||||
@@ -212,7 +212,7 @@
|
||||
// Unint area is used stored the value of PCD which has no default value in
|
||||
// platform DSC file, the value of NULL, 0 specified in platform DSC file can
|
||||
// be seemed as "no default value".
|
||||
//
|
||||
//
|
||||
// 3.3.1 Simple Sample PCD Database C Structure
|
||||
// A general sample of PCD database structue is as follows:
|
||||
// typedef struct _PCD_DATABASE {
|
||||
@@ -224,7 +224,7 @@
|
||||
// SIZE_INFO SizeTable[PEI_SIZE_TABLE_SIZE];
|
||||
// UINT8 SkuIdTable[PEI_SKUID_TABLE_SIZE];
|
||||
// SKU_ID SystemSkuId;
|
||||
//
|
||||
//
|
||||
// //===== Following is value structure for PCD with default value
|
||||
// ....
|
||||
// ....
|
||||
@@ -236,11 +236,11 @@
|
||||
// ....
|
||||
// } UnInit;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// 3.3.2 PCD value structure in PCD database C structure
|
||||
// The value's structure is generated by build tool in PCD database C structure.
|
||||
// The PCDs in different datum type has different value structure.
|
||||
//
|
||||
//
|
||||
// 3.3.2.1 UINT8/UINT16/UINT32/UINT64 datum type PCD
|
||||
// The C structure for these datum type PCD is just a UINT8/UINT16/UINT32/UINT64
|
||||
// data member in PCD database, For example:
|
||||
@@ -248,30 +248,30 @@
|
||||
// Above structure is generated by build tool, the member name is "PcdCName_Guidvalue"
|
||||
// Member type is UINT16 according to PcdHardwareErrorRecordLevel declaration
|
||||
// in DEC file.
|
||||
//
|
||||
//
|
||||
// 3.3.2.2 VOID* datum type PCD
|
||||
// The value of VOID* datum type PCD is a UINT8/UINT16 array in PCD database.
|
||||
//
|
||||
//
|
||||
// 3.3.2.2.1 VOID* - string type
|
||||
// If the default value for VOID* datum type PCD like L"xxx", the PCD is
|
||||
// used for unicode string, and C structure of this datum type PCD is
|
||||
// UINT16 string array in PCD database, for example:
|
||||
// UINT16 StringTable[29];
|
||||
// The number of 29 in above sample is max size of a unicode string.
|
||||
//
|
||||
//
|
||||
// If the default value for VOID* datum type PCD like "xxx", the PCD is
|
||||
// used for ascii string, and C structure of this datum type PCD is
|
||||
// UINT8 string array in PCD database, for example:
|
||||
// UINT8 StringTable[20];
|
||||
// The number of 20 in above sample is max size of a ascii string.
|
||||
//
|
||||
//
|
||||
// 3.3.2.2.2 VOID* - byte array
|
||||
// If the default value of VOID* datum type PCD like {'0x29', '0x01', '0xf2'}
|
||||
// the PCD is used for byte array. The generated structrue is same as
|
||||
// above ascii string table,
|
||||
// UINT8 StringTable[13];
|
||||
// The number of 13 in above sample is max size of byte array.
|
||||
//
|
||||
//
|
||||
// 3.3.3 Some utility structures in PCD Database
|
||||
// 3.3.3.1 GuidTable
|
||||
// GuidTable array is used to store all related GUID value in PCD database:
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// PcdDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -12,8 +12,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"Platform Configuration Database DXE Driver"
|
||||
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Help functions used by PCD DXE driver.
|
||||
|
||||
Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -19,23 +19,23 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
PCD_DATABASE mPcdDatabase;
|
||||
|
||||
UINT32 mPcdTotalTokenCount;
|
||||
UINT32 mPeiLocalTokenCount;
|
||||
UINT32 mDxeLocalTokenCount;
|
||||
UINT32 mPeiNexTokenCount;
|
||||
UINT32 mDxeNexTokenCount;
|
||||
UINT32 mPcdTotalTokenCount;
|
||||
UINT32 mPeiLocalTokenCount;
|
||||
UINT32 mDxeLocalTokenCount;
|
||||
UINT32 mPeiNexTokenCount;
|
||||
UINT32 mDxeNexTokenCount;
|
||||
UINT32 mPeiExMapppingTableSize;
|
||||
UINT32 mDxeExMapppingTableSize;
|
||||
UINT32 mPeiGuidTableSize;
|
||||
UINT32 mDxeGuidTableSize;
|
||||
|
||||
BOOLEAN mPeiExMapTableEmpty;
|
||||
BOOLEAN mDxeExMapTableEmpty;
|
||||
BOOLEAN mPeiExMapTableEmpty;
|
||||
BOOLEAN mDxeExMapTableEmpty;
|
||||
BOOLEAN mPeiDatabaseEmpty;
|
||||
|
||||
LIST_ENTRY *mCallbackFnTable;
|
||||
EFI_GUID **TmpTokenSpaceBuffer;
|
||||
UINTN TmpTokenSpaceBufferCount;
|
||||
UINTN TmpTokenSpaceBufferCount;
|
||||
|
||||
UINTN mPeiPcdDbSize = 0;
|
||||
PEI_PCD_DATABASE *mPeiPcdDbBinary = NULL;
|
||||
@@ -66,7 +66,7 @@ GetLocalTokenNumber (
|
||||
//
|
||||
TokenNumber--;
|
||||
|
||||
LocalTokenNumberTable = IsPeiDb ? (UINT32 *)((UINT8 *)mPcdDatabase.PeiDb + mPcdDatabase.PeiDb->LocalTokenNumberTableOffset) :
|
||||
LocalTokenNumberTable = IsPeiDb ? (UINT32 *)((UINT8 *)mPcdDatabase.PeiDb + mPcdDatabase.PeiDb->LocalTokenNumberTableOffset) :
|
||||
(UINT32 *)((UINT8 *)mPcdDatabase.DxeDb + mPcdDatabase.DxeDb->LocalTokenNumberTableOffset);
|
||||
TokenNumber = IsPeiDb ? TokenNumber : TokenNumber - mPeiLocalTokenCount;
|
||||
|
||||
@@ -133,7 +133,7 @@ GetPcdName (
|
||||
CHAR8 *Name;
|
||||
|
||||
//
|
||||
// Return NULL when PCD name table is absent.
|
||||
// Return NULL when PCD name table is absent.
|
||||
//
|
||||
if (IsPeiDb) {
|
||||
if (mPcdDatabase.PeiDb->PcdNameTableOffset == 0) {
|
||||
@@ -181,7 +181,7 @@ GetPcdName (
|
||||
//
|
||||
AsciiStrCatS (Name, NameSize, TokenSpaceName);
|
||||
Name[AsciiStrSize (TokenSpaceName) - sizeof (CHAR8)] = '.';
|
||||
AsciiStrCatS (Name, NameSize, PcdName);
|
||||
AsciiStrCatS (Name, NameSize, PcdName);
|
||||
}
|
||||
|
||||
return Name;
|
||||
@@ -198,7 +198,7 @@ GetPcdName (
|
||||
@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[out] PcdInfo The returned information associated with the requested TokenNumber.
|
||||
The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
|
||||
The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
|
||||
|
||||
@retval EFI_SUCCESS The PCD information was returned successfully
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
@@ -247,7 +247,7 @@ ExGetPcdInfo (
|
||||
PcdInfo->PcdSize = 0;
|
||||
//
|
||||
// Here use one representative in the token space to get the TokenSpaceCName.
|
||||
//
|
||||
//
|
||||
PcdInfo->PcdName = GetPcdName (TRUE, IsPeiDb, ExMapTable[Index].TokenNumber);
|
||||
return EFI_SUCCESS;
|
||||
} else if (ExMapTable[Index].ExTokenNumber == TokenNumber) {
|
||||
@@ -352,10 +352,10 @@ DxeGetPcdInfo (
|
||||
|
||||
/**
|
||||
Get the PCD entry pointer in PCD database.
|
||||
|
||||
|
||||
This routine will visit PCD database to find the PCD entry according to given
|
||||
token number. The given token number is autogened by build tools and it will be
|
||||
translated to local token number. Local token number contains PCD's type and
|
||||
token number. The given token number is autogened by build tools and it will be
|
||||
translated to local token number. Local token number contains PCD's type and
|
||||
offset of PCD entry in PCD database.
|
||||
|
||||
@param TokenNumber Token's number, it is autogened by build tools
|
||||
@@ -385,7 +385,7 @@ GetWorker (
|
||||
EFI_STATUS Status;
|
||||
UINT32 LocalTokenNumber;
|
||||
UINT32 Offset;
|
||||
STRING_HEAD StringTableIdx;
|
||||
STRING_HEAD StringTableIdx;
|
||||
BOOLEAN IsPeiDb;
|
||||
|
||||
//
|
||||
@@ -407,7 +407,7 @@ GetWorker (
|
||||
|
||||
//
|
||||
// EBC compiler is very choosy. It may report warning about comparison
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// comparison.
|
||||
//
|
||||
ASSERT (TokenNumber + 1 < mPcdTotalTokenCount + 1);
|
||||
@@ -415,14 +415,14 @@ GetWorker (
|
||||
ASSERT ((GetSize == DxePcdGetSize (TokenNumber + 1)) || (GetSize == 0));
|
||||
|
||||
// EBC compiler is very choosy. It may report warning about comparison
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// comparison.
|
||||
IsPeiDb = (BOOLEAN) ((TokenNumber + 1 < mPeiLocalTokenCount + 1) ? TRUE : FALSE);
|
||||
|
||||
LocalTokenNumber = GetLocalTokenNumber (IsPeiDb, TokenNumber + 1);
|
||||
|
||||
PcdDb = IsPeiDb ? ((UINT8 *) mPcdDatabase.PeiDb) : ((UINT8 *) mPcdDatabase.DxeDb);
|
||||
|
||||
|
||||
if (IsPeiDb) {
|
||||
StringTable = (UINT8 *) ((UINT8 *)mPcdDatabase.PeiDb + mPcdDatabase.PeiDb->StringTableOffset);
|
||||
} else {
|
||||
@@ -453,11 +453,11 @@ GetWorker (
|
||||
|
||||
if ((LocalTokenNumber & PCD_TYPE_ALL_SET) == (PCD_TYPE_HII|PCD_TYPE_STRING)) {
|
||||
//
|
||||
// If a HII type PCD's datum type is VOID*, the DefaultValueOffset is the index of
|
||||
// If a HII type PCD's datum type is VOID*, the DefaultValueOffset is the index of
|
||||
// string array in string table.
|
||||
//
|
||||
StringTableIdx = *(STRING_HEAD*)((UINT8 *) PcdDb + VariableHead->DefaultValueOffset);
|
||||
VaraiableDefaultBuffer = (UINT8 *) (StringTable + StringTableIdx);
|
||||
StringTableIdx = *(STRING_HEAD*)((UINT8 *) PcdDb + VariableHead->DefaultValueOffset);
|
||||
VaraiableDefaultBuffer = (UINT8 *) (StringTable + StringTableIdx);
|
||||
} else {
|
||||
VaraiableDefaultBuffer = (UINT8 *) PcdDb + VariableHead->DefaultValueOffset;
|
||||
}
|
||||
@@ -501,7 +501,7 @@ GetWorker (
|
||||
default:
|
||||
ASSERT (FALSE);
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
|
||||
EfiReleaseLock (&mPcdDatabaseLock);
|
||||
@@ -515,9 +515,9 @@ GetWorker (
|
||||
|
||||
This routine will register a callback function to a PCD entry by given token number
|
||||
and token space guid.
|
||||
|
||||
|
||||
@param TokenNumber PCD token's number, it is autogened by build tools.
|
||||
@param Guid PCD token space's guid,
|
||||
@param Guid PCD token space's guid,
|
||||
if not NULL, this PCD is dynamicEx type PCD.
|
||||
@param CallBackFunction Callback function pointer
|
||||
|
||||
@@ -565,7 +565,7 @@ DxeRegisterCallBackWorker (
|
||||
|
||||
FnTableEntry->CallbackFn = CallBackFunction;
|
||||
InsertTailList (ListHead, &FnTableEntry->Node);
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -617,7 +617,7 @@ DxeUnRegisterCallBackWorker (
|
||||
//
|
||||
RemoveEntryList (ListNode);
|
||||
FreePool (FnTableEntry);
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
ListNode = GetNextNode (ListHead, ListNode);
|
||||
@@ -628,16 +628,16 @@ DxeUnRegisterCallBackWorker (
|
||||
|
||||
/**
|
||||
Get next token number in given token space.
|
||||
|
||||
|
||||
This routine is used for dynamicEx type PCD. It will firstly scan token space
|
||||
table to get token space according to given token space guid. Then scan given
|
||||
token number in found token space, if found, then return next token number in
|
||||
table to get token space according to given token space guid. Then scan given
|
||||
token number in found token space, if found, then return next token number in
|
||||
this token space.
|
||||
|
||||
@param Guid Token space guid. Next token number will be scaned in
|
||||
@param Guid Token space guid. Next token number will be scaned in
|
||||
this token space.
|
||||
@param TokenNumber Token number.
|
||||
If PCD_INVALID_TOKEN_NUMBER, return first token number in
|
||||
@param TokenNumber Token number.
|
||||
If PCD_INVALID_TOKEN_NUMBER, return first token number in
|
||||
token space table.
|
||||
If not PCD_INVALID_TOKEN_NUMBER, return next token number
|
||||
in token space table.
|
||||
@@ -668,8 +668,8 @@ ExGetNextTokeNumber (
|
||||
UINTN ExMapTableCount;
|
||||
|
||||
//
|
||||
// Scan token space guid
|
||||
//
|
||||
// Scan token space guid
|
||||
//
|
||||
MatchGuid = ScanGuid (GuidTable, SizeOfGuidTable, Guid);
|
||||
if (MatchGuid == NULL) {
|
||||
return EFI_NOT_FOUND;
|
||||
@@ -734,12 +734,12 @@ ExGetNextTokeNumber (
|
||||
DXE_PCD_DATABASE *
|
||||
LocateExPcdBinary (
|
||||
VOID
|
||||
)
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
|
||||
//
|
||||
// Search the External Pcd database from one section of current FFS,
|
||||
// Search the External Pcd database from one section of current FFS,
|
||||
// and read it to memory
|
||||
//
|
||||
Status = GetSectionFromFfs (
|
||||
@@ -838,7 +838,7 @@ UpdatePcdDatabase (
|
||||
|
||||
/**
|
||||
Initialize the PCD database in DXE phase.
|
||||
|
||||
|
||||
PCD database in DXE phase also contains PCD database in PEI phase which is copied
|
||||
from GUID Hob.
|
||||
|
||||
@@ -869,7 +869,7 @@ BuildPcdDxeDataBase (
|
||||
GuidHob = GetFirstGuidHob (&gPcdDataBaseHobGuid);
|
||||
if (GuidHob != NULL) {
|
||||
|
||||
//
|
||||
//
|
||||
// If no PEIMs use dynamic Pcd Entry, the Pcd Service PEIM
|
||||
// should not be included at all. So the GuidHob could
|
||||
// be NULL. If it is NULL, we just copy over the DXE Default
|
||||
@@ -916,7 +916,7 @@ BuildPcdDxeDataBase (
|
||||
|
||||
mPcdTotalTokenCount = mPeiLocalTokenCount + mDxeLocalTokenCount;
|
||||
mPeiNexTokenCount = mPeiLocalTokenCount - mPcdDatabase.PeiDb->ExTokenCount;
|
||||
mDxeNexTokenCount = mDxeLocalTokenCount - mPcdDatabase.DxeDb->ExTokenCount;
|
||||
mDxeNexTokenCount = mDxeLocalTokenCount - mPcdDatabase.DxeDb->ExTokenCount;
|
||||
|
||||
mPeiExMapTableEmpty = (mPcdDatabase.PeiDb->ExTokenCount == 0) ? TRUE : FALSE;
|
||||
mDxeExMapTableEmpty = (mPcdDatabase.DxeDb->ExTokenCount == 0) ? TRUE : FALSE;
|
||||
@@ -933,7 +933,7 @@ BuildPcdDxeDataBase (
|
||||
|
||||
//
|
||||
// EBC compiler is very choosy. It may report warning about comparison
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// comparison.
|
||||
//
|
||||
for (Index = 0; Index + 1 < mPcdTotalTokenCount + 1; Index++) {
|
||||
@@ -946,7 +946,7 @@ BuildPcdDxeDataBase (
|
||||
|
||||
@param VariableGuid Variable's guid
|
||||
@param VariableName Variable's unicode name string
|
||||
@param VariableData Variable's data pointer,
|
||||
@param VariableData Variable's data pointer,
|
||||
@param VariableSize Variable's size.
|
||||
|
||||
@return the status of gRT->GetVariable
|
||||
@@ -965,7 +965,7 @@ GetHiiVariable (
|
||||
|
||||
Size = 0;
|
||||
Buffer = NULL;
|
||||
|
||||
|
||||
//
|
||||
// Firstly get the real size of HII variable
|
||||
//
|
||||
@@ -976,7 +976,7 @@ GetHiiVariable (
|
||||
&Size,
|
||||
Buffer
|
||||
);
|
||||
|
||||
|
||||
//
|
||||
// Allocate buffer to hold whole variable data according to variable size.
|
||||
//
|
||||
@@ -998,7 +998,7 @@ GetHiiVariable (
|
||||
*VariableSize = Size;
|
||||
} else {
|
||||
//
|
||||
// Use Default Data only when variable is not found.
|
||||
// Use Default Data only when variable is not found.
|
||||
// For other error status, correct data can't be got, and trig ASSERT().
|
||||
//
|
||||
ASSERT (Status == EFI_NOT_FOUND);
|
||||
@@ -1008,7 +1008,7 @@ GetHiiVariable (
|
||||
}
|
||||
|
||||
/**
|
||||
Invoke the callback function when dynamic PCD entry was set, if this PCD entry
|
||||
Invoke the callback function when dynamic PCD entry was set, if this PCD entry
|
||||
has registered callback function.
|
||||
|
||||
@param ExTokenNumber DynamicEx PCD's token number, if this PCD entry is dyanmicEx
|
||||
@@ -1044,14 +1044,14 @@ InvokeCallbackOnSet (
|
||||
while (ListNode != ListHead) {
|
||||
FnTableEntry = CR_FNENTRY_FROM_LISTNODE (ListNode, CALLBACK_FN_ENTRY, Node);
|
||||
|
||||
FnTableEntry->CallbackFn(Guid,
|
||||
FnTableEntry->CallbackFn(Guid,
|
||||
(Guid == NULL) ? TokenNumber : ExTokenNumber,
|
||||
Data,
|
||||
Size);
|
||||
|
||||
|
||||
ListNode = GetNextNode (ListHead, ListNode);
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1088,10 +1088,10 @@ SetValueWorker (
|
||||
|
||||
@retval EFI_INVALID_PARAMETER If this PCD type is VPD, VPD PCD can not be set.
|
||||
@retval EFI_INVALID_PARAMETER If Size can not be set to size table.
|
||||
@retval EFI_INVALID_PARAMETER If Size of non-Ptr type PCD does not match the size information in PCD database.
|
||||
@retval EFI_INVALID_PARAMETER If Size of non-Ptr type PCD does not match the size information in PCD database.
|
||||
@retval EFI_NOT_FOUND If value type of PCD entry is intergrate, but not in
|
||||
range of UINT8, UINT16, UINT32, UINT64
|
||||
@retval EFI_NOT_FOUND Can not find the PCD type according to token number.
|
||||
@retval EFI_NOT_FOUND Can not find the PCD type according to token number.
|
||||
**/
|
||||
EFI_STATUS
|
||||
SetWorker (
|
||||
@@ -1125,10 +1125,10 @@ SetWorker (
|
||||
TokenNumber--;
|
||||
|
||||
TmpTokenNumber = TokenNumber;
|
||||
|
||||
|
||||
//
|
||||
// EBC compiler is very choosy. It may report warning about comparison
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// comparison.
|
||||
//
|
||||
ASSERT (TokenNumber + 1 < mPcdTotalTokenCount + 1);
|
||||
@@ -1150,7 +1150,7 @@ SetWorker (
|
||||
|
||||
//
|
||||
// EBC compiler is very choosy. It may report warning about comparison
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// comparison.
|
||||
//
|
||||
if ((TokenNumber + 1 < mPeiNexTokenCount + 1) ||
|
||||
@@ -1165,7 +1165,7 @@ SetWorker (
|
||||
|
||||
//
|
||||
// EBC compiler is very choosy. It may report warning about comparison
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// comparison.
|
||||
//
|
||||
IsPeiDb = (BOOLEAN) ((TokenNumber + 1 < mPeiLocalTokenCount + 1) ? TRUE : FALSE);
|
||||
@@ -1182,7 +1182,7 @@ SetWorker (
|
||||
StringTable = (UINT8 *) ((UINT8 *)mPcdDatabase.DxeDb + mPcdDatabase.DxeDb->StringTableOffset);
|
||||
}
|
||||
|
||||
|
||||
|
||||
InternalData = PcdDb + Offset;
|
||||
|
||||
switch (LocalTokenNumber & PCD_TYPE_ALL_SET) {
|
||||
@@ -1190,7 +1190,7 @@ SetWorker (
|
||||
ASSERT (FALSE);
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
break;
|
||||
|
||||
|
||||
case PCD_TYPE_STRING:
|
||||
if (SetPtrTypeSize (TmpTokenNumber, Size)) {
|
||||
CopyMem (StringTable + *((STRING_HEAD *)InternalData), Data, *Size);
|
||||
@@ -1223,7 +1223,7 @@ SetWorker (
|
||||
Attributes = VariableHead->Attributes;
|
||||
Status = SetHiiVariable (Guid, Name, Attributes, Data, *Size, VariableOffset);
|
||||
break;
|
||||
|
||||
|
||||
case PCD_TYPE_DATA:
|
||||
if (PtrType) {
|
||||
if (SetPtrTypeSize (TmpTokenNumber, Size)) {
|
||||
@@ -1267,7 +1267,7 @@ SetWorker (
|
||||
}
|
||||
|
||||
EfiReleaseLock (&mPcdDatabaseLock);
|
||||
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -1286,7 +1286,7 @@ ExGetWorker (
|
||||
IN CONST EFI_GUID *Guid,
|
||||
IN UINTN ExTokenNumber,
|
||||
IN UINTN GetSize
|
||||
)
|
||||
)
|
||||
{
|
||||
return GetWorker(GetExPcdTokenNumber (Guid, (UINT32) ExTokenNumber), GetSize);
|
||||
}
|
||||
@@ -1315,12 +1315,12 @@ ExSetValueWorker (
|
||||
|
||||
/**
|
||||
Set value for a dynamic-ex PCD entry.
|
||||
|
||||
This routine find the local token number according to dynamic-ex PCD's token
|
||||
|
||||
This routine find the local token number according to dynamic-ex PCD's token
|
||||
space guid and token number firstly, and invoke callback function if this PCD
|
||||
entry registered callback function. Finally, invoken general SetWorker to set
|
||||
PCD value.
|
||||
|
||||
|
||||
@param ExTokenNumber Dynamic-ex PCD token number.
|
||||
@param Guid Token space guid for dynamic-ex PCD.
|
||||
@param Data PCD value want to be set
|
||||
@@ -1341,7 +1341,7 @@ ExSetWorker (
|
||||
)
|
||||
{
|
||||
UINTN TokenNumber;
|
||||
|
||||
|
||||
TokenNumber = GetExPcdTokenNumber (Guid, (UINT32) ExTokenNumber);
|
||||
|
||||
InvokeCallbackOnSet ((UINT32) ExTokenNumber, Guid, TokenNumber, Data, *SetSize);
|
||||
@@ -1431,9 +1431,9 @@ GetVariableSizeAndDataFromHiiPcd (
|
||||
/**
|
||||
Set value for HII-type PCD.
|
||||
|
||||
A HII-type PCD's value is stored in a variable. Setting/Getting the value of
|
||||
A HII-type PCD's value is stored in a variable. Setting/Getting the value of
|
||||
HII-type PCD is to visit this variable.
|
||||
|
||||
|
||||
@param VariableGuid Guid of variable which stored value of a HII-type PCD.
|
||||
@param VariableName Unicode name of variable which stored value of a HII-type PCD.
|
||||
@param SetAttributes Attributes bitmask to set for the variable.
|
||||
@@ -1473,7 +1473,7 @@ SetHiiVariable (
|
||||
&Size,
|
||||
NULL
|
||||
);
|
||||
|
||||
|
||||
if (Status == EFI_BUFFER_TOO_SMALL) {
|
||||
//
|
||||
// Patch new PCD's value to offset in given HII variable.
|
||||
@@ -1493,7 +1493,7 @@ SetHiiVariable (
|
||||
&Size,
|
||||
Buffer
|
||||
);
|
||||
|
||||
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
CopyMem ((UINT8 *)Buffer + Offset, Data, DataSize);
|
||||
@@ -1543,9 +1543,9 @@ SetHiiVariable (
|
||||
);
|
||||
|
||||
FreePool (Buffer);
|
||||
return Status;
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// If we drop to here, the value is failed to be written in to variable area.
|
||||
//
|
||||
@@ -1558,14 +1558,14 @@ SetHiiVariable (
|
||||
A dynamic-ex type PCD, developer must provide pair of token space guid: token number
|
||||
in DEC file. PCD database maintain a mapping table that translate pair of {token
|
||||
space guid: token number} to Token Number.
|
||||
|
||||
|
||||
@param Guid Token space guid for dynamic-ex PCD entry.
|
||||
@param ExTokenNumber Dynamic-ex PCD token number.
|
||||
|
||||
@return Token Number for dynamic-ex PCD.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
UINTN
|
||||
GetExPcdTokenNumber (
|
||||
IN CONST EFI_GUID *Guid,
|
||||
IN UINT32 ExTokenNumber
|
||||
@@ -1622,7 +1622,7 @@ GetExPcdTokenNumber (
|
||||
|
||||
/**
|
||||
Wrapper function of getting index of PCD entry in size table.
|
||||
|
||||
|
||||
@param LocalTokenNumberTableIdx Index of this PCD in local token number table.
|
||||
@param IsPeiDb If TRUE, the pcd entry is initialized in PEI phase,
|
||||
If FALSE, the pcd entry is initialized in DXE phase.
|
||||
@@ -1639,7 +1639,7 @@ GetSizeTableIndex (
|
||||
UINTN LocalTokenNumber;
|
||||
UINTN Index;
|
||||
UINTN SizeTableIdx;
|
||||
|
||||
|
||||
if (IsPeiDb) {
|
||||
LocalTokenNumberTable = (UINT32 *)((UINT8 *)mPcdDatabase.PeiDb + mPcdDatabase.PeiDb->LocalTokenNumberTableOffset);
|
||||
} else {
|
||||
@@ -1653,7 +1653,7 @@ GetSizeTableIndex (
|
||||
|
||||
if ((LocalTokenNumber & PCD_DATUM_TYPE_ALL_SET) == PCD_DATUM_TYPE_POINTER) {
|
||||
//
|
||||
// SizeTable only contain record for PCD_DATUM_TYPE_POINTER type
|
||||
// SizeTable only contain record for PCD_DATUM_TYPE_POINTER type
|
||||
// PCD entry.
|
||||
//
|
||||
if ((LocalTokenNumber & PCD_TYPE_VPD) != 0) {
|
||||
@@ -1676,7 +1676,7 @@ GetSizeTableIndex (
|
||||
|
||||
}
|
||||
|
||||
return SizeTableIdx;
|
||||
return SizeTableIdx;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1701,7 +1701,7 @@ GetPtrTypeSize (
|
||||
UINT32 *LocalTokenNumberTable;
|
||||
|
||||
// EBC compiler is very choosy. It may report warning about comparison
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// comparison.
|
||||
IsPeiDb = (BOOLEAN) (LocalTokenNumberTableIdx + 1 < mPeiLocalTokenCount + 1);
|
||||
|
||||
@@ -1718,12 +1718,12 @@ GetPtrTypeSize (
|
||||
LocalTokenNumber = LocalTokenNumberTable[LocalTokenNumberTableIdx];
|
||||
|
||||
ASSERT ((LocalTokenNumber & PCD_DATUM_TYPE_ALL_SET) == PCD_DATUM_TYPE_POINTER);
|
||||
|
||||
|
||||
SizeTableIdx = GetSizeTableIndex (LocalTokenNumberTableIdx, IsPeiDb);
|
||||
|
||||
*MaxSize = SizeTable[SizeTableIdx];
|
||||
//
|
||||
// SizeTable only contain record for PCD_DATUM_TYPE_POINTER type
|
||||
// SizeTable only contain record for PCD_DATUM_TYPE_POINTER type
|
||||
// PCD entry.
|
||||
//
|
||||
if ((LocalTokenNumber & PCD_TYPE_VPD) != 0) {
|
||||
@@ -1769,7 +1769,7 @@ SetPtrTypeSize (
|
||||
|
||||
//
|
||||
// EBC compiler is very choosy. It may report warning about comparison
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// comparison.
|
||||
//
|
||||
IsPeiDb = (BOOLEAN) (LocalTokenNumberTableIdx + 1 < mPeiLocalTokenCount + 1);
|
||||
@@ -1786,12 +1786,12 @@ SetPtrTypeSize (
|
||||
LocalTokenNumber = LocalTokenNumberTable[LocalTokenNumberTableIdx];
|
||||
|
||||
ASSERT ((LocalTokenNumber & PCD_DATUM_TYPE_ALL_SET) == PCD_DATUM_TYPE_POINTER);
|
||||
|
||||
|
||||
SizeTableIdx = GetSizeTableIndex (LocalTokenNumberTableIdx, IsPeiDb);
|
||||
|
||||
MaxSize = SizeTable[SizeTableIdx];
|
||||
//
|
||||
// SizeTable only contain record for PCD_DATUM_TYPE_POINTER type
|
||||
// SizeTable only contain record for PCD_DATUM_TYPE_POINTER type
|
||||
// PCD entry.
|
||||
//
|
||||
if ((LocalTokenNumber & PCD_TYPE_VPD) != 0) {
|
||||
@@ -1805,8 +1805,8 @@ SetPtrTypeSize (
|
||||
(*CurrentSize == MAX_ADDRESS)) {
|
||||
*CurrentSize = MaxSize;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// We have only two entry for Non-Sku enabled PCD entry:
|
||||
// 1) MAX SIZE
|
||||
@@ -1833,7 +1833,7 @@ VariableLockDynamicHiiPcd (
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
PCD_DATABASE_INIT *Database;
|
||||
UINT32 LocalTokenCount;
|
||||
UINT32 LocalTokenCount;
|
||||
UINTN TokenNumber;
|
||||
UINT32 LocalTokenNumber;
|
||||
UINTN Offset;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Private functions used by PCD DXE driver.
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -109,21 +109,21 @@ DxeGetPcdInfoGetSku (
|
||||
/**
|
||||
Sets the SKU value for subsequent calls to set or get PCD token values.
|
||||
|
||||
SetSku() sets the SKU Id to be used for subsequent calls to set or get PCD values.
|
||||
SetSku() sets the SKU Id to be used for subsequent calls to set or get PCD values.
|
||||
SetSku() is normally called only once by the system.
|
||||
|
||||
For each item (token), the database can hold a single value that applies to all SKUs,
|
||||
or multiple values, where each value is associated with a specific SKU Id. Items with multiple,
|
||||
SKU-specific values are called SKU enabled.
|
||||
|
||||
The SKU Id of zero is reserved as a default. The valid SkuId range is 1 to 255.
|
||||
For tokens that are not SKU enabled, the system ignores any set SKU Id and works with the
|
||||
single value for that token. For SKU-enabled tokens, the system will use the SKU Id set by the
|
||||
last call to SetSku(). If no 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
|
||||
For each item (token), the database can hold a single value that applies to all SKUs,
|
||||
or multiple values, where each value is associated with a specific SKU Id. Items with multiple,
|
||||
SKU-specific values are called SKU enabled.
|
||||
|
||||
The SKU Id of zero is reserved as a default. The valid SkuId range is 1 to 255.
|
||||
For tokens that are not SKU enabled, the system ignores any set SKU Id and works with the
|
||||
single value for that token. For SKU-enabled tokens, the system will use the SKU Id set by the
|
||||
last call to SetSku(). If no 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 that will be used when the PCD service will retrieve and
|
||||
@param[in] SkuId The SKU value that will be used when the PCD service will retrieve and
|
||||
set values associated with a PCD token.
|
||||
|
||||
**/
|
||||
@@ -136,13 +136,13 @@ DxePcdSetSku (
|
||||
/**
|
||||
Retrieves an 8-bit value for a given PCD token.
|
||||
|
||||
Retrieves the current byte-sized value for a PCD token number.
|
||||
Retrieves the current byte-sized value for a PCD token number.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The UINT8 value.
|
||||
|
||||
|
||||
**/
|
||||
UINT8
|
||||
EFIAPI
|
||||
@@ -153,13 +153,13 @@ DxePcdGet8 (
|
||||
/**
|
||||
Retrieves an 16-bit value for a given PCD token.
|
||||
|
||||
Retrieves the current 16-bits value for a PCD token number.
|
||||
Retrieves the current 16-bits value for a PCD token number.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The UINT16 value.
|
||||
|
||||
|
||||
**/
|
||||
UINT16
|
||||
EFIAPI
|
||||
@@ -170,13 +170,13 @@ DxePcdGet16 (
|
||||
/**
|
||||
Retrieves an 32-bit value for a given PCD token.
|
||||
|
||||
Retrieves the current 32-bits value for a PCD token number.
|
||||
Retrieves the current 32-bits value for a PCD token number.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The UINT32 value.
|
||||
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
@@ -187,13 +187,13 @@ DxePcdGet32 (
|
||||
/**
|
||||
Retrieves an 64-bit value for a given PCD token.
|
||||
|
||||
Retrieves the current 64-bits value for a PCD token number.
|
||||
Retrieves the current 64-bits value for a PCD token number.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The UINT64 value.
|
||||
|
||||
|
||||
**/
|
||||
UINT64
|
||||
EFIAPI
|
||||
@@ -204,15 +204,15 @@ DxePcdGet64 (
|
||||
/**
|
||||
Retrieves a pointer to a value for a given PCD token.
|
||||
|
||||
Retrieves the current pointer to the buffer 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,
|
||||
Retrieves the current pointer to the buffer 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] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The pointer to the buffer to be retrieved.
|
||||
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
@@ -223,15 +223,15 @@ DxePcdGetPtr (
|
||||
/**
|
||||
Retrieves a Boolean value for a given PCD token.
|
||||
|
||||
Retrieves the current boolean 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,
|
||||
Retrieves the current boolean 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] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The Boolean value.
|
||||
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
@@ -242,13 +242,13 @@ DxePcdGetBool (
|
||||
/**
|
||||
Retrieves the size of the value for a given PCD token.
|
||||
|
||||
Retrieves the current size of a particular PCD token.
|
||||
Retrieves the current size of a particular PCD token.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The size of the value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
@@ -259,16 +259,16 @@ DxePcdGetSize (
|
||||
/**
|
||||
Retrieves an 8-bit value for a given PCD token.
|
||||
|
||||
Retrieves the 8-bit value of a particular PCD token.
|
||||
Retrieves the 8-bit value of a particular PCD token.
|
||||
If the TokenNumber is invalid or the token space
|
||||
specified by Guid does not exist, the results are
|
||||
specified by Guid does not exist, the results are
|
||||
unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The size 8-bit value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINT8
|
||||
EFIAPI
|
||||
@@ -280,16 +280,16 @@ DxePcdGet8Ex (
|
||||
/**
|
||||
Retrieves an 16-bit value for a given PCD token.
|
||||
|
||||
Retrieves the 16-bit value of a particular PCD token.
|
||||
Retrieves the 16-bit value of a particular PCD token.
|
||||
If the TokenNumber is invalid or the token space
|
||||
specified by Guid does not exist, the results are
|
||||
specified by Guid does not exist, the results are
|
||||
unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The size 16-bit value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINT16
|
||||
EFIAPI
|
||||
@@ -301,16 +301,16 @@ DxePcdGet16Ex (
|
||||
/**
|
||||
Retrieves an 32-bit value for a given PCD token.
|
||||
|
||||
Retrieves the 32-bit value of a particular PCD token.
|
||||
Retrieves the 32-bit value of a particular PCD token.
|
||||
If the TokenNumber is invalid or the token space
|
||||
specified by Guid does not exist, the results are
|
||||
specified by Guid does not exist, the results are
|
||||
unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The size 32-bit value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
@@ -322,16 +322,16 @@ DxePcdGet32Ex (
|
||||
/**
|
||||
Retrieves an 64-bit value for a given PCD token.
|
||||
|
||||
Retrieves the 64-bit value of a particular PCD token.
|
||||
Retrieves the 64-bit value of a particular PCD token.
|
||||
If the TokenNumber is invalid or the token space
|
||||
specified by Guid does not exist, the results are
|
||||
specified by Guid does not exist, the results are
|
||||
unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The size 64-bit value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINT64
|
||||
EFIAPI
|
||||
@@ -343,16 +343,16 @@ DxePcdGet64Ex (
|
||||
/**
|
||||
Retrieves a pointer to a value for a given PCD token.
|
||||
|
||||
Retrieves the current pointer to the buffer 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,
|
||||
Retrieves the current pointer to the buffer 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 token space for the token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The pointer to the buffer to be retrieved.
|
||||
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
@@ -364,16 +364,16 @@ DxePcdGetPtrEx (
|
||||
/**
|
||||
Retrieves an Boolean value for a given PCD token.
|
||||
|
||||
Retrieves the Boolean value of a particular PCD token.
|
||||
Retrieves the Boolean value of a particular PCD token.
|
||||
If the TokenNumber is invalid or the token space
|
||||
specified by Guid does not exist, the results are
|
||||
specified by Guid does not exist, the results are
|
||||
unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The size Boolean value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
@@ -385,14 +385,14 @@ DxePcdGetBoolEx (
|
||||
/**
|
||||
Retrieves the size of the value for a given PCD token.
|
||||
|
||||
Retrieves the current size of a particular PCD token.
|
||||
Retrieves the current size of a particular PCD token.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The size of the value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
@@ -404,19 +404,19 @@ DxePcdGetSizeEx (
|
||||
/**
|
||||
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.
|
||||
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] 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 Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -428,19 +428,19 @@ DxePcdSet8 (
|
||||
/**
|
||||
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.
|
||||
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] 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 Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -452,19 +452,19 @@ DxePcdSet16 (
|
||||
/**
|
||||
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.
|
||||
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] 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 Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -476,19 +476,19 @@ DxePcdSet32 (
|
||||
/**
|
||||
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.
|
||||
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] 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 Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -501,23 +501,23 @@ DxePcdSet64 (
|
||||
/**
|
||||
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.
|
||||
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] TokenNumber The PCD token number.
|
||||
@param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
|
||||
On input, if the SizeOfValue is greater than the maximum size supported
|
||||
for this TokenNumber then the output value of SizeOfValue will reflect
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
|
||||
On input, if the SizeOfValue is greater than the maximum size supported
|
||||
for this TokenNumber then the output value of SizeOfValue will reflect
|
||||
the maximum size supported for this TokenNumber.
|
||||
@param[in] Buffer The buffer to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -530,19 +530,19 @@ DxePcdSetPtr (
|
||||
/**
|
||||
Sets an 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.
|
||||
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] 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 Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -555,20 +555,20 @@ DxePcdSetBool (
|
||||
/**
|
||||
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.
|
||||
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] TokenNumber The PCD token number.
|
||||
@param[in] Value The value to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -581,20 +581,20 @@ DxePcdSet8Ex (
|
||||
/**
|
||||
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.
|
||||
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] TokenNumber The PCD token number.
|
||||
@param[in] Value The value to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -607,20 +607,20 @@ DxePcdSet16Ex (
|
||||
/**
|
||||
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.
|
||||
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] TokenNumber The PCD token number.
|
||||
@param[in] Value The value to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -633,20 +633,20 @@ DxePcdSet32Ex (
|
||||
/**
|
||||
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.
|
||||
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] TokenNumber The PCD token number.
|
||||
@param[in] Value The value to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -659,24 +659,24 @@ DxePcdSet64Ex (
|
||||
/**
|
||||
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.
|
||||
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, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
|
||||
On input, if the SizeOfValue is greater than the maximum size supported
|
||||
for this TokenNumber then the output value of SizeOfValue will reflect
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
|
||||
On input, if the SizeOfValue is greater than the maximum size supported
|
||||
for this TokenNumber then the output value of SizeOfValue will reflect
|
||||
the maximum size supported for this TokenNumber.
|
||||
@param[in] Buffer The buffer to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -690,20 +690,20 @@ DxePcdSetPtrEx (
|
||||
/**
|
||||
Sets an 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.
|
||||
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] TokenNumber The PCD token number.
|
||||
@param[in] Value The value to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -717,10 +717,10 @@ DxePcdSetBoolEx (
|
||||
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] TokenNumber The PCD token number.
|
||||
@param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@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
|
||||
@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.
|
||||
|
||||
@@ -737,10 +737,10 @@ DxeRegisterCallBackOnSet (
|
||||
Cancels a previously set callback function for a particular PCD token number.
|
||||
|
||||
@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] CallBackFunction The function prototype called when the value associated with the CallBackToken is set.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@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
|
||||
@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.
|
||||
|
||||
@@ -754,29 +754,29 @@ DxeUnRegisterCallBackOnSet (
|
||||
);
|
||||
|
||||
/**
|
||||
Retrieves 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.
|
||||
|
||||
If TokenNumber is 0 and Guid is not NULL, then the first token from the token space specified by Guid is returned.
|
||||
If TokenNumber is not 0 and Guid is not NULL, then the next token in the token space specified by Guid is returned.
|
||||
If TokenNumber is 0 and Guid is NULL, then the first token in the default token space is returned.
|
||||
If TokenNumber is not 0 and Guid is NULL, then the next token in the default token space is returned.
|
||||
The token numbers in the default token space may not be related to token numbers in token spaces that are named by Guid.
|
||||
If the next token number can be retrieved, then it is returned in TokenNumber, and EFI_SUCCESS is returned.
|
||||
If TokenNumber represents the last token number in the token space specified by Guid, then EFI_NOT_FOUND is returned.
|
||||
Retrieves 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.
|
||||
|
||||
If TokenNumber is 0 and Guid is not NULL, then the first token from the token space specified by Guid is returned.
|
||||
If TokenNumber is not 0 and Guid is not NULL, then the next token in the token space specified by Guid is returned.
|
||||
If TokenNumber is 0 and Guid is NULL, then the first token in the default token space is returned.
|
||||
If TokenNumber is not 0 and Guid is NULL, then the next token in the default token space is returned.
|
||||
The token numbers in the default token space may not be related to token numbers in token spaces that are named by Guid.
|
||||
If the next token number can be retrieved, then it is returned in TokenNumber, and EFI_SUCCESS is returned.
|
||||
If TokenNumber represents the last token number in the token space specified by Guid, then EFI_NOT_FOUND is returned.
|
||||
If TokenNumber is not present in the token space specified by Guid, then EFI_NOT_FOUND is returned.
|
||||
|
||||
|
||||
@param[in] Guid The 128-bit unique value that designates the namespace from which to retrieve the next token.
|
||||
This is an optional parameter that may be NULL. If this parameter is NULL, then a request is
|
||||
@param[in] Guid The 128-bit unique value that designates the namespace from which to retrieve the next token.
|
||||
This is an optional parameter that may be NULL. If this parameter is NULL, then a request is
|
||||
being made to retrieve tokens from the default token space.
|
||||
@param[in, out] TokenNumber
|
||||
A pointer to the PCD token number to use to find the subsequent token number.
|
||||
@param[in, out] TokenNumber
|
||||
A pointer to the PCD token number to use to find the subsequent token number.
|
||||
|
||||
@retval EFI_SUCCESS The PCD service retrieved the next valid token number. Or the input token number
|
||||
is already the last valid token number in the PCD database.
|
||||
@retval EFI_SUCCESS The PCD service retrieved the next valid token number. Or the input token number
|
||||
is already the last valid token number in the PCD database.
|
||||
In the later case, *TokenNumber is updated with the value of 0.
|
||||
@retval EFI_NOT_FOUND If this input token number and token namespace does not exist on the platform.
|
||||
|
||||
@@ -790,8 +790,8 @@ DxePcdGetNextToken (
|
||||
|
||||
/**
|
||||
Get next token space in PCD database according to given token space guid.
|
||||
|
||||
@param Guid Given token space guid. If NULL, then Guid will be set to
|
||||
|
||||
@param Guid Given token space guid. If NULL, then Guid will be set to
|
||||
the first PCD token space in PCD database, If not NULL, then
|
||||
Guid will be set to next PCD token space.
|
||||
|
||||
@@ -825,7 +825,7 @@ typedef struct {
|
||||
@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[out] PcdInfo The returned information associated with the requested TokenNumber.
|
||||
The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
|
||||
The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
|
||||
|
||||
@retval EFI_SUCCESS The PCD information was returned successfully
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
@@ -865,10 +865,10 @@ SetValueWorker (
|
||||
|
||||
@retval EFI_INVALID_PARAMETER If this PCD type is VPD, VPD PCD can not be set.
|
||||
@retval EFI_INVALID_PARAMETER If Size can not be set to size table.
|
||||
@retval EFI_INVALID_PARAMETER If Size of non-Ptr type PCD does not match the size information in PCD database.
|
||||
@retval EFI_INVALID_PARAMETER If Size of non-Ptr type PCD does not match the size information in PCD database.
|
||||
@retval EFI_NOT_FOUND If value type of PCD entry is intergrate, but not in
|
||||
range of UINT8, UINT16, UINT32, UINT64
|
||||
@retval EFI_NOT_FOUND Can not find the PCD type according to token number.
|
||||
@retval EFI_NOT_FOUND Can not find the PCD type according to token number.
|
||||
**/
|
||||
EFI_STATUS
|
||||
SetWorker (
|
||||
@@ -899,12 +899,12 @@ ExSetValueWorker (
|
||||
|
||||
/**
|
||||
Set value for a dynamic PCD entry.
|
||||
|
||||
This routine find the local token number according to dynamic-ex PCD's token
|
||||
|
||||
This routine find the local token number according to dynamic-ex PCD's token
|
||||
space guid and token number firstly, and invoke callback function if this PCD
|
||||
entry registered callback function. Finally, invoken general SetWorker to set
|
||||
PCD value.
|
||||
|
||||
|
||||
@param ExTokenNumber Dynamic-ex PCD token number.
|
||||
@param Guid Token space guid for dynamic-ex PCD.
|
||||
@param Data PCD value want to be set
|
||||
@@ -926,10 +926,10 @@ ExSetWorker (
|
||||
|
||||
/**
|
||||
Get the PCD entry pointer in PCD database.
|
||||
|
||||
|
||||
This routine will visit PCD database to find the PCD entry according to given
|
||||
token number. The given token number is autogened by build tools and it will be
|
||||
translated to local token number. Local token number contains PCD's type and
|
||||
token number. The given token number is autogened by build tools and it will be
|
||||
translated to local token number. Local token number contains PCD's type and
|
||||
offset of PCD entry in PCD database.
|
||||
|
||||
@param TokenNumber Token's number, it is autogened by build tools
|
||||
@@ -966,7 +966,7 @@ ExGetWorker (
|
||||
|
||||
@param VariableGuid Variable's guid
|
||||
@param VariableName Variable's unicode name string
|
||||
@param VariableData Variable's data pointer,
|
||||
@param VariableData Variable's data pointer,
|
||||
@param VariableSize Variable's size.
|
||||
|
||||
@return the status of gRT->GetVariable
|
||||
@@ -982,9 +982,9 @@ GetHiiVariable (
|
||||
/**
|
||||
Set value for HII-type PCD.
|
||||
|
||||
A HII-type PCD's value is stored in a variable. Setting/Getting the value of
|
||||
A HII-type PCD's value is stored in a variable. Setting/Getting the value of
|
||||
HII-type PCD is to visit this variable.
|
||||
|
||||
|
||||
@param VariableGuid Guid of variable which stored value of a HII-type PCD.
|
||||
@param VariableName Unicode name of variable which stored value of a HII-type PCD.
|
||||
@param SetAttributes Attributes bitmask to set for the variable.
|
||||
@@ -1010,9 +1010,9 @@ SetHiiVariable (
|
||||
|
||||
This routine will register a callback function to a PCD entry by given token number
|
||||
and token space guid.
|
||||
|
||||
|
||||
@param TokenNumber PCD token's number, it is autogened by build tools.
|
||||
@param Guid PCD token space's guid,
|
||||
@param Guid PCD token space's guid,
|
||||
if not NULL, this PCD is dynamicEx type PCD.
|
||||
@param CallBackFunction Callback function pointer
|
||||
|
||||
@@ -1049,7 +1049,7 @@ DxeUnRegisterCallBackWorker (
|
||||
|
||||
/**
|
||||
Initialize the PCD database in DXE phase.
|
||||
|
||||
|
||||
PCD database in DXE phase also contains PCD database in PEI phase which is copied
|
||||
from GUID Hob.
|
||||
|
||||
@@ -1065,7 +1065,7 @@ BuildPcdDxeDataBase (
|
||||
A dynamic-ex type PCD, developer must provide pair of token space guid: token number
|
||||
in DEC file. PCD database maintain a mapping table that translate pair of {token
|
||||
space guid: token number} to Token Number.
|
||||
|
||||
|
||||
@param Guid Token space guid for dynamic-ex PCD entry.
|
||||
@param ExTokenNumber Dynamic-ex PCD token number.
|
||||
|
||||
@@ -1080,16 +1080,16 @@ GetExPcdTokenNumber (
|
||||
|
||||
/**
|
||||
Get next token number in given token space.
|
||||
|
||||
|
||||
This routine is used for dynamicEx type PCD. It will firstly scan token space
|
||||
table to get token space according to given token space guid. Then scan given
|
||||
token number in found token space, if found, then return next token number in
|
||||
table to get token space according to given token space guid. Then scan given
|
||||
token number in found token space, if found, then return next token number in
|
||||
this token space.
|
||||
|
||||
@param Guid Token space guid. Next token number will be scaned in
|
||||
@param Guid Token space guid. Next token number will be scaned in
|
||||
this token space.
|
||||
@param TokenNumber Token number.
|
||||
If PCD_INVALID_TOKEN_NUMBER, return first token number in
|
||||
@param TokenNumber Token number.
|
||||
If PCD_INVALID_TOKEN_NUMBER, return first token number in
|
||||
token space table.
|
||||
If not PCD_INVALID_TOKEN_NUMBER, return next token number
|
||||
in token space table.
|
||||
@@ -1176,18 +1176,18 @@ UpdatePcdDatabase (
|
||||
|
||||
extern PCD_DATABASE mPcdDatabase;
|
||||
|
||||
extern UINT32 mPcdTotalTokenCount;
|
||||
extern UINT32 mPeiLocalTokenCount;
|
||||
extern UINT32 mDxeLocalTokenCount;
|
||||
extern UINT32 mPeiNexTokenCount;
|
||||
extern UINT32 mDxeNexTokenCount;
|
||||
extern UINT32 mPcdTotalTokenCount;
|
||||
extern UINT32 mPeiLocalTokenCount;
|
||||
extern UINT32 mDxeLocalTokenCount;
|
||||
extern UINT32 mPeiNexTokenCount;
|
||||
extern UINT32 mDxeNexTokenCount;
|
||||
extern UINT32 mPeiExMapppingTableSize;
|
||||
extern UINT32 mDxeExMapppingTableSize;
|
||||
extern UINT32 mPeiGuidTableSize;
|
||||
extern UINT32 mDxeGuidTableSize;
|
||||
|
||||
extern BOOLEAN mPeiExMapTableEmpty;
|
||||
extern BOOLEAN mDxeExMapTableEmpty;
|
||||
extern BOOLEAN mPeiExMapTableEmpty;
|
||||
extern BOOLEAN mDxeExMapTableEmpty;
|
||||
extern BOOLEAN mPeiDatabaseEmpty;
|
||||
|
||||
extern EFI_GUID **TmpTokenSpaceBuffer;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
/** @file
|
||||
All Pcd Ppi services are implemented here.
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -23,33 +23,33 @@ PCD_PPI mPcdPpiInstance = {
|
||||
PeiPcdSetSku,
|
||||
|
||||
PeiPcdGet8,
|
||||
PeiPcdGet16,
|
||||
PeiPcdGet32,
|
||||
PeiPcdGet64,
|
||||
PeiPcdGetPtr,
|
||||
PeiPcdGetBool,
|
||||
PeiPcdGet16,
|
||||
PeiPcdGet32,
|
||||
PeiPcdGet64,
|
||||
PeiPcdGetPtr,
|
||||
PeiPcdGetBool,
|
||||
PeiPcdGetSize,
|
||||
|
||||
PeiPcdGet8Ex,
|
||||
PeiPcdGet16Ex,
|
||||
PeiPcdGet32Ex,
|
||||
PeiPcdGet64Ex,
|
||||
PeiPcdGetPtrEx,
|
||||
PeiPcdGetBoolEx,
|
||||
PeiPcdGet16Ex,
|
||||
PeiPcdGet32Ex,
|
||||
PeiPcdGet64Ex,
|
||||
PeiPcdGetPtrEx,
|
||||
PeiPcdGetBoolEx,
|
||||
PeiPcdGetSizeEx,
|
||||
|
||||
|
||||
PeiPcdSet8,
|
||||
PeiPcdSet16,
|
||||
PeiPcdSet32,
|
||||
PeiPcdSet64,
|
||||
PeiPcdSetPtr,
|
||||
PeiPcdSetBool,
|
||||
PeiPcdSet16,
|
||||
PeiPcdSet32,
|
||||
PeiPcdSet64,
|
||||
PeiPcdSetPtr,
|
||||
PeiPcdSetBool,
|
||||
|
||||
PeiPcdSet8Ex,
|
||||
PeiPcdSet16Ex,
|
||||
PeiPcdSet32Ex,
|
||||
PeiPcdSet64Ex,
|
||||
PeiPcdSetPtrEx,
|
||||
PeiPcdSet16Ex,
|
||||
PeiPcdSet32Ex,
|
||||
PeiPcdSet64Ex,
|
||||
PeiPcdSetPtrEx,
|
||||
PeiPcdSetBoolEx,
|
||||
|
||||
PeiRegisterCallBackOnSet,
|
||||
@@ -64,7 +64,7 @@ PCD_PPI mPcdPpiInstance = {
|
||||
///
|
||||
EFI_PEI_PCD_PPI mEfiPcdPpiInstance = {
|
||||
PeiPcdSetSku,
|
||||
|
||||
|
||||
PeiPcdGet8Ex,
|
||||
PeiPcdGet16Ex,
|
||||
PeiPcdGet32Ex,
|
||||
@@ -327,7 +327,7 @@ EFI_PEI_NOTIFY_DESCRIPTOR mEndOfPeiSignalPpiNotifyList[] = {
|
||||
|
||||
/**
|
||||
Main entry for PCD PEIM driver.
|
||||
|
||||
|
||||
This routine initialize the PCD database for PEI phase and install PCD_PPI/EFI_PEI_PCD_PPI.
|
||||
|
||||
@param FileHandle Handle of the file being invoked.
|
||||
@@ -439,21 +439,21 @@ PeiGetPcdInfoGetSku (
|
||||
/**
|
||||
Sets the SKU value for subsequent calls to set or get PCD token values.
|
||||
|
||||
SetSku() sets the SKU Id to be used for subsequent calls to set or get PCD values.
|
||||
SetSku() sets the SKU Id to be used for subsequent calls to set or get PCD values.
|
||||
SetSku() is normally called only once by the system.
|
||||
|
||||
For each item (token), the database can hold a single value that applies to all SKUs,
|
||||
or multiple values, where each value is associated with a specific SKU Id. Items with multiple,
|
||||
SKU-specific values are called SKU enabled.
|
||||
|
||||
For each item (token), the database can hold a single value that applies to all SKUs,
|
||||
or multiple values, where each value is associated with a specific SKU Id. Items with multiple,
|
||||
SKU-specific values are called SKU enabled.
|
||||
|
||||
The SKU Id of zero is reserved as a default.
|
||||
For tokens that are not SKU enabled, the system ignores any set SKU Id and works with the
|
||||
single value for that token. For SKU-enabled tokens, the system will use the SKU Id set by the
|
||||
last call to SetSku(). If no 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
|
||||
For tokens that are not SKU enabled, the system ignores any set SKU Id and works with the
|
||||
single value for that token. For SKU-enabled tokens, the system will use the SKU Id set by the
|
||||
last call to SetSku(). If no 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 that will be used when the PCD service will retrieve and
|
||||
@param[in] SkuId The SKU value that will be used when the PCD service will retrieve and
|
||||
set values associated with a PCD token.
|
||||
|
||||
**/
|
||||
@@ -582,13 +582,13 @@ PeiPcdSetSku (
|
||||
/**
|
||||
Retrieves an 8-bit value for a given PCD token.
|
||||
|
||||
Retrieves the current byte-sized value for a PCD token number.
|
||||
Retrieves the current byte-sized value for a PCD token number.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The UINT8 value.
|
||||
|
||||
|
||||
**/
|
||||
UINT8
|
||||
EFIAPI
|
||||
@@ -602,13 +602,13 @@ PeiPcdGet8 (
|
||||
/**
|
||||
Retrieves an 16-bit value for a given PCD token.
|
||||
|
||||
Retrieves the current 16-bits value for a PCD token number.
|
||||
Retrieves the current 16-bits value for a PCD token number.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The UINT16 value.
|
||||
|
||||
|
||||
**/
|
||||
UINT16
|
||||
EFIAPI
|
||||
@@ -622,13 +622,13 @@ PeiPcdGet16 (
|
||||
/**
|
||||
Retrieves an 32-bit value for a given PCD token.
|
||||
|
||||
Retrieves the current 32-bits value for a PCD token number.
|
||||
Retrieves the current 32-bits value for a PCD token number.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The UINT32 value.
|
||||
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
@@ -642,13 +642,13 @@ PeiPcdGet32 (
|
||||
/**
|
||||
Retrieves an 64-bit value for a given PCD token.
|
||||
|
||||
Retrieves the current 64-bits value for a PCD token number.
|
||||
Retrieves the current 64-bits value for a PCD token number.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The UINT64 value.
|
||||
|
||||
|
||||
**/
|
||||
UINT64
|
||||
EFIAPI
|
||||
@@ -662,15 +662,15 @@ PeiPcdGet64 (
|
||||
/**
|
||||
Retrieves a pointer to a value for a given PCD token.
|
||||
|
||||
Retrieves the current pointer to the buffer 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,
|
||||
Retrieves the current pointer to the buffer 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] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The pointer to the buffer to be retrieved.
|
||||
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
@@ -684,15 +684,15 @@ PeiPcdGetPtr (
|
||||
/**
|
||||
Retrieves a Boolean value for a given PCD token.
|
||||
|
||||
Retrieves the current boolean 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,
|
||||
Retrieves the current boolean 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] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The Boolean value.
|
||||
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
@@ -706,13 +706,13 @@ PeiPcdGetBool (
|
||||
/**
|
||||
Retrieves the size of the value for a given PCD token.
|
||||
|
||||
Retrieves the current size of a particular PCD token.
|
||||
Retrieves the current size of a particular PCD token.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The size of the value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
@@ -735,7 +735,7 @@ PeiPcdGetSize (
|
||||
TokenNumber--;
|
||||
|
||||
// EBC compiler is very choosy. It may report warning about comparison
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// comparison.
|
||||
ASSERT (TokenNumber + 1 < (LocalTokenCount + 1));
|
||||
|
||||
@@ -755,16 +755,16 @@ PeiPcdGetSize (
|
||||
/**
|
||||
Retrieves an 8-bit value for a given PCD token.
|
||||
|
||||
Retrieves the 8-bit value of a particular PCD token.
|
||||
Retrieves the 8-bit value of a particular PCD token.
|
||||
If the TokenNumber is invalid or the token space
|
||||
specified by Guid does not exist, the results are
|
||||
specified by Guid does not exist, the results are
|
||||
unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
|
||||
@return The size 8-bit value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINT8
|
||||
EFIAPI
|
||||
@@ -779,16 +779,16 @@ PeiPcdGet8Ex (
|
||||
/**
|
||||
Retrieves an 16-bit value for a given PCD token.
|
||||
|
||||
Retrieves the 16-bit value of a particular PCD token.
|
||||
Retrieves the 16-bit value of a particular PCD token.
|
||||
If the TokenNumber is invalid or the token space
|
||||
specified by Guid does not exist, the results are
|
||||
specified by Guid does not exist, the results are
|
||||
unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
|
||||
@return The size 16-bit value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINT16
|
||||
EFIAPI
|
||||
@@ -803,16 +803,16 @@ PeiPcdGet16Ex (
|
||||
/**
|
||||
Retrieves an 32-bit value for a given PCD token.
|
||||
|
||||
Retrieves the 32-bit value of a particular PCD token.
|
||||
Retrieves the 32-bit value of a particular PCD token.
|
||||
If the TokenNumber is invalid or the token space
|
||||
specified by Guid does not exist, the results are
|
||||
specified by Guid does not exist, the results are
|
||||
unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
|
||||
@return The size 32-bit value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
@@ -827,16 +827,16 @@ PeiPcdGet32Ex (
|
||||
/**
|
||||
Retrieves an 64-bit value for a given PCD token.
|
||||
|
||||
Retrieves the 64-bit value of a particular PCD token.
|
||||
Retrieves the 64-bit value of a particular PCD token.
|
||||
If the TokenNumber is invalid or the token space
|
||||
specified by Guid does not exist, the results are
|
||||
specified by Guid does not exist, the results are
|
||||
unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
|
||||
@return The size 64-bit value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINT64
|
||||
EFIAPI
|
||||
@@ -851,16 +851,16 @@ PeiPcdGet64Ex (
|
||||
/**
|
||||
Retrieves a pointer to a value for a given PCD token.
|
||||
|
||||
Retrieves the current pointer to the buffer 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,
|
||||
Retrieves the current pointer to the buffer 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 token space for the token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
|
||||
@return The pointer to the buffer to be retrieved.
|
||||
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
@@ -875,16 +875,16 @@ PeiPcdGetPtrEx (
|
||||
/**
|
||||
Retrieves an Boolean value for a given PCD token.
|
||||
|
||||
Retrieves the Boolean value of a particular PCD token.
|
||||
Retrieves the Boolean value of a particular PCD token.
|
||||
If the TokenNumber is invalid or the token space
|
||||
specified by Guid does not exist, the results are
|
||||
specified by Guid does not exist, the results are
|
||||
unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
|
||||
@return The size Boolean value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
@@ -899,14 +899,14 @@ PeiPcdGetBoolEx (
|
||||
/**
|
||||
Retrieves the size of the value for a given PCD token.
|
||||
|
||||
Retrieves the current size of a particular PCD token.
|
||||
Retrieves the current size of a particular PCD token.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
|
||||
@return The size of the value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
@@ -921,19 +921,19 @@ PeiPcdGetSizeEx (
|
||||
/**
|
||||
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.
|
||||
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] 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 Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -948,19 +948,19 @@ PeiPcdSet8 (
|
||||
/**
|
||||
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.
|
||||
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] 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 Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -975,19 +975,19 @@ PeiPcdSet16 (
|
||||
/**
|
||||
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.
|
||||
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] 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 Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -1002,19 +1002,19 @@ PeiPcdSet32 (
|
||||
/**
|
||||
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.
|
||||
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] 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 Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -1029,23 +1029,23 @@ PeiPcdSet64 (
|
||||
/**
|
||||
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.
|
||||
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] TokenNumber The PCD token number.
|
||||
@param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
|
||||
On input, if the SizeOfValue is greater than the maximum size supported
|
||||
for this TokenNumber then the output value of SizeOfValue will reflect
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
|
||||
On input, if the SizeOfValue is greater than the maximum size supported
|
||||
for this TokenNumber then the output value of SizeOfValue will reflect
|
||||
the maximum size supported for this TokenNumber.
|
||||
@param[in] Buffer The buffer to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -1061,19 +1061,19 @@ PeiPcdSetPtr (
|
||||
/**
|
||||
Sets an 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.
|
||||
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] 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 Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -1088,20 +1088,20 @@ PeiPcdSetBool (
|
||||
/**
|
||||
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.
|
||||
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] ExTokenNumber The PCD token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] Value The value to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -1117,20 +1117,20 @@ PeiPcdSet8Ex (
|
||||
/**
|
||||
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.
|
||||
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] ExTokenNumber The PCD token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] Value The value to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -1146,20 +1146,20 @@ PeiPcdSet16Ex (
|
||||
/**
|
||||
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.
|
||||
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] ExTokenNumber The PCD token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] Value The value to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -1175,20 +1175,20 @@ PeiPcdSet32Ex (
|
||||
/**
|
||||
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.
|
||||
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] ExTokenNumber The PCD token number.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] Value The value to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -1204,24 +1204,24 @@ PeiPcdSet64Ex (
|
||||
/**
|
||||
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.
|
||||
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] ExTokenNumber The PCD token number.
|
||||
@param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
|
||||
On input, if the SizeOfValue is greater than the maximum size supported
|
||||
for this TokenNumber then the output value of SizeOfValue will reflect
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
|
||||
On input, if the SizeOfValue is greater than the maximum size supported
|
||||
for this TokenNumber then the output value of SizeOfValue will reflect
|
||||
the maximum size supported for this TokenNumber.
|
||||
@param[in] Value The buffer to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -1238,20 +1238,20 @@ PeiPcdSetPtrEx (
|
||||
/**
|
||||
Sets an 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.
|
||||
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] ExTokenNumber The PCD token number.
|
||||
@param [in] ExTokenNumber The PCD token number.
|
||||
@param [in] Value The value to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -1268,10 +1268,10 @@ PeiPcdSetBoolEx (
|
||||
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] ExTokenNumber The PCD token number.
|
||||
@param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@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
|
||||
@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.
|
||||
|
||||
@@ -1299,10 +1299,10 @@ PeiRegisterCallBackOnSet (
|
||||
Cancels a previously set callback function for a particular PCD token number.
|
||||
|
||||
@param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set.
|
||||
@param[in] ExTokenNumber The PCD token number.
|
||||
@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
|
||||
@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.
|
||||
|
||||
@@ -1327,26 +1327,26 @@ PcdUnRegisterCallBackOnSet (
|
||||
}
|
||||
|
||||
/**
|
||||
Retrieves 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.
|
||||
|
||||
If TokenNumber is 0 and Guid is not NULL, then the first token from the token space specified by Guid is returned.
|
||||
If TokenNumber is not 0 and Guid is not NULL, then the next token in the token space specified by Guid is returned.
|
||||
If TokenNumber is 0 and Guid is NULL, then the first token in the default token space is returned.
|
||||
If TokenNumber is not 0 and Guid is NULL, then the next token in the default token space is returned.
|
||||
The token numbers in the default token space may not be related to token numbers in token spaces that are named by Guid.
|
||||
If the next token number can be retrieved, then it is returned in TokenNumber, and EFI_SUCCESS is returned.
|
||||
If TokenNumber represents the last token number in the token space specified by Guid, then EFI_NOT_FOUND is returned.
|
||||
Retrieves 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.
|
||||
|
||||
If TokenNumber is 0 and Guid is not NULL, then the first token from the token space specified by Guid is returned.
|
||||
If TokenNumber is not 0 and Guid is not NULL, then the next token in the token space specified by Guid is returned.
|
||||
If TokenNumber is 0 and Guid is NULL, then the first token in the default token space is returned.
|
||||
If TokenNumber is not 0 and Guid is NULL, then the next token in the default token space is returned.
|
||||
The token numbers in the default token space may not be related to token numbers in token spaces that are named by Guid.
|
||||
If the next token number can be retrieved, then it is returned in TokenNumber, and EFI_SUCCESS is returned.
|
||||
If TokenNumber represents the last token number in the token space specified by Guid, then EFI_NOT_FOUND is returned.
|
||||
If TokenNumber is not present in the token space specified by Guid, then EFI_NOT_FOUND is returned.
|
||||
|
||||
|
||||
@param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
|
||||
This is an optional parameter that may be NULL. If this parameter is NULL, then a request
|
||||
@param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
|
||||
This is an optional parameter that may be NULL. If this parameter is NULL, then a request
|
||||
is being made to retrieve tokens from the default token space.
|
||||
@param[in, out] TokenNumber A pointer to the PCD token number to use to find the subsequent token number.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The PCD service has retrieved the next valid token number.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find data from the requested token number.
|
||||
|
||||
@@ -1366,7 +1366,7 @@ PeiPcdGetNextToken (
|
||||
UINTN Index;
|
||||
BOOLEAN Found;
|
||||
BOOLEAN PeiExMapTableEmpty;
|
||||
UINTN PeiNexTokenNumber;
|
||||
UINTN PeiNexTokenNumber;
|
||||
|
||||
if (!FeaturePcdGet (PcdPeiFullPcdDatabaseEnable)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
@@ -1466,7 +1466,7 @@ PeiPcdGetNextToken (
|
||||
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.
|
||||
|
||||
@@ -1500,14 +1500,14 @@ PeiPcdGetNextTokenSpace (
|
||||
} else {
|
||||
PeiExMapTableEmpty = FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (PeiExMapTableEmpty) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
ExMapTable = (DYNAMICEX_MAPPING *)((UINT8 *)PeiPcdDb + PeiPcdDb->ExMapTableOffset);
|
||||
GuidTable = (EFI_GUID *)((UINT8 *)PeiPcdDb + PeiPcdDb->GuidTableOffset);
|
||||
|
||||
|
||||
if (*Guid == NULL) {
|
||||
//
|
||||
// return the first Token Space Guid.
|
||||
@@ -1521,7 +1521,7 @@ PeiPcdGetNextTokenSpace (
|
||||
if (MatchGuid == NULL) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
GuidTableIdx = MatchGuid - GuidTable;
|
||||
|
||||
Found = FALSE;
|
||||
@@ -1561,7 +1561,7 @@ PeiPcdGetNextTokenSpace (
|
||||
|
||||
/**
|
||||
Get PCD value's size for POINTER type PCD.
|
||||
|
||||
|
||||
The POINTER type PCD's value will be stored into a buffer in specified size.
|
||||
The max size of this PCD's value is described in PCD's definition in DEC file.
|
||||
|
||||
@@ -1588,12 +1588,12 @@ GetPtrTypeSize (
|
||||
LocalTokenNumber = *((UINT32 *)((UINT8 *)Database + Database->LocalTokenNumberTableOffset) + LocalTokenNumberTableIdx);
|
||||
|
||||
ASSERT ((LocalTokenNumber & PCD_DATUM_TYPE_ALL_SET) == PCD_DATUM_TYPE_POINTER);
|
||||
|
||||
|
||||
SizeTable = (SIZE_INFO *)((UINT8 *)Database + Database->SizeTableOffset);
|
||||
|
||||
*MaxSize = SizeTable[SizeTableIdx];
|
||||
//
|
||||
// SizeTable only contain record for PCD_DATUM_TYPE_POINTER type
|
||||
// SizeTable only contain record for PCD_DATUM_TYPE_POINTER type
|
||||
// PCD entry.
|
||||
//
|
||||
if ((LocalTokenNumber & PCD_TYPE_VPD) != 0) {
|
||||
@@ -1616,7 +1616,7 @@ GetPtrTypeSize (
|
||||
|
||||
/**
|
||||
Set PCD value's size for POINTER type PCD.
|
||||
|
||||
|
||||
The POINTER type PCD's value will be stored into a buffer in specified size.
|
||||
The max size of this PCD's value is described in PCD's definition in DEC file.
|
||||
|
||||
@@ -1639,7 +1639,7 @@ SetPtrTypeSize (
|
||||
UINTN LocalTokenNumber;
|
||||
SIZE_INFO *SizeTable;
|
||||
UINTN MaxSize;
|
||||
|
||||
|
||||
SizeTableIdx = GetSizeTableIndex (LocalTokenNumberTableIdx, Database);
|
||||
|
||||
LocalTokenNumber = *((UINT32 *)((UINT8 *)Database + Database->LocalTokenNumberTableOffset) + LocalTokenNumberTableIdx);
|
||||
@@ -1650,7 +1650,7 @@ SetPtrTypeSize (
|
||||
|
||||
MaxSize = SizeTable[SizeTableIdx];
|
||||
//
|
||||
// SizeTable only contain record for PCD_DATUM_TYPE_POINTER type
|
||||
// SizeTable only contain record for PCD_DATUM_TYPE_POINTER type
|
||||
// PCD entry.
|
||||
//
|
||||
if ((LocalTokenNumber & PCD_TYPE_VPD) != 0) {
|
||||
@@ -1665,7 +1665,7 @@ SetPtrTypeSize (
|
||||
*CurrentSize = MaxSize;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// We have only two entry for Non-Sku enabled PCD entry:
|
||||
// 1) MAX SIZE
|
||||
|
@@ -1,18 +1,18 @@
|
||||
## @file
|
||||
# PCD PEIM produces PCD database to manage all dynamic PCD in PEI phase and install Pcd Ppi service.
|
||||
#
|
||||
# This version PCD PEIM depends on the external PCD database binary file, not built in PCD data base.
|
||||
# This version PCD PEIM depends on the external PCD database binary file, not built in PCD data base.
|
||||
# There are two PCD PPIs as follows:
|
||||
# 1) PCD_PPI
|
||||
# 1) PCD_PPI
|
||||
# It is EDKII implementation which support Dynamic/DynamicEx Pcds.
|
||||
# 2) EFI_PEI_PCD_PPI
|
||||
# It is defined by PI specification 1.2, Vol 3 which only support dynamicEx
|
||||
# It is defined by PI specification 1.2, Vol 3 which only support dynamicEx
|
||||
# type Pcd.
|
||||
# For dynamicEx type PCD, it is compatible between PCD_PPI and EFI_PEI_PCD_PPI.
|
||||
# PCD PEIM driver will produce above two PPIs at same time.
|
||||
#
|
||||
# PCD database is generated as the separate binary image at build time. The binary image
|
||||
# will be intergrated into Firmware volume together with PCD driver.
|
||||
# PCD database is generated as the separate binary image at build time. The binary image
|
||||
# will be intergrated into Firmware volume together with PCD driver.
|
||||
#
|
||||
# ////////////////////////////////////////////////////////////////////////////////
|
||||
# // //
|
||||
@@ -21,94 +21,94 @@
|
||||
# ////////////////////////////////////////////////////////////////////////////////
|
||||
#
|
||||
# 1, Introduction
|
||||
# PCD database hold all dynamic type PCD information. The structure of PEI PCD
|
||||
# database is generated by build tools according to dynamic PCD usage for
|
||||
# PCD database hold all dynamic type PCD information. The structure of PEI PCD
|
||||
# database is generated by build tools according to dynamic PCD usage for
|
||||
# specified platform.
|
||||
#
|
||||
#
|
||||
# 2, Dynamic Type PCD
|
||||
# Dynamic type PCD is used for the configuration/setting which value is determined
|
||||
# dynamic. In contrast, the value of static type PCD (FeatureFlag, FixedPcd,
|
||||
# PatchablePcd) is fixed in final generated FD image in build time.
|
||||
#
|
||||
# dynamic. In contrast, the value of static type PCD (FeatureFlag, FixedPcd,
|
||||
# PatchablePcd) is fixed in final generated FD image in build time.
|
||||
#
|
||||
# 2.1 The "dynamic" determination means one of below cases:
|
||||
# a) The PCD setting value is produced by someone driver and consumed by
|
||||
# a) The PCD setting value is produced by someone driver and consumed by
|
||||
# other driver in execution time.
|
||||
# b) The PCD setting value is set/get by user from FrontPage.
|
||||
# c) The PCD setting value is produced by platform OEM vendor in specified area.
|
||||
#
|
||||
#
|
||||
# 2.2 According to module distribution way, dynamic PCD could be classfied as:
|
||||
# a) Dynamic:
|
||||
# If module is released in source code and will be built with platform
|
||||
# If module is released in source code and will be built with platform
|
||||
# DSC, the dynamic PCD used by this module can be accessed as:
|
||||
# PcdGetxx(PcdSampleDynamicPcd);
|
||||
# PcdGetxx(PcdSampleDynamicPcd);
|
||||
# In building platform, build tools will translate PcdSampleDynamicPcd to
|
||||
# pair of {Token Space Guid: Token Number} for this PCD.
|
||||
# pair of {Token Space Guid: Token Number} for this PCD.
|
||||
# b) DynamicEx:
|
||||
# If module is release as binary and will not pariticpate platform building,
|
||||
# the dynamic PCD used by this module need be accessed as:
|
||||
# PcdGetxxEx(gEfiMyTokenspaceGuid, PcdSampleDynamicPcd)
|
||||
# Developer need explicity gives {Token Space Guid:Token Number} as parameter
|
||||
# in writting source code.
|
||||
#
|
||||
#
|
||||
# 2.3 According to PCD value's storage method, dynamic PCD could be classfied as:
|
||||
# a) Default Storage:
|
||||
# - The PCD value is stored in PCD database maintained by PCD driver in boot
|
||||
# a) Default Storage:
|
||||
# - The PCD value is stored in PCD database maintained by PCD driver in boot
|
||||
# time memory.
|
||||
# - This type is used for communication between PEIM/DXE driver, DXE/DXE
|
||||
# driver. But all set/get value will be losted after boot-time memory
|
||||
# - This type is used for communication between PEIM/DXE driver, DXE/DXE
|
||||
# driver. But all set/get value will be losted after boot-time memory
|
||||
# is turn off.
|
||||
# - [PcdsDynamicDefault] is used as section name for this type PCD in
|
||||
# - [PcdsDynamicDefault] is used as section name for this type PCD in
|
||||
# platform DSC file. [PcdsDynamicExDefault] is used for dynamicEx type PCD.
|
||||
#
|
||||
# b) Variable Storage:
|
||||
# - The PCD value is stored in variable area.
|
||||
#
|
||||
# b) Variable Storage:
|
||||
# - The PCD value is stored in variable area.
|
||||
# - As default storage type, this type PCD could be used for PEI/DXE driver
|
||||
# communication. But beside it, this type PCD could also be used to store
|
||||
# communication. But beside it, this type PCD could also be used to store
|
||||
# the value associate with a HII setting via variable interface.
|
||||
# - In PEI phase, the PCD value could only be got but can not be set due
|
||||
# - In PEI phase, the PCD value could only be got but can not be set due
|
||||
# to variable area is readonly.
|
||||
# - [PcdsDynamicHii] is used as section name for this type PCD in platform
|
||||
# - [PcdsDynamicHii] is used as section name for this type PCD in platform
|
||||
# DSC file. [PcdsDynamicExHii] is for dynamicEx type PCD.
|
||||
#
|
||||
#
|
||||
# c) OEM specificed storage area:
|
||||
# - The PCD value is stored in OEM specified area which base address is
|
||||
# - The PCD value is stored in OEM specified area which base address is
|
||||
# specified by a FixedAtBuild PCD setting - PcdVpdBaseAddress.
|
||||
# - The area is read only for PEI and DXE phase.
|
||||
# - [PcdsDynamicVpd] is used as section name for this type PCD in platform
|
||||
# - [PcdsDynamicVpd] is used as section name for this type PCD in platform
|
||||
# DSC file. [PcdsDynamicExVpd] is for dynamicex type PCD.
|
||||
#
|
||||
#
|
||||
# 2.4 When and how to use dynamic PCD
|
||||
# Module developer do not care the used PCD is dynamic or static when writting
|
||||
# source code/INF. Dynamic PCD and dynamic type is pointed by platform integrator
|
||||
# source code/INF. Dynamic PCD and dynamic type is pointed by platform integrator
|
||||
# in platform DSC file. Please ref section 2.3 to get matching between dynamic
|
||||
# PCD type and section name in DSC file.
|
||||
#
|
||||
#
|
||||
# 3, PCD database:
|
||||
# Although dynamic PCD could be in different storage type as above description,
|
||||
# Although dynamic PCD could be in different storage type as above description,
|
||||
# but the basic information and default value for all dynamic PCD is hold
|
||||
# by PCD database maintained by PEI/DXE driver.
|
||||
#
|
||||
#
|
||||
# As the whole EFI BIOS boot path is divided into PEI/DXE phase, the PCD database
|
||||
# also is divided into Pei/Dxe database maintaied by PcdPeim/PcdDxe driver separatly.
|
||||
# To make PcdPeim's driver image smaller, PEI PCD database only hold all dynamic
|
||||
# PCD information used in PEI phase or use in both PEI/DXE phase. And DXE PCD
|
||||
# database contains all PCDs used in PEI/DXE phase in memory.
|
||||
#
|
||||
# Build tool will generate PCD database into the separate binary file for
|
||||
# PEI/DXE PCD driver according to dynamic PCD section in platform DSC file.
|
||||
#
|
||||
#
|
||||
# Build tool will generate PCD database into the separate binary file for
|
||||
# PEI/DXE PCD driver according to dynamic PCD section in platform DSC file.
|
||||
#
|
||||
# 3.1 PcdPeim and PcdDxe
|
||||
# PEI PCD database is maintained by PcdPeim driver run from flash. PcdPeim driver
|
||||
# build guid hob in temporary memory and copy the binary data base from flash
|
||||
# to temporary memory for PEI PCD database.
|
||||
# build guid hob in temporary memory and copy the binary data base from flash
|
||||
# to temporary memory for PEI PCD database.
|
||||
# DXE PCD database is maintained by PcdDxe driver.At entry point of PcdDxe driver,
|
||||
# a new PCD database is allocated in boot-time memory which including all
|
||||
# PEI PCD and DXE PCD entry.
|
||||
#
|
||||
#
|
||||
# Pcd driver should run as early as possible before any other driver access
|
||||
# dynamic PCD's value. PEI/DXE "Apriori File" mechanism make it possible by
|
||||
# making PcdPeim/PcdDxe as first dispatching driver in PEI/DXE phase.
|
||||
#
|
||||
#
|
||||
# 3.2 Token space Guid/Token number, Platform token, Local token number
|
||||
# Dynamic PCD
|
||||
# +-----------+ +---------+
|
||||
@@ -128,42 +128,42 @@
|
||||
# | Token |
|
||||
# | Number |
|
||||
# +-----------+
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# 3.2.1 Pair of Token space guid + Token number
|
||||
# Any type PCD is identified by pair of "TokenSpaceGuid + TokeNumber". But it
|
||||
# is not easy maintained by PCD driver, and hashed token number will make
|
||||
# searching slowly.
|
||||
# is not easy maintained by PCD driver, and hashed token number will make
|
||||
# searching slowly.
|
||||
#
|
||||
# 3.2.2 Platform Token Number
|
||||
# "Platform token number" concept is introduced for mapping to a pair of
|
||||
# "TokenSpaceGuid + TokenNumber". The platform token number is generated by
|
||||
# build tool in autogen.h and all of them are continual in a platform scope
|
||||
# "Platform token number" concept is introduced for mapping to a pair of
|
||||
# "TokenSpaceGuid + TokenNumber". The platform token number is generated by
|
||||
# build tool in autogen.h and all of them are continual in a platform scope
|
||||
# started from 1.(0 meaning invalid internal token number)
|
||||
# With auto-generated "platform token number", PcdGet(PcdSampleDynamicPcd)
|
||||
# in source code is translated to LibPcdGet(_PCD_TOKEN_PcdSampleDynamicPcd)
|
||||
# in source code is translated to LibPcdGet(_PCD_TOKEN_PcdSampleDynamicPcd)
|
||||
# in autogen.h.
|
||||
# Notes: The mapping between pair of "tokenspace guid + token number" and
|
||||
# "internal token number" need build tool establish, so "platform token number"
|
||||
# mechanism is not suitable for binary module which use DynamicEx type PCD.
|
||||
# To access a dynamicEx type PCD, pair of "token space guid/token number" all need
|
||||
# to be specificed for PcdSet/PcdGet accessing macro.
|
||||
#
|
||||
# Platform Token Number is started from 1, and inceased continuous. From whole
|
||||
#
|
||||
# Platform Token Number is started from 1, and inceased continuous. From whole
|
||||
# platform scope, there are two zones: PEI Zone and DXE Zone
|
||||
# | Platform Token Number
|
||||
# ----------|----------------------------------------------------------------
|
||||
# PEI Zone: | 1 ~ PEI_LOCAL_TOKEN_NUMBER
|
||||
# DXE Zone: | (PEI_LOCAL_TOKEN_NUMBER + 1) ~ (PEI_LOCAL_TOKEN_NUMBER + DXE_LOCAL_TOKEN_NUMBER)
|
||||
#
|
||||
#
|
||||
# 3.2.3 Local Token Number
|
||||
# To fast searching a PCD entry in PCD database, PCD driver translate
|
||||
# To fast searching a PCD entry in PCD database, PCD driver translate
|
||||
# platform token number to local token number via a mapping table.
|
||||
# For binary DynamicEx type PCD, there is a another mapping table to translate
|
||||
# "token space guid + token number" to local token number directly.
|
||||
# Local token number is identifier for all internal interface in PCD PEI/DXE
|
||||
# driver.
|
||||
#
|
||||
#
|
||||
# A local token number is a 32-bit value in following meaning:
|
||||
# 32 ------------- 28 ---------- 24 -------- 0
|
||||
# | PCD type mask | Datum Type | Offset |
|
||||
@@ -183,13 +183,13 @@
|
||||
# Offset : indicate the related offset of PCD value in PCD database array.
|
||||
# Based on local token number, PCD driver could fast determine PCD type, value
|
||||
# type and get PCD entry from PCD database.
|
||||
#
|
||||
#
|
||||
# 3.3 PCD Database binary file
|
||||
# PCD Database binary file will be created at build time as the standalone binary image.
|
||||
# To understand the binary image layout, PCD Database C structure is still generated
|
||||
# PCD Database binary file will be created at build time as the standalone binary image.
|
||||
# To understand the binary image layout, PCD Database C structure is still generated
|
||||
# as comments by build tools in PCD driver's autogen.h/
|
||||
# autogen.c file. In generated C structure, following information is stored:
|
||||
# - ExMapTable: This table is used translate a binary dynamicex type PCD's
|
||||
# - ExMapTable: This table is used translate a binary dynamicex type PCD's
|
||||
# "tokenguid + token" to local token number.
|
||||
# - LocalTokenNumberTable:
|
||||
# This table stores all local token number in array, use "Internal
|
||||
@@ -199,19 +199,19 @@
|
||||
# HII type PCD's variable GUID.
|
||||
# - SkuIdTable: TBD
|
||||
# - SystemSkuId: TBD
|
||||
# - PCD value structure:
|
||||
# - PCD value structure:
|
||||
# Every PCD has a value record in PCD database. For different
|
||||
# datum type PCD has different record structure which will be
|
||||
# datum type PCD has different record structure which will be
|
||||
# introduced in 3.3.1
|
||||
#
|
||||
# In a PCD database structure, there are two major area: Init and UnInit.
|
||||
# Init area is use stored above PCD internal structure such as ExMapTable,
|
||||
# LocalTokenNumberTable etc and the (default) value of PCD which has default
|
||||
#
|
||||
# In a PCD database structure, there are two major area: Init and UnInit.
|
||||
# Init area is use stored above PCD internal structure such as ExMapTable,
|
||||
# LocalTokenNumberTable etc and the (default) value of PCD which has default
|
||||
# value specified in platform DSC file.
|
||||
# Unint area is used stored the value of PCD which has no default value in
|
||||
# platform DSC file, the value of NULL, 0 specified in platform DSC file can
|
||||
# be seemed as "no default value".
|
||||
#
|
||||
#
|
||||
# 3.3.1 Simple Sample PCD Database C Structure
|
||||
# A general sample of PCD database structue is as follows:
|
||||
# typedef struct _PCD_DATABASE {
|
||||
@@ -223,7 +223,7 @@
|
||||
# SIZE_INFO SizeTable[PEI_SIZE_TABLE_SIZE];
|
||||
# UINT8 SkuIdTable[PEI_SKUID_TABLE_SIZE];
|
||||
# SKU_ID SystemSkuId;
|
||||
#
|
||||
#
|
||||
# //===== Following is value structure for PCD with default value
|
||||
# ....
|
||||
# ....
|
||||
@@ -235,11 +235,11 @@
|
||||
# ....
|
||||
# } UnInit;
|
||||
# }
|
||||
#
|
||||
#
|
||||
# 3.3.2 PCD value structure in PCD database C structure
|
||||
# The value's structure is generated by build tool in PCD database C structure.
|
||||
# The PCDs in different datum type has different value structure.
|
||||
#
|
||||
#
|
||||
# 3.3.2.1 UINT8/UINT16/UINT32/UINT64 datum type PCD
|
||||
# The C structure for these datum type PCD is just a UINT8/UINT16/UINT32/UINT64
|
||||
# data member in PCD database, For example:
|
||||
@@ -247,36 +247,36 @@
|
||||
# Above structure is generated by build tool, the member name is "PcdCName_Guidvalue"
|
||||
# Member type is UINT16 according to PcdHardwareErrorRecordLevel declaration
|
||||
# in DEC file.
|
||||
#
|
||||
#
|
||||
# 3.3.2.2 VOID* datum type PCD
|
||||
# The value of VOID* datum type PCD is a UINT8/UINT16 array in PCD database.
|
||||
#
|
||||
#
|
||||
# 3.3.2.2.1 VOID* - string type
|
||||
# If the default value for VOID* datum type PCD like L"xxx", the PCD is
|
||||
# used for unicode string, and C structure of this datum type PCD is
|
||||
# If the default value for VOID* datum type PCD like L"xxx", the PCD is
|
||||
# used for unicode string, and C structure of this datum type PCD is
|
||||
# UINT16 string array in PCD database, for example:
|
||||
# UINT16 StringTable[29];
|
||||
# The number of 29 in above sample is max size of a unicode string.
|
||||
#
|
||||
#
|
||||
# If the default value for VOID* datum type PCD like "xxx", the PCD is
|
||||
# used for ascii string, and C structure of this datum type PCD is
|
||||
# used for ascii string, and C structure of this datum type PCD is
|
||||
# UINT8 string array in PCD database, for example:
|
||||
# UINT8 StringTable[20];
|
||||
# The number of 20 in above sample is max size of a ascii string.
|
||||
#
|
||||
#
|
||||
# 3.3.2.2.2 VOID* - byte array
|
||||
# If the default value of VOID* datum type PCD like {'0x29', '0x01', '0xf2'}
|
||||
# the PCD is used for byte array. The generated structrue is same as
|
||||
# the PCD is used for byte array. The generated structrue is same as
|
||||
# above ascii string table,
|
||||
# UINT8 StringTable[13];
|
||||
# The number of 13 in above sample is max size of byte array.
|
||||
#
|
||||
#
|
||||
# 3.3.3 Some utility structures in PCD Database
|
||||
# 3.3.3.1 GuidTable
|
||||
# GuidTable array is used to store all related GUID value in PCD database:
|
||||
# - Variable GUID for HII type PCD
|
||||
# - Token space GUID for dynamicex type PCD
|
||||
#
|
||||
# - Token space GUID for dynamicex type PCD
|
||||
#
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
@@ -327,7 +327,7 @@
|
||||
[Guids]
|
||||
## PRODUCES ## HOB
|
||||
## SOMETIMES_CONSUMES ## HOB
|
||||
gPcdDataBaseHobGuid
|
||||
gPcdDataBaseHobGuid
|
||||
gPcdDataBaseSignatureGuid ## CONSUMES ## GUID # PCD database signature GUID.
|
||||
gEfiMdeModulePkgTokenSpaceGuid ## SOMETIMES_CONSUMES ## GUID
|
||||
|
||||
|
@@ -10,32 +10,32 @@
|
||||
// type Pcd.
|
||||
// For dynamicEx type PCD, it is compatible between PCD_PPI and EFI_PEI_PCD_PPI.
|
||||
// PCD PEIM driver will produce above two PPIs at same time.
|
||||
//
|
||||
//
|
||||
// PCD database is generated as the separate binary image at build time. The binary image
|
||||
// will be intergrated into Firmware volume together with PCD driver.
|
||||
//
|
||||
//
|
||||
// ////////////////////////////////////////////////////////////////////////////////
|
||||
// // //
|
||||
// // Introduction of PCD database //
|
||||
// // //
|
||||
// ////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
// 1, Introduction
|
||||
// PCD database hold all dynamic type PCD information. The structure of PEI PCD
|
||||
// database is generated by build tools according to dynamic PCD usage for
|
||||
// specified platform.
|
||||
//
|
||||
//
|
||||
// 2, Dynamic Type PCD
|
||||
// Dynamic type PCD is used for the configuration/setting which value is determined
|
||||
// dynamic. In contrast, the value of static type PCD (FeatureFlag, FixedPcd,
|
||||
// PatchablePcd) is fixed in final generated FD image in build time.
|
||||
//
|
||||
//
|
||||
// 2.1 The "dynamic" determination means one of below cases:
|
||||
// a) The PCD setting value is produced by someone driver and consumed by
|
||||
// other driver in execution time.
|
||||
// b) The PCD setting value is set/get by user from FrontPage.
|
||||
// c) The PCD setting value is produced by platform OEM vendor in specified area.
|
||||
//
|
||||
//
|
||||
// 2.2 According to module distribution way, dynamic PCD could be classfied as:
|
||||
// a) Dynamic:
|
||||
// If module is released in source code and will be built with platform
|
||||
@@ -49,7 +49,7 @@
|
||||
// PcdGetxxEx(gEfiMyTokenspaceGuid, PcdSampleDynamicPcd)
|
||||
// Developer need explicity gives {Token Space Guid:Token Number} as parameter
|
||||
// in writting source code.
|
||||
//
|
||||
//
|
||||
// 2.3 According to PCD value's storage method, dynamic PCD could be classfied as:
|
||||
// a) Default Storage:
|
||||
// - The PCD value is stored in PCD database maintained by PCD driver in boot
|
||||
@@ -59,7 +59,7 @@
|
||||
// is turn off.
|
||||
// - [PcdsDynamicDefault] is used as section name for this type PCD in
|
||||
// platform DSC file. [PcdsDynamicExDefault] is used for dynamicEx type PCD.
|
||||
//
|
||||
//
|
||||
// b) Variable Storage:
|
||||
// - The PCD value is stored in variable area.
|
||||
// - As default storage type, this type PCD could be used for PEI/DXE driver
|
||||
@@ -69,34 +69,34 @@
|
||||
// to variable area is readonly.
|
||||
// - [PcdsDynamicHii] is used as section name for this type PCD in platform
|
||||
// DSC file. [PcdsDynamicExHii] is for dynamicEx type PCD.
|
||||
//
|
||||
//
|
||||
// c) OEM specificed storage area:
|
||||
// - The PCD value is stored in OEM specified area which base address is
|
||||
// specified by a FixedAtBuild PCD setting - PcdVpdBaseAddress.
|
||||
// - The area is read only for PEI and DXE phase.
|
||||
// - [PcdsDynamicVpd] is used as section name for this type PCD in platform
|
||||
// DSC file. [PcdsDynamicExVpd] is for dynamicex type PCD.
|
||||
//
|
||||
//
|
||||
// 2.4 When and how to use dynamic PCD
|
||||
// Module developer do not care the used PCD is dynamic or static when writting
|
||||
// source code/INF. Dynamic PCD and dynamic type is pointed by platform integrator
|
||||
// in platform DSC file. Please ref section 2.3 to get matching between dynamic
|
||||
// PCD type and section name in DSC file.
|
||||
//
|
||||
//
|
||||
// 3, PCD database:
|
||||
// Although dynamic PCD could be in different storage type as above description,
|
||||
// but the basic information and default value for all dynamic PCD is hold
|
||||
// by PCD database maintained by PEI/DXE driver.
|
||||
//
|
||||
//
|
||||
// As the whole EFI BIOS boot path is divided into PEI/DXE phase, the PCD database
|
||||
// also is divided into Pei/Dxe database maintaied by PcdPeim/PcdDxe driver separatly.
|
||||
// To make PcdPeim's driver image smaller, PEI PCD database only hold all dynamic
|
||||
// PCD information used in PEI phase or use in both PEI/DXE phase. And DXE PCD
|
||||
// database contains all PCDs used in PEI/DXE phase in memory.
|
||||
//
|
||||
//
|
||||
// Build tool will generate PCD database into the separate binary file for
|
||||
// PEI/DXE PCD driver according to dynamic PCD section in platform DSC file.
|
||||
//
|
||||
//
|
||||
// 3.1 PcdPeim and PcdDxe
|
||||
// PEI PCD database is maintained by PcdPeim driver run from flash. PcdPeim driver
|
||||
// build guid hob in temporary memory and copy the binary data base from flash
|
||||
@@ -104,11 +104,11 @@
|
||||
// DXE PCD database is maintained by PcdDxe driver.At entry point of PcdDxe driver,
|
||||
// a new PCD database is allocated in boot-time memory which including all
|
||||
// PEI PCD and DXE PCD entry.
|
||||
//
|
||||
//
|
||||
// Pcd driver should run as early as possible before any other driver access
|
||||
// dynamic PCD's value. PEI/DXE "Apriori File" mechanism make it possible by
|
||||
// making PcdPeim/PcdDxe as first dispatching driver in PEI/DXE phase.
|
||||
//
|
||||
//
|
||||
// 3.2 Token space Guid/Token number, Platform token, Local token number
|
||||
// Dynamic PCD
|
||||
// +-----------+ +---------+
|
||||
@@ -128,13 +128,13 @@
|
||||
// | Token |
|
||||
// | Number |
|
||||
// +-----------+
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// 3.2.1 Pair of Token space guid + Token number
|
||||
// Any type PCD is identified by pair of "TokenSpaceGuid + TokeNumber". But it
|
||||
// is not easy maintained by PCD driver, and hashed token number will make
|
||||
// searching slowly.
|
||||
//
|
||||
//
|
||||
// 3.2.2 Platform Token Number
|
||||
// "Platform token number" concept is introduced for mapping to a pair of
|
||||
// "TokenSpaceGuid + TokenNumber". The platform token number is generated by
|
||||
@@ -148,14 +148,14 @@
|
||||
// mechanism is not suitable for binary module which use DynamicEx type PCD.
|
||||
// To access a dynamicEx type PCD, pair of "token space guid/token number" all need
|
||||
// to be specificed for PcdSet/PcdGet accessing macro.
|
||||
//
|
||||
//
|
||||
// Platform Token Number is started from 1, and inceased continuous. From whole
|
||||
// platform scope, there are two zones: PEI Zone and DXE Zone
|
||||
// | Platform Token Number
|
||||
// ----------|----------------------------------------------------------------
|
||||
// PEI Zone: | 1 ~ PEI_LOCAL_TOKEN_NUMBER
|
||||
// DXE Zone: | (PEI_LOCAL_TOKEN_NUMBER + 1) ~ (PEI_LOCAL_TOKEN_NUMBER + DXE_LOCAL_TOKEN_NUMBER)
|
||||
//
|
||||
//
|
||||
// 3.2.3 Local Token Number
|
||||
// To fast searching a PCD entry in PCD database, PCD driver translate
|
||||
// platform token number to local token number via a mapping table.
|
||||
@@ -163,7 +163,7 @@
|
||||
// "token space guid + token number" to local token number directly.
|
||||
// Local token number is identifier for all internal interface in PCD PEI/DXE
|
||||
// driver.
|
||||
//
|
||||
//
|
||||
// A local token number is a 32-bit value in following meaning:
|
||||
// 32 ------------- 28 ---------- 24 -------- 0
|
||||
// | PCD type mask | Datum Type | Offset |
|
||||
@@ -183,7 +183,7 @@
|
||||
// Offset : indicate the related offset of PCD value in PCD database array.
|
||||
// Based on local token number, PCD driver could fast determine PCD type, value
|
||||
// type and get PCD entry from PCD database.
|
||||
//
|
||||
//
|
||||
// 3.3 PCD Database binary file
|
||||
// PCD Database binary file will be created at build time as the standalone binary image.
|
||||
// To understand the binary image layout, PCD Database C structure is still generated
|
||||
@@ -203,7 +203,7 @@
|
||||
// Every PCD has a value record in PCD database. For different
|
||||
// datum type PCD has different record structure which will be
|
||||
// introduced in 3.3.1
|
||||
//
|
||||
//
|
||||
// In a PCD database structure, there are two major area: Init and UnInit.
|
||||
// Init area is use stored above PCD internal structure such as ExMapTable,
|
||||
// LocalTokenNumberTable etc and the (default) value of PCD which has default
|
||||
@@ -211,7 +211,7 @@
|
||||
// Unint area is used stored the value of PCD which has no default value in
|
||||
// platform DSC file, the value of NULL, 0 specified in platform DSC file can
|
||||
// be seemed as "no default value".
|
||||
//
|
||||
//
|
||||
// 3.3.1 Simple Sample PCD Database C Structure
|
||||
// A general sample of PCD database structue is as follows:
|
||||
// typedef struct _PCD_DATABASE {
|
||||
@@ -223,7 +223,7 @@
|
||||
// SIZE_INFO SizeTable[PEI_SIZE_TABLE_SIZE];
|
||||
// UINT8 SkuIdTable[PEI_SKUID_TABLE_SIZE];
|
||||
// SKU_ID SystemSkuId;
|
||||
//
|
||||
//
|
||||
// //===== Following is value structure for PCD with default value
|
||||
// ....
|
||||
// ....
|
||||
@@ -235,11 +235,11 @@
|
||||
// ....
|
||||
// } UnInit;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// 3.3.2 PCD value structure in PCD database C structure
|
||||
// The value's structure is generated by build tool in PCD database C structure.
|
||||
// The PCDs in different datum type has different value structure.
|
||||
//
|
||||
//
|
||||
// 3.3.2.1 UINT8/UINT16/UINT32/UINT64 datum type PCD
|
||||
// The C structure for these datum type PCD is just a UINT8/UINT16/UINT32/UINT64
|
||||
// data member in PCD database, For example:
|
||||
@@ -247,30 +247,30 @@
|
||||
// Above structure is generated by build tool, the member name is "PcdCName_Guidvalue"
|
||||
// Member type is UINT16 according to PcdHardwareErrorRecordLevel declaration
|
||||
// in DEC file.
|
||||
//
|
||||
//
|
||||
// 3.3.2.2 VOID* datum type PCD
|
||||
// The value of VOID* datum type PCD is a UINT8/UINT16 array in PCD database.
|
||||
//
|
||||
//
|
||||
// 3.3.2.2.1 VOID* - string type
|
||||
// If the default value for VOID* datum type PCD like L"xxx", the PCD is
|
||||
// used for unicode string, and C structure of this datum type PCD is
|
||||
// UINT16 string array in PCD database, for example:
|
||||
// UINT16 StringTable[29];
|
||||
// The number of 29 in above sample is max size of a unicode string.
|
||||
//
|
||||
//
|
||||
// If the default value for VOID* datum type PCD like "xxx", the PCD is
|
||||
// used for ascii string, and C structure of this datum type PCD is
|
||||
// UINT8 string array in PCD database, for example:
|
||||
// UINT8 StringTable[20];
|
||||
// The number of 20 in above sample is max size of a ascii string.
|
||||
//
|
||||
//
|
||||
// 3.3.2.2.2 VOID* - byte array
|
||||
// If the default value of VOID* datum type PCD like {'0x29', '0x01', '0xf2'}
|
||||
// the PCD is used for byte array. The generated structrue is same as
|
||||
// above ascii string table,
|
||||
// UINT8 StringTable[13];
|
||||
// The number of 13 in above sample is max size of byte array.
|
||||
//
|
||||
//
|
||||
// 3.3.3 Some utility structures in PCD Database
|
||||
// 3.3.3.1 GuidTable
|
||||
// GuidTable array is used to store all related GUID value in PCD database:
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// PcdPeim Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -12,8 +12,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"Platform Configuration Database PEI Module"
|
||||
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
The driver internal functions are implmented here.
|
||||
They build Pei PCD database, and provide access service to PCD database.
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -101,7 +101,7 @@ GetPcdName (
|
||||
CHAR8 *Name;
|
||||
|
||||
//
|
||||
// Return NULL when PCD name table is absent.
|
||||
// Return NULL when PCD name table is absent.
|
||||
//
|
||||
if (Database->PcdNameTableOffset == 0) {
|
||||
return NULL;
|
||||
@@ -140,7 +140,7 @@ GetPcdName (
|
||||
//
|
||||
AsciiStrCatS (Name, NameSize, TokenSpaceName);
|
||||
Name[AsciiStrSize (TokenSpaceName) - sizeof (CHAR8)] = '.';
|
||||
AsciiStrCatS (Name, NameSize, PcdName);
|
||||
AsciiStrCatS (Name, NameSize, PcdName);
|
||||
}
|
||||
|
||||
return Name;
|
||||
@@ -156,7 +156,7 @@ GetPcdName (
|
||||
@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[out] PcdInfo The returned information associated with the requested TokenNumber.
|
||||
The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
|
||||
The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
|
||||
|
||||
@retval EFI_SUCCESS The PCD information was returned successfully
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
@@ -202,7 +202,7 @@ ExGetPcdInfo (
|
||||
PcdInfo->PcdSize = 0;
|
||||
//
|
||||
// Here use one representative in the token space to get the TokenSpaceCName.
|
||||
//
|
||||
//
|
||||
PcdInfo->PcdName = GetPcdName (TRUE, Database, ExMapTable[Index].TokenNumber);
|
||||
return EFI_SUCCESS;
|
||||
} else if (ExMapTable[Index].ExTokenNumber == TokenNumber) {
|
||||
@@ -345,7 +345,7 @@ PeiRegisterCallBackWorker (
|
||||
//
|
||||
TokenNumber--;
|
||||
// EBC compiler is very choosy. It may report warning about comparison
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// comparison.
|
||||
ASSERT ((TokenNumber + 1) < (LocalTokenCount + 1));
|
||||
}
|
||||
@@ -362,7 +362,7 @@ PeiRegisterCallBackWorker (
|
||||
|
||||
GuidHob = GetFirstGuidHob (&gEfiCallerIdGuid);
|
||||
ASSERT (GuidHob != NULL);
|
||||
|
||||
|
||||
CallbackTable = GET_GUID_HOB_DATA (GuidHob);
|
||||
CallbackTable = CallbackTable + (TokenNumber * PcdGet32 (PcdMaxPeiPcdCallBackNumberPerPcdEntry));
|
||||
|
||||
@@ -383,7 +383,7 @@ PeiRegisterCallBackWorker (
|
||||
|
||||
|
||||
/**
|
||||
Find the Pcd database.
|
||||
Find the Pcd database.
|
||||
|
||||
@param FileHandle Handle of the file the external PCD database binary located.
|
||||
|
||||
@@ -452,7 +452,7 @@ BuildPcdDatabase (
|
||||
SizeOfCallbackFnTable = Database->LocalTokenCount * sizeof (PCD_PPI_CALLBACK) * PcdGet32 (PcdMaxPeiPcdCallBackNumberPerPcdEntry);
|
||||
|
||||
CallbackFnTable = BuildGuidHob (&gEfiCallerIdGuid, SizeOfCallbackFnTable);
|
||||
|
||||
|
||||
ZeroMem (CallbackFnTable, SizeOfCallbackFnTable);
|
||||
|
||||
return Database;
|
||||
@@ -520,7 +520,7 @@ GetHiiVariable (
|
||||
}
|
||||
|
||||
/**
|
||||
Invoke the callback function when dynamic PCD entry was set, if this PCD entry
|
||||
Invoke the callback function when dynamic PCD entry was set, if this PCD entry
|
||||
has registered callback function.
|
||||
|
||||
@param ExTokenNumber DynamicEx PCD's token number, if this PCD entry is dyanmicEx
|
||||
@@ -559,14 +559,14 @@ InvokeCallbackOnSet (
|
||||
|
||||
if (Guid == NULL) {
|
||||
// EBC compiler is very choosy. It may report warning about comparison
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// comparison.
|
||||
ASSERT (TokenNumber + 1 < (LocalTokenCount + 1));
|
||||
}
|
||||
|
||||
GuidHob = GetFirstGuidHob (&gEfiCallerIdGuid);
|
||||
ASSERT (GuidHob != NULL);
|
||||
|
||||
|
||||
CallbackTable = GET_GUID_HOB_DATA (GuidHob);
|
||||
|
||||
CallbackTable += (TokenNumber * PcdGet32 (PcdMaxPeiPcdCallBackNumberPerPcdEntry));
|
||||
@@ -616,7 +616,7 @@ SetValueWorker (
|
||||
@retval EFI_INVALID_PARAMETER If Size of non-Ptr type PCD does not match the size information in PCD database.
|
||||
@retval EFI_NOT_FOUND If value type of PCD entry is intergrate, but not in
|
||||
range of UINT8, UINT16, UINT32, UINT64
|
||||
@retval EFI_NOT_FOUND Can not find the PCD type according to token number.
|
||||
@retval EFI_NOT_FOUND Can not find the PCD type according to token number.
|
||||
**/
|
||||
EFI_STATUS
|
||||
SetWorker (
|
||||
@@ -638,7 +638,7 @@ SetWorker (
|
||||
if (!FeaturePcdGet(PcdPeiFullPcdDatabaseEnable)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// TokenNumber Zero is reserved as PCD_INVALID_TOKEN_NUMBER.
|
||||
// We have to decrement TokenNumber by 1 to make it usable
|
||||
@@ -649,7 +649,7 @@ SetWorker (
|
||||
LocalTokenCount = PeiPcdDb->LocalTokenCount;
|
||||
|
||||
// EBC compiler is very choosy. It may report warning about comparison
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// comparison.
|
||||
ASSERT (TokenNumber + 1 < (LocalTokenCount + 1));
|
||||
|
||||
@@ -682,7 +682,7 @@ SetWorker (
|
||||
|
||||
Offset = LocalTokenNumber & PCD_DATABASE_OFFSET_MASK;
|
||||
InternalData = (VOID *) ((UINT8 *) PeiPcdDb + Offset);
|
||||
|
||||
|
||||
switch (LocalTokenNumber & PCD_TYPE_ALL_SET) {
|
||||
case PCD_TYPE_VPD:
|
||||
case PCD_TYPE_HII:
|
||||
@@ -734,7 +734,7 @@ SetWorker (
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
ASSERT (FALSE);
|
||||
@@ -766,12 +766,12 @@ ExSetValueWorker (
|
||||
|
||||
/**
|
||||
Set value for a dynamic-ex PCD entry.
|
||||
|
||||
This routine find the local token number according to dynamic-ex PCD's token
|
||||
|
||||
This routine find the local token number according to dynamic-ex PCD's token
|
||||
space guid and token number firstly, and invoke callback function if this PCD
|
||||
entry registered callback function. Finally, invoken general SetWorker to set
|
||||
PCD value.
|
||||
|
||||
|
||||
@param ExTokenNumber Dynamic-ex PCD token number.
|
||||
@param Guid Token space guid for dynamic-ex PCD.
|
||||
@param Data PCD value want to be set
|
||||
@@ -801,7 +801,7 @@ ExSetWorker (
|
||||
if (TokenNumber == PCD_INVALID_TOKEN_NUMBER) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
InvokeCallbackOnSet (ExTokenNumber, Guid, TokenNumber, Data, *Size);
|
||||
|
||||
return SetWorker (TokenNumber, Data, Size, PtrType);
|
||||
@@ -824,16 +824,16 @@ ExGetWorker (
|
||||
IN UINTN ExTokenNumber,
|
||||
IN UINTN GetSize
|
||||
)
|
||||
{
|
||||
{
|
||||
return GetWorker (GetExPcdTokenNumber (Guid, ExTokenNumber), GetSize);
|
||||
}
|
||||
|
||||
/**
|
||||
Get the PCD entry pointer in PCD database.
|
||||
|
||||
|
||||
This routine will visit PCD database to find the PCD entry according to given
|
||||
token number. The given token number is autogened by build tools and it will be
|
||||
translated to local token number. Local token number contains PCD's type and
|
||||
token number. The given token number is autogened by build tools and it will be
|
||||
translated to local token number. Local token number contains PCD's type and
|
||||
offset of PCD entry in PCD database.
|
||||
|
||||
@param TokenNumber Token's number, it is autogened by build tools
|
||||
@@ -873,7 +873,7 @@ GetWorker (
|
||||
LocalTokenCount = PeiPcdDb->LocalTokenCount;
|
||||
|
||||
// EBC compiler is very choosy. It may report warning about comparison
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// between UINTN and 0 . So we add 1 in each size of the
|
||||
// comparison.
|
||||
ASSERT (TokenNumber + 1 < (LocalTokenCount + 1));
|
||||
|
||||
@@ -891,21 +891,21 @@ GetWorker (
|
||||
VpdHead = (VPD_HEAD *) ((UINT8 *)PeiPcdDb + Offset);
|
||||
return (VOID *) ((UINTN) PcdGet32 (PcdVpdBaseAddress) + VpdHead->Offset);
|
||||
}
|
||||
|
||||
|
||||
case PCD_TYPE_HII|PCD_TYPE_STRING:
|
||||
case PCD_TYPE_HII:
|
||||
{
|
||||
VariableHead = (VARIABLE_HEAD *) ((UINT8 *)PeiPcdDb + Offset);
|
||||
|
||||
|
||||
Guid = (EFI_GUID *) ((UINT8 *)PeiPcdDb + PeiPcdDb->GuidTableOffset) + VariableHead->GuidTableIndex;
|
||||
Name = (UINT16*)&StringTable[VariableHead->StringIndex];
|
||||
|
||||
if ((LocalTokenNumber & PCD_TYPE_ALL_SET) == (PCD_TYPE_HII|PCD_TYPE_STRING)) {
|
||||
//
|
||||
// If a HII type PCD's datum type is VOID*, the DefaultValueOffset is the index of
|
||||
// If a HII type PCD's datum type is VOID*, the DefaultValueOffset is the index of
|
||||
// string array in string table.
|
||||
//
|
||||
VaraiableDefaultBuffer = (UINT8 *) &StringTable[*(STRING_HEAD*)((UINT8*) PeiPcdDb + VariableHead->DefaultValueOffset)];
|
||||
VaraiableDefaultBuffer = (UINT8 *) &StringTable[*(STRING_HEAD*)((UINT8*) PeiPcdDb + VariableHead->DefaultValueOffset)];
|
||||
} else {
|
||||
VaraiableDefaultBuffer = (UINT8 *) PeiPcdDb + VariableHead->DefaultValueOffset;
|
||||
}
|
||||
@@ -943,13 +943,13 @@ GetWorker (
|
||||
default:
|
||||
ASSERT (FALSE);
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
|
||||
ASSERT (FALSE);
|
||||
|
||||
|
||||
return NULL;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -958,14 +958,14 @@ GetWorker (
|
||||
A dynamic-ex type PCD, developer must provide pair of token space guid: token number
|
||||
in DEC file. PCD database maintain a mapping table that translate pair of {token
|
||||
space guid: token number} to Token Number.
|
||||
|
||||
|
||||
@param Guid Token space guid for dynamic-ex PCD entry.
|
||||
@param ExTokenNumber Dynamic-ex PCD token number.
|
||||
|
||||
@return Token Number for dynamic-ex PCD.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
UINTN
|
||||
GetExPcdTokenNumber (
|
||||
IN CONST EFI_GUID *Guid,
|
||||
IN UINTN ExTokenNumber
|
||||
@@ -989,16 +989,16 @@ GetExPcdTokenNumber (
|
||||
// error in the BUILD system.
|
||||
//
|
||||
ASSERT (MatchGuid != NULL);
|
||||
|
||||
|
||||
MatchGuidIdx = MatchGuid - GuidTable;
|
||||
|
||||
|
||||
for (Index = 0; Index < PeiPcdDb->ExTokenCount; Index++) {
|
||||
if ((ExTokenNumber == ExMap[Index].ExTokenNumber) &&
|
||||
if ((ExTokenNumber == ExMap[Index].ExTokenNumber) &&
|
||||
(MatchGuidIdx == ExMap[Index].ExGuidIndex)) {
|
||||
return ExMap[Index].TokenNumber;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return PCD_INVALID_TOKEN_NUMBER;
|
||||
}
|
||||
|
||||
@@ -1017,7 +1017,7 @@ GetPcdDatabase (
|
||||
|
||||
GuidHob = GetFirstGuidHob (&gPcdDataBaseHobGuid);
|
||||
ASSERT (GuidHob != NULL);
|
||||
|
||||
|
||||
return (PEI_PCD_DATABASE *) GET_GUID_HOB_DATA (GuidHob);
|
||||
}
|
||||
|
||||
@@ -1047,7 +1047,7 @@ GetSizeTableIndex (
|
||||
|
||||
if ((LocalTokenNumber & PCD_DATUM_TYPE_ALL_SET) == PCD_DATUM_TYPE_POINTER) {
|
||||
//
|
||||
// SizeTable only contain record for PCD_DATUM_TYPE_POINTER type
|
||||
// SizeTable only contain record for PCD_DATUM_TYPE_POINTER type
|
||||
// PCD entry.
|
||||
//
|
||||
if ((LocalTokenNumber & PCD_TYPE_VPD) != 0) {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The internal header file declares the private functions used by PeiPcd driver.
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -108,21 +108,21 @@ PeiGetPcdInfoGetSku (
|
||||
/**
|
||||
Sets the SKU value for subsequent calls to set or get PCD token values.
|
||||
|
||||
SetSku() sets the SKU Id to be used for subsequent calls to set or get PCD values.
|
||||
SetSku() sets the SKU Id to be used for subsequent calls to set or get PCD values.
|
||||
SetSku() is normally called only once by the system.
|
||||
|
||||
For each item (token), the database can hold a single value that applies to all SKUs,
|
||||
or multiple values, where each value is associated with a specific SKU Id. Items with multiple,
|
||||
SKU-specific values are called SKU enabled.
|
||||
|
||||
The SKU Id of zero is reserved as a default. The valid SkuId range is 1 to 255.
|
||||
For tokens that are not SKU enabled, the system ignores any set SKU Id and works with the
|
||||
single value for that token. For SKU-enabled tokens, the system will use the SKU Id set by the
|
||||
last call to SetSku(). If no 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
|
||||
For each item (token), the database can hold a single value that applies to all SKUs,
|
||||
or multiple values, where each value is associated with a specific SKU Id. Items with multiple,
|
||||
SKU-specific values are called SKU enabled.
|
||||
|
||||
The SKU Id of zero is reserved as a default. The valid SkuId range is 1 to 255.
|
||||
For tokens that are not SKU enabled, the system ignores any set SKU Id and works with the
|
||||
single value for that token. For SKU-enabled tokens, the system will use the SKU Id set by the
|
||||
last call to SetSku(). If no 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 that will be used when the PCD service will retrieve and
|
||||
@param[in] SkuId The SKU value that will be used when the PCD service will retrieve and
|
||||
set values associated with a PCD token.
|
||||
|
||||
**/
|
||||
@@ -135,13 +135,13 @@ PeiPcdSetSku (
|
||||
/**
|
||||
Retrieves an 8-bit value for a given PCD token.
|
||||
|
||||
Retrieves the current byte-sized value for a PCD token number.
|
||||
Retrieves the current byte-sized value for a PCD token number.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The UINT8 value.
|
||||
|
||||
|
||||
**/
|
||||
UINT8
|
||||
EFIAPI
|
||||
@@ -152,13 +152,13 @@ PeiPcdGet8 (
|
||||
/**
|
||||
Retrieves an 16-bit value for a given PCD token.
|
||||
|
||||
Retrieves the current 16-bits value for a PCD token number.
|
||||
Retrieves the current 16-bits value for a PCD token number.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The UINT16 value.
|
||||
|
||||
|
||||
**/
|
||||
UINT16
|
||||
EFIAPI
|
||||
@@ -169,13 +169,13 @@ PeiPcdGet16 (
|
||||
/**
|
||||
Retrieves an 32-bit value for a given PCD token.
|
||||
|
||||
Retrieves the current 32-bits value for a PCD token number.
|
||||
Retrieves the current 32-bits value for a PCD token number.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The UINT32 value.
|
||||
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
@@ -186,13 +186,13 @@ PeiPcdGet32 (
|
||||
/**
|
||||
Retrieves an 64-bit value for a given PCD token.
|
||||
|
||||
Retrieves the current 64-bits value for a PCD token number.
|
||||
Retrieves the current 64-bits value for a PCD token number.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The UINT64 value.
|
||||
|
||||
|
||||
**/
|
||||
UINT64
|
||||
EFIAPI
|
||||
@@ -203,15 +203,15 @@ PeiPcdGet64 (
|
||||
/**
|
||||
Retrieves a pointer to a value for a given PCD token.
|
||||
|
||||
Retrieves the current pointer to the buffer 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,
|
||||
Retrieves the current pointer to the buffer 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] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The pointer to the buffer to be retrived.
|
||||
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
@@ -222,15 +222,15 @@ PeiPcdGetPtr (
|
||||
/**
|
||||
Retrieves a Boolean value for a given PCD token.
|
||||
|
||||
Retrieves the current boolean 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,
|
||||
Retrieves the current boolean 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] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The Boolean value.
|
||||
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
@@ -241,13 +241,13 @@ PeiPcdGetBool (
|
||||
/**
|
||||
Retrieves the size of the value for a given PCD token.
|
||||
|
||||
Retrieves the current size of a particular PCD token.
|
||||
Retrieves the current size of a particular PCD token.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The size of the value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
@@ -258,16 +258,16 @@ PeiPcdGetSize (
|
||||
/**
|
||||
Retrieves an 8-bit value for a given PCD token.
|
||||
|
||||
Retrieves the 8-bit value of a particular PCD token.
|
||||
Retrieves the 8-bit value of a particular PCD token.
|
||||
If the TokenNumber is invalid or the token space
|
||||
specified by Guid does not exist, the results are
|
||||
specified by Guid does not exist, the results are
|
||||
unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The size 8-bit value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINT8
|
||||
EFIAPI
|
||||
@@ -279,16 +279,16 @@ PeiPcdGet8Ex (
|
||||
/**
|
||||
Retrieves an 16-bit value for a given PCD token.
|
||||
|
||||
Retrieves the 16-bit value of a particular PCD token.
|
||||
Retrieves the 16-bit value of a particular PCD token.
|
||||
If the TokenNumber is invalid or the token space
|
||||
specified by Guid does not exist, the results are
|
||||
specified by Guid does not exist, the results are
|
||||
unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The size 16-bit value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINT16
|
||||
EFIAPI
|
||||
@@ -300,16 +300,16 @@ PeiPcdGet16Ex (
|
||||
/**
|
||||
Retrieves an 32-bit value for a given PCD token.
|
||||
|
||||
Retrieves the 32-bit value of a particular PCD token.
|
||||
Retrieves the 32-bit value of a particular PCD token.
|
||||
If the TokenNumber is invalid or the token space
|
||||
specified by Guid does not exist, the results are
|
||||
specified by Guid does not exist, the results are
|
||||
unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The size 32-bit value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
@@ -321,16 +321,16 @@ PeiPcdGet32Ex (
|
||||
/**
|
||||
Retrieves an 64-bit value for a given PCD token.
|
||||
|
||||
Retrieves the 64-bit value of a particular PCD token.
|
||||
Retrieves the 64-bit value of a particular PCD token.
|
||||
If the TokenNumber is invalid or the token space
|
||||
specified by Guid does not exist, the results are
|
||||
specified by Guid does not exist, the results are
|
||||
unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The size 64-bit value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINT64
|
||||
EFIAPI
|
||||
@@ -342,16 +342,16 @@ PeiPcdGet64Ex (
|
||||
/**
|
||||
Retrieves a pointer to a value for a given PCD token.
|
||||
|
||||
Retrieves the current pointer to the buffer 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,
|
||||
Retrieves the current pointer to the buffer 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 token space for the token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The pointer to the buffer to be retrived.
|
||||
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
@@ -363,16 +363,16 @@ PeiPcdGetPtrEx (
|
||||
/**
|
||||
Retrieves an Boolean value for a given PCD token.
|
||||
|
||||
Retrieves the Boolean value of a particular PCD token.
|
||||
Retrieves the Boolean value of a particular PCD token.
|
||||
If the TokenNumber is invalid or the token space
|
||||
specified by Guid does not exist, the results are
|
||||
specified by Guid does not exist, the results are
|
||||
unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The size Boolean value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
@@ -384,14 +384,14 @@ PeiPcdGetBoolEx (
|
||||
/**
|
||||
Retrieves the size of the value for a given PCD token.
|
||||
|
||||
Retrieves the current size of a particular PCD token.
|
||||
Retrieves the current size of a particular PCD token.
|
||||
If the TokenNumber is invalid, the results are unpredictable.
|
||||
|
||||
@param[in] Guid The token space for the token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
|
||||
@return The size of the value for the PCD token.
|
||||
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
@@ -403,19 +403,19 @@ PeiPcdGetSizeEx (
|
||||
/**
|
||||
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.
|
||||
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] 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 Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -427,19 +427,19 @@ PeiPcdSet8 (
|
||||
/**
|
||||
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.
|
||||
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] 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 Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -451,19 +451,19 @@ PeiPcdSet16 (
|
||||
/**
|
||||
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.
|
||||
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] 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 Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -475,19 +475,19 @@ PeiPcdSet32 (
|
||||
/**
|
||||
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.
|
||||
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] 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 Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -499,23 +499,23 @@ PeiPcdSet64 (
|
||||
/**
|
||||
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.
|
||||
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] TokenNumber The PCD token number.
|
||||
@param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
|
||||
On input, if the SizeOfValue is greater than the maximum size supported
|
||||
for this TokenNumber then the output value of SizeOfValue will reflect
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
|
||||
On input, if the SizeOfValue is greater than the maximum size supported
|
||||
for this TokenNumber then the output value of SizeOfValue will reflect
|
||||
the maximum size supported for this TokenNumber.
|
||||
@param[in] Buffer The buffer to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -528,19 +528,19 @@ PeiPcdSetPtr (
|
||||
/**
|
||||
Sets an 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.
|
||||
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] 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 Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -552,20 +552,20 @@ PeiPcdSetBool (
|
||||
/**
|
||||
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.
|
||||
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] TokenNumber The PCD token number.
|
||||
@param[in] Value The value to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -578,20 +578,20 @@ PeiPcdSet8Ex (
|
||||
/**
|
||||
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.
|
||||
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] TokenNumber The PCD token number.
|
||||
@param[in] Value The value to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -604,20 +604,20 @@ PeiPcdSet16Ex (
|
||||
/**
|
||||
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.
|
||||
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] TokenNumber The PCD token number.
|
||||
@param[in] Value The value to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -630,20 +630,20 @@ PeiPcdSet32Ex (
|
||||
/**
|
||||
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.
|
||||
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] TokenNumber The PCD token number.
|
||||
@param[in] Value The value to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -656,24 +656,24 @@ PeiPcdSet64Ex (
|
||||
/**
|
||||
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.
|
||||
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, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
|
||||
On input, if the SizeOfValue is greater than the maximum size supported
|
||||
for this TokenNumber then the output value of SizeOfValue will reflect
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token.
|
||||
On input, if the SizeOfValue is greater than the maximum size supported
|
||||
for this TokenNumber then the output value of SizeOfValue will reflect
|
||||
the maximum size supported for this TokenNumber.
|
||||
@param[in] Buffer The buffer to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -687,20 +687,20 @@ PeiPcdSetPtrEx (
|
||||
/**
|
||||
Sets an 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.
|
||||
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] TokenNumber The PCD token number.
|
||||
@param[in] Value The value to set for the PCD token.
|
||||
|
||||
@retval EFI_SUCCESS Procedure returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data
|
||||
being set was incompatible with a call to this function.
|
||||
@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 GetSize() to retrieve the size of the target data.
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -714,10 +714,10 @@ PeiPcdSetBoolEx (
|
||||
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] TokenNumber The PCD token number.
|
||||
@param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set.
|
||||
@param[in] TokenNumber The PCD token number.
|
||||
@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
|
||||
@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.
|
||||
|
||||
@@ -734,10 +734,10 @@ PeiRegisterCallBackOnSet (
|
||||
Cancels a previously set callback function for a particular PCD token number.
|
||||
|
||||
@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] CallBackFunction The function prototype called when the value associated with the CallBackToken is set.
|
||||
@param [in] TokenNumber The PCD token number.
|
||||
@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
|
||||
@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.
|
||||
|
||||
@@ -751,28 +751,28 @@ PcdUnRegisterCallBackOnSet (
|
||||
);
|
||||
|
||||
/**
|
||||
Retrieves 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.
|
||||
|
||||
If TokenNumber is 0 and Guid is not NULL, then the first token from the token space specified by Guid is returned.
|
||||
If TokenNumber is not 0 and Guid is not NULL, then the next token in the token space specified by Guid is returned.
|
||||
If TokenNumber is 0 and Guid is NULL, then the first token in the default token space is returned.
|
||||
If TokenNumber is not 0 and Guid is NULL, then the next token in the default token space is returned.
|
||||
The token numbers in the default token space may not be related to token numbers in token spaces that are named by Guid.
|
||||
If the next token number can be retrieved, then it is returned in TokenNumber, and EFI_SUCCESS is returned.
|
||||
If TokenNumber represents the last token number in the token space specified by Guid, then EFI_NOT_FOUND is returned.
|
||||
Retrieves 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.
|
||||
|
||||
If TokenNumber is 0 and Guid is not NULL, then the first token from the token space specified by Guid is returned.
|
||||
If TokenNumber is not 0 and Guid is not NULL, then the next token in the token space specified by Guid is returned.
|
||||
If TokenNumber is 0 and Guid is NULL, then the first token in the default token space is returned.
|
||||
If TokenNumber is not 0 and Guid is NULL, then the next token in the default token space is returned.
|
||||
The token numbers in the default token space may not be related to token numbers in token spaces that are named by Guid.
|
||||
If the next token number can be retrieved, then it is returned in TokenNumber, and EFI_SUCCESS is returned.
|
||||
If TokenNumber represents the last token number in the token space specified by Guid, then EFI_NOT_FOUND is returned.
|
||||
If TokenNumber is not present in the token space specified by Guid, then EFI_NOT_FOUND is returned.
|
||||
|
||||
|
||||
@param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
|
||||
This is an optional parameter that may be NULL. If this parameter is NULL, then a request
|
||||
@param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value.
|
||||
This is an optional parameter that may be NULL. If this parameter is NULL, then a request
|
||||
is being made to retrieve tokens from the default token space.
|
||||
@param[in, out] TokenNumber A pointer to the PCD token number to use to find the subsequent token number.
|
||||
|
||||
@retval EFI_SUCCESS The PCD service has retrieved the next valid token number.
|
||||
Or the input token number is already the last valid token number in the PCD database.
|
||||
|
||||
@retval EFI_SUCCESS The PCD service has retrieved the next valid token number.
|
||||
Or the input token number is already the last valid token number in the PCD database.
|
||||
In the later case, *TokenNumber is updated with the value of 0.
|
||||
@retval EFI_NOT_FOUND If this input token number and token namespace does not exist on the platform.
|
||||
|
||||
@@ -787,20 +787,20 @@ PeiPcdGetNextToken (
|
||||
/**
|
||||
Retrieves the next valid PCD token namespace for a given namespace.
|
||||
|
||||
@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 the input
|
||||
token namespace does not exist on the platform, an error is returned and
|
||||
the value of *Guid is undefined. If *Guid is NULL, then the GUID of the
|
||||
first token space of the current platform is assigned to *Guid the function
|
||||
return EFI_SUCCESS. If *Guid is NULL and there is no namespace exist in
|
||||
the platform other than the default (NULL) tokennamespace, *Guid is unchanged
|
||||
and the function return EFI_SUCCESS. If this input token namespace is the last
|
||||
namespace on the platform, *Guid will be assigned to NULL and the function return
|
||||
EFI_SUCCESS.
|
||||
@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 the input
|
||||
token namespace does not exist on the platform, an error is returned and
|
||||
the value of *Guid is undefined. If *Guid is NULL, then the GUID of the
|
||||
first token space of the current platform is assigned to *Guid the function
|
||||
return EFI_SUCCESS. If *Guid is NULL and there is no namespace exist in
|
||||
the platform other than the default (NULL) tokennamespace, *Guid is unchanged
|
||||
and the function return EFI_SUCCESS. If this input token namespace is the last
|
||||
namespace on the platform, *Guid will be assigned to NULL and the function return
|
||||
EFI_SUCCESS.
|
||||
|
||||
@retval EFI_SUCCESS The PCD service retrieved the next valid token space Guid.
|
||||
Or the input token space Guid is already the last valid token space Guid
|
||||
@retval EFI_SUCCESS The PCD service retrieved the next valid token space Guid.
|
||||
Or the input token space Guid is already the last valid token space Guid
|
||||
in the PCD database. In the later case, *Guid is updated with the value of NULL.
|
||||
@retval EFI_NOT_FOUND If the input token namespace does not exist on the platform.
|
||||
|
||||
@@ -820,7 +820,7 @@ PeiPcdGetNextTokenSpace (
|
||||
@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[out] PcdInfo The returned information associated with the requested TokenNumber.
|
||||
The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
|
||||
The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName.
|
||||
|
||||
@retval EFI_SUCCESS The PCD information was returned successfully
|
||||
@retval EFI_NOT_FOUND The PCD service could not find the requested token number.
|
||||
@@ -875,7 +875,7 @@ SetValueWorker (
|
||||
@retval EFI_INVALID_PARAMETER If Size of non-Ptr type PCD does not match the size information in PCD database.
|
||||
@retval EFI_NOT_FOUND If value type of PCD entry is intergrate, but not in
|
||||
range of UINT8, UINT16, UINT32, UINT64
|
||||
@retval EFI_NOT_FOUND Can not find the PCD type according to token number.
|
||||
@retval EFI_NOT_FOUND Can not find the PCD type according to token number.
|
||||
**/
|
||||
EFI_STATUS
|
||||
SetWorker (
|
||||
@@ -906,12 +906,12 @@ ExSetValueWorker (
|
||||
|
||||
/**
|
||||
Set value for a dynamic PCD entry.
|
||||
|
||||
This routine find the local token number according to dynamic-ex PCD's token
|
||||
|
||||
This routine find the local token number according to dynamic-ex PCD's token
|
||||
space guid and token number firstly, and invoke callback function if this PCD
|
||||
entry registered callback function. Finally, invoken general SetWorker to set
|
||||
PCD value.
|
||||
|
||||
|
||||
@param ExTokenNumber Dynamic-ex PCD token number.
|
||||
@param Guid Token space guid for dynamic-ex PCD.
|
||||
@param Data PCD value want to be set
|
||||
@@ -933,10 +933,10 @@ ExSetWorker (
|
||||
|
||||
/**
|
||||
Get the PCD entry pointer in PCD database.
|
||||
|
||||
|
||||
This routine will visit PCD database to find the PCD entry according to given
|
||||
token number. The given token number is autogened by build tools and it will be
|
||||
translated to local token number. Local token number contains PCD's type and
|
||||
token number. The given token number is autogened by build tools and it will be
|
||||
translated to local token number. Local token number contains PCD's type and
|
||||
offset of PCD entry in PCD database.
|
||||
|
||||
@param TokenNumber Token's number, it is autogened by build tools
|
||||
@@ -980,7 +980,7 @@ typedef struct {
|
||||
A dynamic-ex type PCD, developer must provide pair of token space guid: token number
|
||||
in DEC file. PCD database maintain a mapping table that translate pair of {token
|
||||
space guid: token number} to Token Number.
|
||||
|
||||
|
||||
@param Guid Token space guid for dynamic-ex PCD entry.
|
||||
@param ExTokenNumber Token number for dynamic-ex PCD.
|
||||
|
||||
@@ -1045,7 +1045,7 @@ GetSizeTableIndex (
|
||||
|
||||
/**
|
||||
Get PCD value's size for POINTER type PCD.
|
||||
|
||||
|
||||
The POINTER type PCD's value will be stored into a buffer in specificed size.
|
||||
The max size of this PCD's value is described in PCD's definition in DEC file.
|
||||
|
||||
@@ -1065,7 +1065,7 @@ GetPtrTypeSize (
|
||||
|
||||
/**
|
||||
Set PCD value's size for POINTER type PCD.
|
||||
|
||||
|
||||
The POINTER type PCD's value will be stored into a buffer in specificed size.
|
||||
The max size of this PCD's value is described in PCD's definition in DEC file.
|
||||
|
||||
|
Reference in New Issue
Block a user