From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 49691AC0D24 for ; Tue, 17 Oct 2023 08:46:53 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=8gWgb3SMG4raDTWZheWDQF5cKfrmlxJJVjE/x8HiTFo=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1697532411; v=1; b=uNV8pRUJzkOfpMUSDIyblkcrkas5sbWgGJHmWd2jdWhh6zvN4Nqpj2+PYTEBbpSVNPSyk8lw VQx3lely8Lh/dEjHI3zPSBttvnF86yz8wAN/CmACcdQjX6KM91S5zJ+2U6OQocULRKSDtfsZT90 dhGkUtwe9Hnt7rfbDgUl+4mo= X-Received: by 127.0.0.2 with SMTP id 54SOYY7687511xrbj9WeKkhQ; Tue, 17 Oct 2023 01:46:51 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.203061.1697532411030253018 for ; Tue, 17 Oct 2023 01:46:51 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1A3722F4; Tue, 17 Oct 2023 01:47:31 -0700 (PDT) X-Received: from [10.34.100.125] (e126645.nice.arm.com [10.34.100.125]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 39E533F762; Tue, 17 Oct 2023 01:46:49 -0700 (PDT) Message-ID: Date: Tue, 17 Oct 2023 10:46:32 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH] Basetools: Include PCD declarations from Library Instance To: "levi.yun" , devel@edk2.groups.io Cc: sami.mujawar@arm.com, ardb+tianocore@kernel.org, quic_llindhol@quicinc.com, rebecca@bsdio.com, gaoliming@byosoft.com.cn, bob.c.feng@intel.com, yuwei.chen@intel.com, nd@arm.com References: <20231012171155.3262128-1-yeoreum.yun@arm.com> From: "PierreGondois" In-Reply-To: <20231012171155.3262128-1-yeoreum.yun@arm.com> Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: SrWVP4XW3JydlSLcdNIahmrQx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=uNV8pRUJ; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Hello, FYIW: Tested-by: Pierre Gondois On 10/12/23 19:11, levi.yun wrote: > The patch "[PATCH v3 1/2] StandaloneMmPkg: Make StandaloneMmCpu driver > architecture independent" (https://edk2.groups.io/g/devel/message/109178) > removed ArmPkg/ArmPkg.dec from the Packages section in the > INF file: StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf >=20 > This change was done as part of making the StandaloneMmCpu driver > architecture independent. >=20 > Although this change is correct, it results in a side effect > here some platforms that utilise PCDs declared in ArmPkg.dec are > no longer declared. >=20 > An example of this issue can be seen when building > edk2-platforms/Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc >=20 > $ build -a AARCH64 -t GCC -p Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc > build.py... > /mnt/source/edk2-platforms/Platform/ARM/SgiPkg/PlatformStandaloneMm.fdf(2= 3): > error F001: PCD (gArmTokenSpaceGuid.PcdFdBaseAddress) used in > FDF is not declared in DEC files. >=20 > As seen above, removing ArmPkg.dec from the Packages section in the > StandAloneMmCpu Driver Inf file triggers build failure. > Although, ArmPkg.dec is included in other Library Instances, > the build system does not include the declarations from > .dec files defined in Library instances. >=20 > The build system only includes the PCD declarations from DEC files > that are specified in INF files for Modules (components). >=20 > Therefore, extend the build system to include the Packages from > Library Instances so that the PCD declarations from the respective packag= e > DEC files are included. >=20 > This patch can be seen on > https://github.com/LeviYeoReum/edk2/tree/levi/2848_dec_check_on_libr= ary >=20 > Signed-off-by: levi.yun > --- > BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) >=20 > diff --git a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py b/BaseTo= ols/Source/Python/AutoGen/WorkspaceAutoGen.py > index f86c749c08c3bb2837a88b5872101bc69e8bf7a0..f52ef42045da52c3d4f20277c= 61542f659eb7874 100644 > --- a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py > +++ b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py > @@ -439,6 +439,10 @@ class WorkspaceAutoGen(AutoGen): > PkgSet =3D set() > for mb in [self.BuildDatabase[m, Arch, self.BuildTarget, se= lf.ToolChain] for m in Platform.Modules]: > PkgSet.update(mb.Packages) > + > + for lb in [self.BuildDatabase[l, Arch, self.BuildTarget, sel= f.ToolChain] for l in Platform.LibraryInstances]: > + PkgSet.update(lb.Packages) > + > for Inf in ModuleList: > ModuleFile =3D PathClass(NormPath(Inf), GlobalData.gWor= kspace, Arch) > if ModuleFile in Platform.Modules: > @@ -968,4 +972,3 @@ class WorkspaceAutoGen(AutoGen): > # > def CreateAsBuiltInf(self): > return > - > -- > Guid("CE165669-3EF3-493F-B85D-6190EE5B9759") -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109666): https://edk2.groups.io/g/devel/message/109666 Mute This Topic: https://groups.io/mt/101922917/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-