public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH] DynamicTablesPkg/SSDT: Remove incorrect root node check
@ 2024-01-08 18:12 Jeshua Smith via groups.io
  2024-01-09  8:22 ` PierreGondois
  0 siblings, 1 reply; 6+ messages in thread
From: Jeshua Smith via groups.io @ 2024-01-08 18:12 UTC (permalink / raw)
  To: devel
  Cc: ardb+tianocore, quic_llindhol, pierre.gondois, Sami.Mujawar,
	sdonthineni, vsethi, Jeshua Smith, Ashish Singhal

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.

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);
-- 
2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#113407): https://edk2.groups.io/g/devel/message/113407
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]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-01-16  6:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox