PCD size by type is shared. just use it.
Cc: Liming Gao <[email protected]>
Cc: Yonghong Zhu <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <[email protected]>
---
BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py
b/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py
index df7a9b889aa4..602c90b3fe08 100644
--- a/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py
+++ b/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py
@@ -250,16 +250,11 @@ class VAR_CHECK_PCD_VALID_OBJ(object):
self.data = set()
self.ValidData = True
self.updateStorageWidth()
+
def updateStorageWidth(self):
- if self.PcdDataType == TAB_UINT8 or self.PcdDataType == "BOOLEAN":
- self.StorageWidth = 1
- elif self.PcdDataType == TAB_UINT16:
- self.StorageWidth = 2
- elif self.PcdDataType == TAB_UINT32:
- self.StorageWidth = 4
- elif self.PcdDataType == TAB_UINT64:
- self.StorageWidth = 8
- else:
+ try:
+ self.StorageWidth = int(MAX_SIZE_TYPE[self.PcdDataType])
+ except:
self.StorageWidth = 0
self.ValidData = False
--
2.16.2.windows.1
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel