From 72a1d77694d51914c0dd6aa97dbfa58634b0a4a5 Mon Sep 17 00:00:00 2001 From: "bob.c.feng@intel.com" Date: Wed, 7 Nov 2018 17:18:34 +0800 Subject: BaseTools: Enable Pcd Array support. https://bugzilla.tianocore.org/show_bug.cgi?id=1292 This patch is going to enable Array data type for PCD. 1. Support Pcd ARRAY as Structure PCD type including basic datatype array and structure array. For example: gStructuredPcdPkgTokenSpaceGuid.PcdTest|{0x0}|TEST[10]|0x00010080 gStructuredPcdPkgTokenSpaceGuid.PcdTest2|{0x0}|UINT8[10]|0x00010081 2. Support C CODE style value initialization in DEC/DSC. For example: gStructuredPcdPkgTokenSpaceGuid.PcdTest|{CODE({ {0, {0, 0, 0, 0, 0, 0, 0}}, {0, {0, 0, 0, 0, 0, 0, 0}}, {0, {0, 0, 0, 0, 0, 0, 0}}, {0, {0, 0, 0, 0, 0, 0, 0}}, {0, {0, 0, 0, 0, 0, 0, 0}}, {0, {0, 0, 0, 0, 0, 0, 0}}, {0, {0, 0, 0, 0, 0, 0, 0}}, {0, {0, 0, 0, 0, 0, 0, 0}}, {0, {0, 0, 0, 0, 0, 0, 0}}, {0, {0, 0, 0, 0, 0, 0, 0}}, })} Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng Cc: Liming Gao Reviewed-by: Liming Gao --- BaseTools/Source/Python/Common/Misc.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'BaseTools/Source/Python/Common/Misc.py') diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py index 61ba79241f..2354f392f2 100644 --- a/BaseTools/Source/Python/Common/Misc.py +++ b/BaseTools/Source/Python/Common/Misc.py @@ -1297,6 +1297,8 @@ def ParseDevPathValue (Value): return '{' + out + '}', Size def ParseFieldValue (Value): + if "{CODE(" in Value: + return Value, len(Value.split(",")) if isinstance(Value, type(0)): return Value, (Value.bit_length() + 7) / 8 if not isinstance(Value, type('')): -- cgit v1.2.3