summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/Python/AutoGen')
-rw-r--r--BaseTools/Source/Python/AutoGen/GenPcdDb.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/AutoGen/GenPcdDb.py b/BaseTools/Source/Python/AutoGen/GenPcdDb.py
index 2176bbefeb..5b260cd515 100644
--- a/BaseTools/Source/Python/AutoGen/GenPcdDb.py
+++ b/BaseTools/Source/Python/AutoGen/GenPcdDb.py
@@ -1184,6 +1184,12 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
# and calculate the VariableHeadStringIndex
VariableNameStructure = StringToArray(Sku.VariableName)
+
+ # Make pointer of VaraibleName(HII PCD) 2 bytes aligned
+ VariableNameStructureBytes = VariableNameStructure.lstrip("{").rstrip("}").split(",")
+ if len(VariableNameStructureBytes) % 2:
+ VariableNameStructure = "{%s,0x00}" % ",".join(VariableNameStructureBytes)
+
if VariableNameStructure not in Dict['STRING_TABLE_VALUE']:
Dict['STRING_TABLE_CNAME'].append(CName)
Dict['STRING_TABLE_GUID'].append(TokenSpaceGuid)