diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-07-23 11:58:22 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-07-24 16:27:49 +0800 |
commit | bfa7eeb61d94623ddbe43b916a0bb1dc0f73a292 (patch) | |
tree | 8ff5e11c568d4fd73bf8b2ae4b0cf329118b53b6 /BaseTools/Source/Python | |
parent | 005c855dc6be0f61f76de0d7ec4a62ee737518d6 (diff) | |
download | edk2-bfa7eeb61d94623ddbe43b916a0bb1dc0f73a292.tar.gz edk2-bfa7eeb61d94623ddbe43b916a0bb1dc0f73a292.tar.bz2 edk2-bfa7eeb61d94623ddbe43b916a0bb1dc0f73a292.zip |
BaseTools: Correct _PCD_PATCHABLE_TokenName_SIZE's value
current if user use PatchPcdSetPtr in library, it will report the
_PCD_PATCHABLE_TokenName_SIZE is not defined.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/GenC.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py index aaa88f876a..8a62cd22bd 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -1293,7 +1293,6 @@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, Pcd): AutoGenH.Append('#define %s(Value) LibPcdSet%s(%s, (Value))\n' % (SetModeName, DatumSizeLib, PcdTokenName))
AutoGenH.Append('#define %s(Value) LibPcdSet%sS(%s, (Value))\n' % (SetModeStatusName, DatumSizeLib, PcdTokenName))
if PcdItemType == TAB_PCDS_PATCHABLE_IN_MODULE:
- GetModeMaxSizeName = '_PCD_GET_MODE_MAXSIZE' + '_' + TokenCName
PcdVariableName = '_gPcd_' + gItemTypeStringDatabase[TAB_PCDS_PATCHABLE_IN_MODULE] + '_' + TokenCName
if DatumType not in TAB_PCD_NUMERIC_TYPES:
if DatumType == TAB_VOID and Array == '[]':
@@ -1308,7 +1307,7 @@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, Pcd): if Pcd.DatumType not in TAB_PCD_NUMERIC_TYPES:
AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtrAndSize((VOID *)_gPcd_BinaryPatch_%s, &%s, %s, (SizeOfBuffer), (Buffer))\n' % (SetModeName, TokenCName, PatchPcdSizeVariableName, PatchPcdMaxSizeVariable))
AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtrAndSizeS((VOID *)_gPcd_BinaryPatch_%s, &%s, %s, (SizeOfBuffer), (Buffer))\n' % (SetModeStatusName, TokenCName, PatchPcdSizeVariableName, PatchPcdMaxSizeVariable))
- AutoGenH.Append('#define %s %s\n' % (GetModeMaxSizeName, PatchPcdMaxSizeVariable))
+ AutoGenH.Append('#define %s %s\n' % (PatchPcdSizeTokenName, PatchPcdMaxSizeVariable))
AutoGenH.Append('extern const UINTN %s; \n' % PatchPcdMaxSizeVariable)
else:
AutoGenH.Append('#define %s(Value) (%s = (Value))\n' % (SetModeName, PcdVariableName))
|