summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2023-01-28 04:15:57 +0100
committerFelix Held <felix-coreboot@felixheld.de>2023-01-31 17:36:07 +0000
commitc3fec864b658ae26ff3518b523ed02f8bc1cae29 (patch)
treebc3c4cb9cb1d618c0471a123e3ad9399357cb565 /src/soc
parent281be57a558ba7db8d69d2570d53ea5522960ca5 (diff)
soc/amd/cezanne/acpi: use acpigen_write_processor_device
Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I77a91c0a6d937772bf25fa936cec8a710b9acf72 Reviewed-on: https://review.coreboot.org/c/coreboot/+/72491 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/amd/cezanne/acpi.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/soc/amd/cezanne/acpi.c b/src/soc/amd/cezanne/acpi.c
index 802476ec77..edf20c9b6f 100644
--- a/src/soc/amd/cezanne/acpi.c
+++ b/src/soc/amd/cezanne/acpi.c
@@ -229,10 +229,10 @@ static size_t get_pstate_info(struct acpi_sw_pstate *pstate_values,
void generate_cpu_entries(const struct device *device)
{
int logical_cores;
- size_t pstate_count, cpu, proc_blk_len;
+ size_t pstate_count, cpu;
struct acpi_sw_pstate pstate_values[MAX_PSTATES] = { {0} };
struct acpi_xpss_sw_pstate pstate_xpss_values[MAX_PSTATES] = { {0} };
- uint32_t threads_per_core, proc_blk_addr;
+ uint32_t threads_per_core;
uint32_t cstate_base_address =
rdmsr(MSR_CSTATE_ADDRESS).lo & MSR_CSTATE_ADDRESS_MASK;
@@ -293,18 +293,7 @@ void generate_cpu_entries(const struct device *device)
logical_cores = get_cpu_count();
for (cpu = 0; cpu < logical_cores; cpu++) {
-
- if (cpu == 0) {
- /* BSP values for \_SB.Pxxx */
- proc_blk_len = 6;
- proc_blk_addr = ACPI_GPE0_BLK;
- } else {
- /* AP values for \_SB.Pxxx */
- proc_blk_addr = 0;
- proc_blk_len = 0;
- }
-
- acpigen_write_processor(cpu, proc_blk_addr, proc_blk_len);
+ acpigen_write_processor_device(cpu);
acpigen_write_pct_package(&perf_ctrl, &perf_sts);
@@ -327,7 +316,7 @@ void generate_cpu_entries(const struct device *device)
generate_cppc_entries(cpu);
- acpigen_pop_len();
+ acpigen_write_processor_device_end();
}
acpigen_write_processor_package("PPKG", 0, logical_cores);