summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
authorYuwei Chen <yuwei.chen@intel.com>2021-10-27 18:00:03 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-11-08 03:18:54 +0000
commitd79df34bebdd87aa01ccf78f541b4ae4c9f68f74 (patch)
tree75315099894de8431fd56a02bd6fdc14061d3267 /BaseTools
parent4050c873b51f59cb6fcd7665029f931e727e0e4f (diff)
downloadedk2-d79df34bebdd87aa01ccf78f541b4ae4c9f68f74.tar.gz
edk2-d79df34bebdd87aa01ccf78f541b4ae4c9f68f74.tar.bz2
edk2-d79df34bebdd87aa01ccf78f541b4ae4c9f68f74.zip
BaseTools: Fix StructurePcd offset error.
Currently when parse VFR files to get the struct info, BOOLEAN type struct is ignored, which caused offset errors. This patch fixed these bugs. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Scripts/ConvertFceToStructurePcd.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Scripts/ConvertFceToStructurePcd.py b/BaseTools/Scripts/ConvertFceToStructurePcd.py
index 2baabf2dd5..9e7fe58768 100644
--- a/BaseTools/Scripts/ConvertFceToStructurePcd.py
+++ b/BaseTools/Scripts/ConvertFceToStructurePcd.py
@@ -142,7 +142,7 @@ class parser_lst(object):
line.append(struct)
unparse.append(line)
else:
- if uint not in ['UINT8', 'UINT16', 'UINT32', 'UINT64']:
+ if uint not in ['UINT8', 'UINT16', 'UINT32', 'UINT64', 'BOOLEAN']:
line = [offset, t_name, 0, uint]
line.append(struct)
unparse.append(line)
@@ -569,7 +569,7 @@ class mainprocess(object):
for i in List:
for j in i:
tmp = j.split("|")
- if (('L"' in j) and ("[" in j)) or (tmp[1].strip() == '{0x0, 0x0}'):
+ if (('L"' in j) and ("[" in j)) or (tmp[1].split("#")[0].strip() == '{0x0, 0x0}'):
tmp[0] = tmp[0][:tmp[0].index('[')]
List[List.index(i)][i.index(j)] = "|".join(tmp)
else: