public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "PierreGondois" <pierre.gondois@arm.com>
To: Jeshua Smith <jeshuas@nvidia.com>, devel@edk2.groups.io
Cc: ardb+tianocore@kernel.org, quic_llindhol@quicinc.com,
	Sami.Mujawar@arm.com, sdonthineni@nvidia.com, vsethi@nvidia.com,
	Ashish Singhal <ashishsingha@nvidia.com>
Subject: Re: [edk2-devel] [PATCH] DynamicTablesPkg/SSDT: Remove incorrect root node check
Date: Tue, 9 Jan 2024 09:22:14 +0100	[thread overview]
Message-ID: <d830839a-434f-40ce-8af4-6217539a399f@arm.com> (raw)
In-Reply-To: <d54a9445e3ae18a297170e3dcbafef5143624f20.1704735621.git.jeshuas@nvidia.com>

Hello Jeshua,

On 1/8/24 19:12, Jeshua Smith wrote:
> The code was incorrectly assuming that root nodes had to be physical
> package nodes and vice versa. This is not always true, so the check
> is being removed.

Does it mean that you have a topology where the top-level node is not
a physical package ? If yes, does it also mean that multiple physical
packages share a resource (which belong to the top-level node) ?

It is correct that the check is a bit stronger than what the specification
states, but it was handling all topologies so far, so would it be possible
to describe the topology that you have ?

Regards,
Pierre

> 
> Signed-off-by: Jeshua Smith <jeshuas@nvidia.com>
> Tested-by: Ashish Singhal <ashishsingha@nvidia.com>
> Reviewed-by: Ashish Singhal <ashishsingha@nvidia.com>
> ---
>   .../SsdtCpuTopologyGenerator.c                | 23 ++++---------------
>   1 file changed, 5 insertions(+), 18 deletions(-)
> 
> diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c
> index 724f33c660..4ad9508f57 100644
> --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c
> +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c
> @@ -983,7 +983,6 @@ CreateAmlProcessorContainer (
>     @param [in]  NodeFlags        Flags of the ProcNode to check.
>     @param [in]  IsLeaf           The ProcNode is a leaf.
>     @param [in]  NodeToken        NodeToken of the ProcNode.
> -  @param [in]  ParentNodeToken  Parent NodeToken of the ProcNode.
>   
>     @retval EFI_SUCCESS             Success.
>     @retval EFI_INVALID_PARAMETER   Invalid parameter.
> @@ -994,26 +993,16 @@ EFIAPI
>   CheckProcNode (
>     UINT32           NodeFlags,
>     BOOLEAN          IsLeaf,
> -  CM_OBJECT_TOKEN  NodeToken,
> -  CM_OBJECT_TOKEN  ParentNodeToken
> +  CM_OBJECT_TOKEN  NodeToken
>     )
>   {
>     BOOLEAN  InvalidFlags;
> -  BOOLEAN  HasPhysicalPackageBit;
> -  BOOLEAN  IsTopLevelNode;
> -
> -  HasPhysicalPackageBit = (NodeFlags & EFI_ACPI_6_3_PPTT_PACKAGE_PHYSICAL) ==
> -                          EFI_ACPI_6_3_PPTT_PACKAGE_PHYSICAL;
> -  IsTopLevelNode = (ParentNodeToken == CM_NULL_TOKEN);
> -
> -  // A top-level node is a Physical Package and conversely.
> -  InvalidFlags = HasPhysicalPackageBit ^ IsTopLevelNode;
>   
>     // Check Leaf specific flags.
>     if (IsLeaf) {
> -    InvalidFlags |= ((NodeFlags & PPTT_LEAF_MASK) != PPTT_LEAF_MASK);
> +    InvalidFlags = ((NodeFlags & PPTT_LEAF_MASK) != PPTT_LEAF_MASK);
>     } else {
> -    InvalidFlags |= ((NodeFlags & PPTT_LEAF_MASK) != 0);
> +    InvalidFlags = ((NodeFlags & PPTT_LEAF_MASK) != 0);
>     }
>   
>     if (InvalidFlags) {
> @@ -1086,8 +1075,7 @@ CreateAmlCpuTopologyTree (
>           Status = CheckProcNode (
>                      Generator->ProcNodeList[Index].Flags,
>                      TRUE,
> -                   Generator->ProcNodeList[Index].Token,
> -                   NodeToken
> +                   Generator->ProcNodeList[Index].Token
>                      );
>           if (EFI_ERROR (Status)) {
>             ASSERT (0);
> @@ -1119,8 +1107,7 @@ CreateAmlCpuTopologyTree (
>           Status = CheckProcNode (
>                      Generator->ProcNodeList[Index].Flags,
>                      FALSE,
> -                   Generator->ProcNodeList[Index].Token,
> -                   NodeToken
> +                   Generator->ProcNodeList[Index].Token
>                      );
>           if (EFI_ERROR (Status)) {
>             ASSERT (0);


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#113429): https://edk2.groups.io/g/devel/message/113429
Mute This Topic: https://groups.io/mt/103603398/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-01-09  8:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-08 18:12 [edk2-devel] [PATCH] DynamicTablesPkg/SSDT: Remove incorrect root node check Jeshua Smith via groups.io
2024-01-09  8:22 ` PierreGondois [this message]
2024-01-09 15:47   ` Jeshua Smith via groups.io
2024-01-09 16:15     ` PierreGondois
2024-01-09 16:55       ` Jeshua Smith via groups.io
2024-01-15 11:41         ` PierreGondois

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=d830839a-434f-40ce-8af4-6217539a399f@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