________________________________
From: Leif Lindholm <quic_llind...@quicinc.com>
Sent: Wednesday, November 15, 2023 9:21 AM
To: Ashish Singhal <ashishsin...@nvidia.com>
Cc: devel@edk2.groups.io <devel@edk2.groups.io>; ardb+tianoc...@kernel.org 
<ardb+tianoc...@kernel.org>; sami.muja...@arm.com <sami.muja...@arm.com>; Jeff 
Brasen <jbra...@nvidia.com>
Subject: Re: [PATCH] DynamicTablesPkg: Fix ETE _UID Creation

External email: Use caution opening links or attachments


On Tue, Nov 14, 2023 at 20:19:04 -0700, Ashish Singhal wrote:
> Just like CPU _UID, ETE UID also needs to be unique so
> use AcpiProcessorUid instead of CpuName
>
> Signed-off-by: Ashish Singhal <ashishsin...@nvidia.com>
> ---
>  .../Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git 
> a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c
>  
> b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c
> index 8228c7845a..724f33c660 100644
> --- 
> a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c
> +++ 
> b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c
> @@ -359,6 +359,7 @@ CreateAmlCpcNode (
>
>    @param [in]  Generator    The SSDT Cpu Topology generator.
>    @param [in]  ParentNode   Parent node to attach the Cpu node to.
> +  @param [in]  GicCInfo     CM_ARM_GICC_INFO object used to create the node.
>    @param [in]  CpuName      Value used to generate the node name.

Can that replace both uses of CpuName in the function (so it can be
dropped), or does

  Status = WriteAslName ('E', CpuName, AslName);

have other requirements?

/
    Leif

Hello Leif,

CPU Name can be more logical, and you may have the same CPU name in different 
clusters for example. _UID however needs to be unique.

Thanks
Ashish

>    @param [out] EtNodePtr   If not NULL, return the created Cpu node.
>
> @@ -372,6 +373,7 @@ EFIAPI
>  CreateAmlEtd (
>    IN   ACPI_CPU_TOPOLOGY_GENERATOR  *Generator,
>    IN   AML_NODE_HANDLE              ParentNode,
> +  IN   CM_ARM_GICC_INFO             *GicCInfo,
>    IN   UINT32                       CpuName,
>    OUT  AML_OBJECT_NODE_HANDLE       *EtNodePtr OPTIONAL
>    )
> @@ -397,7 +399,7 @@ CreateAmlEtd (
>
>    Status = AmlCodeGenNameInteger (
>               "_UID",
> -             CpuName,
> +             GicCInfo->AcpiProcessorUid,
>               EtNode,
>               NULL
>               );
> @@ -474,6 +476,7 @@ CreateAmlEtNode (
>    Status = CreateAmlEtd (
>               Generator,
>               Node,
> +             GicCInfo,
>               CpuName,
>               NULL
>               );
> --
> 2.17.1
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111280): https://edk2.groups.io/g/devel/message/111280
Mute This Topic: https://groups.io/mt/102598848/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to