From nobody Sun Apr 28 12:59:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1529919770775203.1907474889823; Mon, 25 Jun 2018 02:42:50 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A27E2207DF29D; Mon, 25 Jun 2018 02:42:49 -0700 (PDT) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B0763202E533C for ; Mon, 25 Jun 2018 02:42:48 -0700 (PDT) Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jun 2018 02:42:48 -0700 Received: from shwdeopenpsi105.ccr.corp.intel.com ([10.239.9.110]) by fmsmga007.fm.intel.com with ESMTP; 25 Jun 2018 02:42:47 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,269,1526367600"; d="scan'208";a="49681281" From: BobCF To: edk2-devel@lists.01.org Date: Mon, 25 Jun 2018 17:42:43 +0800 Message-Id: <20180625094243.203044-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 Subject: [edk2] [Patch] BaseTools: Structure pcd value assignment X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Enable Structure pcd value assigned by FixedPcd Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng Cc: Liming Gao --- .../Source/Python/Workspace/MetaFileParser.py | 23 +++++++++++++++---= ---- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTool= s/Source/Python/Workspace/MetaFileParser.py index 88c7bb374c..ac08f39c30 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -1609,17 +1609,26 @@ class DscParser(MetaFileParser): ValList, Valid, Index =3D AnalyzeDscPcd(self._ValueList[2], self._= ItemType) if not Valid: EdkLogger.error('build', FORMAT_INVALID, "Pcd format incorrect= .", File=3Dself._FileWithError, Line=3Dself._LineIndex + 1, ExtraData=3D"%s.%s|%s" % (self._ValueList[0], = self._ValueList[1], self._ValueList[2])) PcdValue =3D ValList[Index] - if PcdValue and "." not in self._ValueList[0]: - try: - ValList[Index] =3D ValueExpression(PcdValue, self._Macros)= (True) - except WrnExpression, Value: - ValList[Index] =3D Value.result - except: - pass + if PcdValue: + if "." not in self._ValueList[0]: + try: + ValList[Index] =3D ValueExpression(PcdValue, self._Mac= ros)(True) + except WrnExpression, Value: + ValList[Index] =3D Value.result + except: + pass + else: + if PcdValue in self._Macros: + try: + ValList[Index] =3D ValueExpression(PcdValue, self.= _Macros)(True) + except WrnExpression, Value: + ValList[Index] =3D Value.result + except: + pass =20 if ValList[Index] =3D=3D 'True': ValList[Index] =3D '1' if ValList[Index] =3D=3D 'False': ValList[Index] =3D '0' --=20 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel