From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web10.9640.1635328809234516422 for ; Wed, 27 Oct 2021 03:00:09 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: yuwei.chen@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10149"; a="290961658" X-IronPort-AV: E=Sophos;i="5.87,186,1631602800"; d="scan'208";a="290961658" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2021 03:00:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,186,1631602800"; d="scan'208";a="497797661" Received: from yuweipc.ccr.corp.intel.com ([10.239.158.34]) by orsmga008.jf.intel.com with ESMTP; 27 Oct 2021 03:00:04 -0700 From: "Yuwei Chen" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao Subject: [PATCH 1/1] BaseTools: Fix StructurePcd offset error. Date: Wed, 27 Oct 2021 18:00:03 +0800 Message-Id: <20211027100003.167-1-yuwei.chen@intel.com> X-Mailer: git-send-email 2.27.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Cc: Liming Gao Signed-off-by: Yuwei Chen --- 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