BaseTools: merge towards minimum PCD MAX <something> methods
[mirror_edk2.git] / BaseTools / Source / Python / Common / DataType.py
index c0db8d02e170108f7231875059ae2e0f2817ccec..1e632f3abdbf1e275e500192d4166f30a94dffdf 100644 (file)
@@ -273,6 +273,11 @@ TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_LIST = [TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_
                                             TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_RUNTIME_PAGE_SIZE, \\r
                                             TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_SMM_PAGE_SIZE]\r
 \r
+## The mapping dictionary from datum type to its maximum number.\r
+MAX_VAL_TYPE = {"BOOLEAN":0x01, TAB_UINT8:0xFF, TAB_UINT16:0xFFFF, TAB_UINT32:0xFFFFFFFF, TAB_UINT64:0xFFFFFFFFFFFFFFFF}\r
+## The mapping dictionary from datum type to size string.\r
+MAX_SIZE_TYPE = {"BOOLEAN":"1", TAB_UINT8:"1", TAB_UINT16:"2", TAB_UINT32:"4", TAB_UINT64:"8"}\r
+\r
 TAB_DEPEX = 'Depex'\r
 TAB_DEPEX_COMMON = TAB_DEPEX + TAB_SPLIT + TAB_ARCH_COMMON\r
 TAB_DEPEX_IA32 = TAB_DEPEX + TAB_SPLIT + TAB_ARCH_IA32\r