summaryrefslogtreecommitdiff
path: root/src/acpi/acpigen.c
diff options
context:
space:
mode:
authorMichael Niewöhner <foss@mniewoehner.de>2020-10-14 19:30:46 +0200
committerPatrick Georgi <pgeorgi@google.com>2020-11-04 09:40:21 +0000
commitb20aac072144e650dd5ba93bb4bfce1e061732e8 (patch)
tree491b897f311f4057f898b0eac1f7ee146ca1c544 /src/acpi/acpigen.c
parent9e20e2f1587b4bba2db41a8279e070eac6ddd92b (diff)
soc/intel/skl,acpi/acpigen: convert global CPPC package to local one
Move the global CPPC package \GCPC to the first logical core CP00 and adapt the reference in the other cores. This is cleaner and avoids confusion. Test: dumped SSDT on Supermicro X11SSM-F and verified decompiled version Change-Id: I40b9fd644622196da434128895eb6fb96fdf254d Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46465 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/acpi/acpigen.c')
-rw-r--r--src/acpi/acpigen.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/acpi/acpigen.c b/src/acpi/acpigen.c
index 7b7258469f..4a7dfc9325 100644
--- a/src/acpi/acpigen.c
+++ b/src/acpi/acpigen.c
@@ -10,6 +10,8 @@
#define ACPIGEN_MAXLEN 0xfffff
+#define CPPC_PACKAGE_NAME "GCPC"
+
#include <lib.h>
#include <string.h>
#include <acpi/acpigen.h>
@@ -1578,8 +1580,6 @@ void acpigen_write_dsm_uuid_arr(struct dsm_uuid *ids, size_t count)
acpigen_pop_len(); /* Method _DSM */
}
-#define CPPC_PACKAGE_NAME "\\GCPC"
-
void acpigen_write_CPPC_package(const struct cppc_config *config)
{
u32 i;
@@ -1621,9 +1621,12 @@ void acpigen_write_CPPC_package(const struct cppc_config *config)
void acpigen_write_CPPC_method(void)
{
+ char pscope[16];
+ snprintf(pscope, sizeof(pscope), CONFIG_ACPI_CPU_STRING "." CPPC_PACKAGE_NAME, 0);
+
acpigen_write_method("_CPC", 0);
acpigen_emit_byte(RETURN_OP);
- acpigen_emit_namestring(CPPC_PACKAGE_NAME);
+ acpigen_emit_namestring(pscope);
acpigen_pop_len();
}