BaseTools: Collect DynamicHii PCD values and assign it to VPD PCD Value
https://bugzilla.tianocore.org/show_bug.cgi?id=661 Collect all DynamicHii and DynamicExHii PCD value into PCD PcdNvStoreDefaultValueBuffer, then firmware can access this PCD value to get the variable default setting. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Feng Bob C <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@ -2201,6 +2201,29 @@ def BuildOptionPcdValueFormat(TokenSpaceGuidCName, TokenCName, PcdDatumType, Val
|
||||
elif Value == 'FALSE' or Value == '0':
|
||||
Value = '0'
|
||||
return Value
|
||||
## Get the integer value from string like "14U" or integer like 2
|
||||
#
|
||||
# @param Input The object that may be either a integer value or a string
|
||||
#
|
||||
# @retval Value The integer value that the input represents
|
||||
#
|
||||
def GetIntegerValue(Input):
|
||||
if type(Input) in (int, long):
|
||||
return Input
|
||||
String = Input
|
||||
if String.endswith("U"):
|
||||
String = String[:-1]
|
||||
if String.endswith("ULL"):
|
||||
String = String[:-3]
|
||||
if String.endswith("LL"):
|
||||
String = String[:-2]
|
||||
|
||||
if String.startswith("0x") or String.startswith("0X"):
|
||||
return int(String, 16)
|
||||
elif String == '':
|
||||
return 0
|
||||
else:
|
||||
return int(String)
|
||||
|
||||
##
|
||||
#
|
||||
|
Reference in New Issue
Block a user