soc/amd/picasso/acpi: use acpigen_write_processor_device
In CB:71614 Kyösti pointed out that ACPI_GPE0_BLK is the wrong address to assign to proc_blk_addr; the correct one would be ACPI_CPU_CONTROL. When looking a bit closer into this, it turned out that acpigen_write_processor is generating deprecated AML opcodes, so replace the acpigen_write_processor call with a call to the newly added acpigen_write_processor_device function that also doesn't have the proc_blk_addr and proc_blk_len parameters. The information about the IO port for entering C-states is already written into an SSDT by acpigen_write_CST_package which is likely also the reason why the wrong proc_blk_addr value wasn't noticed for a very long time. TEST=Mandolin still boots Ubuntu 22.04 LTS and Windows 10 and no possibly related errors show up. Linux gets the expected C-state information from the _CST package inside the processor device scope. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Ie67416e19e431029dd12da66ad44ddfa8586df03 Reviewed-on: https://review.coreboot.org/c/coreboot/+/72490 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>
This commit is contained in:
parent
32bba1877b
commit
281be57a55
|
@ -237,10 +237,10 @@ static size_t get_pstate_info(struct acpi_sw_pstate *pstate_values,
|
||||||
void generate_cpu_entries(const struct device *device)
|
void generate_cpu_entries(const struct device *device)
|
||||||
{
|
{
|
||||||
int logical_cores;
|
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_sw_pstate pstate_values[MAX_PSTATES] = { {0} };
|
||||||
struct acpi_xpss_sw_pstate pstate_xpss_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 =
|
uint32_t cstate_base_address =
|
||||||
rdmsr(MSR_CSTATE_ADDRESS).lo & MSR_CSTATE_ADDRESS_MASK;
|
rdmsr(MSR_CSTATE_ADDRESS).lo & MSR_CSTATE_ADDRESS_MASK;
|
||||||
|
|
||||||
|
@ -288,18 +288,7 @@ void generate_cpu_entries(const struct device *device)
|
||||||
logical_cores = get_cpu_count();
|
logical_cores = get_cpu_count();
|
||||||
|
|
||||||
for (cpu = 0; cpu < logical_cores; cpu++) {
|
for (cpu = 0; cpu < logical_cores; cpu++) {
|
||||||
|
acpigen_write_processor_device(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_pct_package(&perf_ctrl, &perf_sts);
|
acpigen_write_pct_package(&perf_ctrl, &perf_sts);
|
||||||
|
|
||||||
|
@ -320,7 +309,7 @@ void generate_cpu_entries(const struct device *device)
|
||||||
acpigen_write_CSD_package(cpu / threads_per_core, threads_per_core,
|
acpigen_write_CSD_package(cpu / threads_per_core, threads_per_core,
|
||||||
CSD_HW_ALL, 0);
|
CSD_HW_ALL, 0);
|
||||||
|
|
||||||
acpigen_pop_len();
|
acpigen_write_processor_device_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
acpigen_write_processor_package("PPKG", 0, logical_cores);
|
acpigen_write_processor_package("PPKG", 0, logical_cores);
|
||||||
|
|
Loading…
Reference in New Issue