amd/stoneyridge: Change ACPI _PR.CPxx to _PR.Pxxx

This is a bug introduced by this commit:
stoneyridge: Fix CPU ASL \_PR table [commit I870f81]

The following error is found in dmesg

 ACPI Error: [\_PR_.P000] Namespace lookup failure, AE_NOT_FOUND...
 ACPI Exception: AE_NOT_FOUND, During name lookup/catalog...
 ACPI Exception: AE_NOT_FOUND, (SSDT:AGESA   ) while loading table...
 ACPI Error: 1 table load failures, 3 successful...
 ...
 acpi-cpufreq: overriding BIOS provided _PSD data

And, "ls -la /sys/devices/system/cpu/cpufreq/" doesn't work

The cause is that the Pstate SSDT table generated by AGESA expects CPU
variables \_PR.Pxxx, not \_PR.CPxx as generated by coreboot.
Use Kconfig to set the required string.

BRANCH=none
BUG=b:64885241
TEST= Check dmeg and ls -la /sys/devices/system/cpu/cpufreq/

Change-Id: I4929f9a1c39705c6df9d965c8d030f4d1f0b5e5f
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/21165
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Marc Jones 2017-08-23 16:28:02 -06:00 committed by Martin Roth
parent 7a2d4ea4ee
commit e013df9a67
2 changed files with 6 additions and 3 deletions

View File

@ -292,4 +292,8 @@ config SMM_TSEG_SIZE
default 0x800000 if HAVE_SMI_HANDLER default 0x800000 if HAVE_SMI_HANDLER
default 0x0 default 0x0
config ACPI_CPU_STRING
string
default "\\_PR.P%03d"
endif # SOC_AMD_STONEYRIDGE_FP4 || SOC_AMD_STONEYRIDGE_FT4 endif # SOC_AMD_STONEYRIDGE_FP4 || SOC_AMD_STONEYRIDGE_FT4

View File

@ -244,12 +244,11 @@ void generate_cpu_entries(device_t device)
printk(BIOS_DEBUG, "ACPI \\_PR report %d core(s)\n", cores); printk(BIOS_DEBUG, "ACPI \\_PR report %d core(s)\n", cores);
/* Generate BSP \_PR.P000 */
/* Generate BSP \_PR.CPU0 */
acpigen_write_processor(0, pcontrol_blk, plen); acpigen_write_processor(0, pcontrol_blk, plen);
acpigen_pop_len(); acpigen_pop_len();
/* Generate AP \_PR.CPUx */ /* Generate AP \_PR.Pxxx */
pcontrol_blk = 0; pcontrol_blk = 0;
plen = 0; plen = 0;
for (cpu = 1; cpu < cores; cpu++) { for (cpu = 1; cpu < cores; cpu++) {