From: Pierre Gondois <pierre.gond...@arm.com>

The _STA object is defined in ACPI 6.4, s6.3.7 "_STA (Device Status)"
and describes the status of a device. Add this method for the
generated processor devices.
To be coherent with the GicC flags available in s5.2.12.14 "GIC CPU
Interface (GICC) Structure", flip the _STA 'device enable' bit
according to the GicC 'Enabled' bit flag.

Signed-off-by: Pierre Gondois <pierre.gond...@arm.com>
---
 .../SsdtCpuTopologyGenerator.c                | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git 
a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c
 
b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c
index 3266d8dd9892..d601f8e2190f 100644
--- 
a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c
+++ 
b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c
@@ -1,7 +1,7 @@
 /** @file
   SSDT Cpu Topology Table Generator.
 
-  Copyright (c) 2021, Arm Limited. All rights reserved.<BR>
+  Copyright (c) 2021 - 2022, Arm Limited. All rights reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
   @par Reference(s):
@@ -477,6 +477,7 @@ CreateAmlCpu (
   EFI_STATUS              Status;
   AML_OBJECT_NODE_HANDLE  CpuNode;
   CHAR8                   AslName[AML_NAME_SEG_SIZE + 1];
+  BOOLEAN                 CpuEnabled;
 
   ASSERT (Generator != NULL);
   ASSERT (ParentNode != NULL);
@@ -516,6 +517,22 @@ CreateAmlCpu (
     return Status;
   }
 
+  CpuEnabled = ((GicCInfo->Flags & EFI_ACPI_6_2_GIC_ENABLED) != 0);
+
+  Status = AmlCodeGenMethodRetInteger (
+             "_STA",
+             CpuEnabled ? 0xF : 0xD,
+             0,
+             FALSE,
+             0,
+             CpuNode,
+             NULL
+             );
+  if (EFI_ERROR (Status)) {
+    ASSERT (0);
+    return Status;
+  }
+
   // If requested, return the handle to the CpuNode.
   if (CpuNodePtr != NULL) {
     *CpuNodePtr = CpuNode;
-- 
2.25.1



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


Reply via email to