mirror of https://github.com/acidanthera/audk.git
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>
This commit is contained in:
parent
005c855dc6
commit
bfa7eeb61d
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue