Felix Held submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Raul Rangel: Looks good to me, approved
soc/amd/stoneyridge/acpi: generate PPKG object in generate_cpu_entries

Generate the PPKG object in the generate_cpu_entries function instead of
generating the PCNT object that is the used in the PPKG method in
cpu.asl to provide the PPKG object. This both simplifies the code and
aligns Stoneyridge with the other AMD SoCs. This will also make the code
behave correctly in a case where the number of CPU cores/threads isn't a
power of two.

TEST=None, but equivalent change on Picasso was verified to not break
anything on Mandolin.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ib42d718102151a72a5fe812e83eb2eb4f9e7b611
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62539
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
---
M src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/thermal.asl
M src/soc/amd/stoneyridge/acpi.c
M src/soc/amd/stoneyridge/acpi/cpu.asl
3 files changed, 3 insertions(+), 42 deletions(-)

diff --git a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/thermal.asl b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/thermal.asl
index 2930def..6f62aef 100644
--- a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/thermal.asl
+++ b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/thermal.asl
@@ -2,6 +2,8 @@

#include <variant/thermal.h>

+External (\PPKG, MethodObj)
+
/* Thermal Zone */

Scope (\_TZ)
diff --git a/src/soc/amd/stoneyridge/acpi.c b/src/soc/amd/stoneyridge/acpi.c
index 4c3b625..0a67088 100644
--- a/src/soc/amd/stoneyridge/acpi.c
+++ b/src/soc/amd/stoneyridge/acpi.c
@@ -151,7 +151,5 @@
acpigen_pop_len();
}

- acpigen_write_scope("\\");
- acpigen_write_name_integer("PCNT", cores);
- acpigen_pop_len();
+ acpigen_write_processor_package("PPKG", 0, cores);
}
diff --git a/src/soc/amd/stoneyridge/acpi/cpu.asl b/src/soc/amd/stoneyridge/acpi/cpu.asl
index 24b81a1..818bcdb 100644
--- a/src/soc/amd/stoneyridge/acpi/cpu.asl
+++ b/src/soc/amd/stoneyridge/acpi/cpu.asl
@@ -4,42 +4,3 @@
Method (PNOT)
{
}
-
-/*
- * Processor Object
- */
-/* These devices are created at runtime */
-External (\PCNT, IntObj)
-External (\_SB.P000, DeviceObj)
-External (\_SB.P001, DeviceObj)
-External (\_SB.P002, DeviceObj)
-External (\_SB.P003, DeviceObj)
-External (\_SB.P004, DeviceObj)
-External (\_SB.P005, DeviceObj)
-External (\_SB.P006, DeviceObj)
-External (\_SB.P007, DeviceObj)
-
-/* Return a package containing enabled processor entries */
-Method (PPKG)
-{
- If (\PCNT >= 4) {
- Return (Package ()
- {
- \_SB.P000,
- \_SB.P001,
- \_SB.P002,
- \_SB.P003
- })
- } ElseIf (\PCNT>= 2) {
- Return (Package ()
- {
- \_SB.P000,
- \_SB.P001
- })
- } Else {
- Return (Package ()
- {
- \_SB.P000
- })
- }
-}

To view, visit change 62539. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib42d718102151a72a5fe812e83eb2eb4f9e7b611
Gerrit-Change-Number: 62539
Gerrit-PatchSet: 3
Gerrit-Owner: Felix Held <felix-coreboot@felixheld.de>
Gerrit-Reviewer: Felix Held <felix-coreboot@felixheld.de>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd@gmail.com>
Gerrit-Reviewer: Raul Rangel <rrangel@chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged