summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/PCD/Pei
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2018-06-27 21:08:52 +0800
committerLiming Gao <liming.gao@intel.com>2018-06-28 11:19:45 +0800
commitd1102dba7210b95e41d06c2338a22ba6af248645 (patch)
tree8b4af076b5d6f2aa7f35563d4defcca4d4bfdd87 /MdeModulePkg/Universal/PCD/Pei
parentca79bab7af4770c5eb578f6d495af01705aedb79 (diff)
downloadedk2-d1102dba7210b95e41d06c2338a22ba6af248645.zip
edk2-d1102dba7210b95e41d06c2338a22ba6af248645.tar.gz
edk2-d1102dba7210b95e41d06c2338a22ba6af248645.tar.bz2
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>
Diffstat (limited to 'MdeModulePkg/Universal/PCD/Pei')
-rw-r--r--MdeModulePkg/Universal/PCD/Pei/Pcd.c408
-rw-r--r--MdeModulePkg/Universal/PCD/Pei/Pcd.inf166
-rw-r--r--MdeModulePkg/Universal/PCD/Pei/PcdPeim.uni66
-rw-r--r--MdeModulePkg/Universal/PCD/Pei/PcdPeimExtra.uni6
-rw-r--r--MdeModulePkg/Universal/PCD/Pei/Service.c82
-rw-r--r--MdeModulePkg/Universal/PCD/Pei/Service.h390
6 files changed, 559 insertions, 559 deletions
diff --git a/MdeModulePkg/Universal/PCD/Pei/Pcd.c b/MdeModulePkg/Universal/PCD/Pei/Pcd.c
index 8d9328b..e552e15 100644
--- a/MdeModulePkg/Universal/PCD/Pei/Pcd.c
+++ b/MdeModulePkg/Universal/PCD/Pei/Pcd.c
@@ -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
diff --git a/MdeModulePkg/Universal/PCD/Pei/Pcd.inf b/MdeModulePkg/Universal/PCD/Pei/Pcd.inf
index 3cba289..c2a3ccb 100644
--- a/MdeModulePkg/Universal/PCD/Pei/Pcd.inf
+++ b/MdeModulePkg/Universal/PCD/Pei/Pcd.inf
@@ -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
diff --git a/MdeModulePkg/Universal/PCD/Pei/PcdPeim.uni b/MdeModulePkg/Universal/PCD/Pei/PcdPeim.uni
index 3e7c556..88cfe01 100644
--- a/MdeModulePkg/Universal/PCD/Pei/PcdPeim.uni
+++ b/MdeModulePkg/Universal/PCD/Pei/PcdPeim.uni
@@ -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:
diff --git a/MdeModulePkg/Universal/PCD/Pei/PcdPeimExtra.uni b/MdeModulePkg/Universal/PCD/Pei/PcdPeimExtra.uni
index a618943..9cbf7c3 100644
--- a/MdeModulePkg/Universal/PCD/Pei/PcdPeimExtra.uni
+++ b/MdeModulePkg/Universal/PCD/Pei/PcdPeimExtra.uni
@@ -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"
diff --git a/MdeModulePkg/Universal/PCD/Pei/Service.c b/MdeModulePkg/Universal/PCD/Pei/Service.c
index e8a0b6c..bb4b52b 100644
--- a/MdeModulePkg/Universal/PCD/Pei/Service.c
+++ b/MdeModulePkg/Universal/PCD/Pei/Service.c
@@ -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) {
diff --git a/MdeModulePkg/Universal/PCD/Pei/Service.h b/MdeModulePkg/Universal/PCD/Pei/Service.h
index 3a7910a..a8299cc 100644
--- a/MdeModulePkg/Universal/PCD/Pei/Service.h
+++ b/MdeModulePkg/Universal/PCD/Pei/Service.h
@@ -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.
-
- @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
+ @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
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.