From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 2730E20985981 for ; Sun, 20 May 2018 05:55:05 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 May 2018 05:55:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,423,1520924400"; d="scan'208";a="42417446" Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.129]) by orsmga007.jf.intel.com with ESMTP; 20 May 2018 05:55:03 -0700 From: Yonghong Zhu To: edk2-devel@lists.01.org Cc: Yunhua Feng , Liming Gao Date: Sun, 20 May 2018 20:54:58 +0800 Message-Id: <1526820898-38844-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [Patch] BaseTools: Fix bug PCD type in component is not same with Pcd section 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: , X-List-Received-Date: Sun, 20 May 2018 12:55:05 -0000 From: Yunhua Feng Per DSC spec 3.11 [Components] Sections: The PCD access methods (and storage methods) are selected on a platform basis - it is not permitted to have a PCD listed in one of the Pcd sections and use it differently in an individual module. For example, if a PCD is listed in a [PcdsFixedAtBuild] section, it is not permitted to list it in a sub-section of an INF file. but current code doesn't report error for this case. Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=951 Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng --- BaseTools/Source/Python/AutoGen/AutoGen.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 54f6b1f..f29df21 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -419,17 +419,19 @@ class WorkspaceAutoGen(AutoGen): if BuildData.Pcds[key].Pending: if key in Platform.Pcds: PcdInPlatform = Platform.Pcds[key] if PcdInPlatform.Type: BuildData.Pcds[key].Type = PcdInPlatform.Type + BuildData.Pcds[key].Pending = False if BuildData.MetaFile in Platform.Modules: PlatformModule = Platform.Modules[str(BuildData.MetaFile)] if key in PlatformModule.Pcds: PcdInPlatform = PlatformModule.Pcds[key] if PcdInPlatform.Type: BuildData.Pcds[key].Type = PcdInPlatform.Type + BuildData.Pcds[key].Pending = False if TAB_PCDS_DYNAMIC_EX in BuildData.Pcds[key].Type: if BuildData.IsBinaryModule: BinaryPcdDict[TAB_PCDS_DYNAMIC_EX].add((BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName)) else: -- 2.6.1.windows.1