X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FGenFds%2FFfsInfStatement.py;h=37624f3fa9d4e0b9b357b65627d89bbb99aabef7;hp=887619694df3ce00a6aeb6cca9625ec0af37d0e6;hb=25598f8bdbd63dd96194fd3f43dd53dd814cd1c0;hpb=9eb87141eca12b1f15afa4b769af04d1395891c6 diff --git a/BaseTools/Source/Python/GenFds/FfsInfStatement.py b/BaseTools/Source/Python/GenFds/FfsInfStatement.py index 887619694d..37624f3fa9 100644 --- a/BaseTools/Source/Python/GenFds/FfsInfStatement.py +++ b/BaseTools/Source/Python/GenFds/FfsInfStatement.py @@ -47,14 +47,12 @@ import Common.GlobalData as GlobalData from DepexSection import DepexSection from Common.Misc import SaveFileOnChange from Common.Expression import * -from Common.DataType import TAB_COMMON +from Common.DataType import * ## generate FFS from INF # # class FfsInfStatement(FfsInfStatementClassObject): - ## The mapping dictionary from datum type to its maximum number. - _MAX_SIZE_TYPE = {"BOOLEAN":0x01, "UINT8":0xFF, "UINT16":0xFFFF, "UINT32":0xFFFFFFFF, "UINT64":0xFFFFFFFFFFFFFFFF} ## The constructor # # @param self The object pointer @@ -333,8 +331,8 @@ class FfsInfStatement(FfsInfStatementClassObject): EdkLogger.error("GenFds", GENFDS_ERROR, "The size of VOID* type PCD '%s.%s' exceeds its maximum size %d bytes." \ % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName, int(MaxDatumSize) - int(Pcd.MaxDatumSize))) else: - if PcdValueInDscOrFdf > FfsInfStatement._MAX_SIZE_TYPE[Pcd.DatumType] \ - or PcdValueInImg > FfsInfStatement._MAX_SIZE_TYPE[Pcd.DatumType]: + if PcdValueInDscOrFdf > MAX_VAL_TYPE[Pcd.DatumType] \ + or PcdValueInImg > MAX_VAL_TYPE[Pcd.DatumType]: EdkLogger.error("GenFds", GENFDS_ERROR, "The size of %s type PCD '%s.%s' doesn't match its data type." \ % (Pcd.DatumType, Pcd.TokenSpaceGuidCName, Pcd.TokenCName)) self.PatchPcds.append((Pcd, DefaultValue))