summaryrefslogtreecommitdiffstats
path: root/src/acpi/acpigen.c
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2023-01-28 03:37:21 +0100
committerFelix Held <felix-coreboot@felixheld.de>2023-01-31 17:35:42 +0000
commit32bba1877ba6d248406a56cd97dce777d499aaa6 (patch)
treec1a34569c899e3288dd0bdf44990ef77af983d9c /src/acpi/acpigen.c
parent501f2f9cbc8742e6e819f3be36e2e718896eee3e (diff)
downloadcoreboot-32bba1877ba6d248406a56cd97dce777d499aaa6.tar.gz
coreboot-32bba1877ba6d248406a56cd97dce777d499aaa6.tar.bz2
coreboot-32bba1877ba6d248406a56cd97dce777d499aaa6.zip
acpi/acpigen: introduce acpigen_write_processor_device
The ACPI PROCESSOR_OP has been deprecated in ACPI 6.0 and dropped in ACPI 6.4 and is now permanently reserved. As a replacement, DEVICE_OP with the special HID ACPI0007 should be used instead. This special HID was introduced in version 3 of the ACPI spec. To have a function to generate this, acpigen_write_processor_device is introduced. The CPU index is used as UID which can be assumed to be unique. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Ifb0da903a972be134bb3b9071f81b441f60917d1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/72469 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/acpi/acpigen.c')
-rw-r--r--src/acpi/acpigen.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/acpi/acpigen.c b/src/acpi/acpigen.c
index b8f1dfbb9cb7..305cddb0f02e 100644
--- a/src/acpi/acpigen.c
+++ b/src/acpi/acpigen.c
@@ -409,6 +409,15 @@ void acpigen_write_processor(u8 cpuindex, u32 pblock_addr, u8 pblock_len)
acpigen_emit_byte(pblock_len);
}
+void acpigen_write_processor_device(unsigned int cpu_index)
+{
+ acpigen_emit_ext_op(DEVICE_OP);
+ acpigen_write_len_f();
+ acpigen_write_processor_namestring(cpu_index);
+ acpigen_write_name_string("_HID", "ACPI0007");
+ acpigen_write_name_integer("_UID", cpu_index);
+}
+
void acpigen_write_processor_package(const char *const name, const unsigned int first_core,
const unsigned int core_count)
{