From: "PierreGondois" <pierre.gondois@arm.com>
To: devel@edk2.groups.io
Cc: Sami Mujawar <sami.mujawar@arm.com>,
Alexei Fedorov <Alexei.Fedorov@arm.com>,
Nishant.Sharma@arm.com
Subject: [PATCH 1/1] DynamicTablesPkg: SsdtCpuTopology: Generate _STA method for processors
Date: Mon, 22 Aug 2022 15:32:09 +0200 [thread overview]
Message-ID: <20220822133209.611030-1-Pierre.Gondois@arm.com> (raw)
From: Pierre Gondois <pierre.gondois@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.gondois@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
reply other threads:[~2022-08-22 13:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220822133209.611030-1-Pierre.Gondois@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