[edk2-devel] [PATCH 1/1] BaseTools: Fix StructurePcd offset error.
Bob Feng
bob.c.feng at intel.com
Mon Nov 8 02:38:08 UTC 2021
Reviewed-by: Bob Feng <bob.c.feng at intel.com>
-----Original Message-----
From: devel at edk2.groups.io <devel at edk2.groups.io> On Behalf Of Yuwei Chen
Sent: Wednesday, October 27, 2021 6:00 PM
To: devel at edk2.groups.io
Cc: Feng, Bob C <bob.c.feng at intel.com>; Liming Gao <gaoliming at byosoft.com.cn>
Subject: [edk2-devel] [PATCH 1/1] 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 at intel.com>
Cc: Liming Gao <gaoliming at byosoft.com.cn>
Signed-off-by: Yuwei Chen <yuwei.chen at intel.com>
---
BaseTools/Scripts/ConvertFceToStructurePcd.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/BaseTools/Scripts/ConvertFceToStructurePcd.py b/BaseTools/Scripts/ConvertFceToStructurePcd.py
index 2baabf2dd521..9e7fe58768b1 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:
--
2.27.0.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#83428): https://edk2.groups.io/g/devel/message/83428
Mute This Topic: https://groups.io/mt/86623926/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list