public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "PierreGondois" <pierre.gondois@arm.com>
To: "levi.yun" <yeoreum.yun@arm.com>, 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
Subject: Re: [edk2-devel] [PATCH] Basetools: Include PCD declarations from Library Instance
Date: Tue, 17 Oct 2023 10:46:32 +0200	[thread overview]
Message-ID: <b5ac9935-2f99-4261-93c6-5bb6f8bee135@arm.com> (raw)
In-Reply-To: <20231012171155.3262128-1-yeoreum.yun@arm.com>

Hello,
FYIW:
Tested-by: Pierre Gondois <pierre.gondois@arm.com>

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
> 
> This change was done as part of making the StandaloneMmCpu driver
> architecture independent.
> 
> 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.
> 
> An example of this issue can be seen when building
> edk2-platforms/Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc
> 
> $ build -a AARCH64 -t GCC -p Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc
> build.py...
> /mnt/source/edk2-platforms/Platform/ARM/SgiPkg/PlatformStandaloneMm.fdf(23):
>    error F001: PCD (gArmTokenSpaceGuid.PcdFdBaseAddress) used in
>    FDF is not declared in DEC files.
> 
> 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.
> 
> The build system only includes the PCD declarations from DEC files
> that are specified in INF files for Modules (components).
> 
> Therefore, extend the build system to include the Packages from
> Library Instances so that the PCD declarations from the respective package
> DEC files are included.
> 
> This patch can be seen on
>      https://github.com/LeviYeoReum/edk2/tree/levi/2848_dec_check_on_library
> 
> Signed-off-by: levi.yun <yeoreum.yun@arm.com>
> ---
>   BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
> index f86c749c08c3bb2837a88b5872101bc69e8bf7a0..f52ef42045da52c3d4f20277c61542f659eb7874 100644
> --- a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
> +++ b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
> @@ -439,6 +439,10 @@ class WorkspaceAutoGen(AutoGen):
>               PkgSet = set()
>               for mb in [self.BuildDatabase[m, Arch, self.BuildTarget, self.ToolChain] for m in Platform.Modules]:
>                   PkgSet.update(mb.Packages)
> +
> +            for lb in [self.BuildDatabase[l, Arch, self.BuildTarget, self.ToolChain] for l in Platform.LibraryInstances]:
> +                PkgSet.update(lb.Packages)
> +
>               for Inf in ModuleList:
>                   ModuleFile = PathClass(NormPath(Inf), GlobalData.gWorkspace, Arch)
>                   if ModuleFile in Platform.Modules:
> @@ -968,4 +972,3 @@ class WorkspaceAutoGen(AutoGen):
>       #
>       def CreateAsBuiltInf(self):
>           return
> -
> --
> Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")


-=-=-=-=-=-=-=-=-=-=-=-
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]
-=-=-=-=-=-=-=-=-=-=-=-



  parent reply	other threads:[~2023-10-17  8:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-12 17:11 [edk2-devel] [PATCH] Basetools: Include PCD declarations from Library Instance levi.yun
2023-10-13  7:37 ` Sami Mujawar
2023-10-23  8:00   ` Sami Mujawar
2023-10-17  8:46 ` PierreGondois [this message]
2023-10-25 18:53 ` Rebecca Cran
2024-01-26  9:35   ` Sami Mujawar
2024-01-26 10:12     ` Sami Mujawar
2024-01-26 19:49       ` Michael D Kinney
2024-02-04 12:42         ` Rebecca Cran
2024-02-08 23:54           ` Rebecca Cran
2024-01-30 21:07       ` Rebecca Cran
2024-01-26 10:06 ` Sami Mujawar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b5ac9935-2f99-4261-93c6-5bb6f8bee135@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox