Paul Menzel (paulepanter@users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2189
-gerrit
commit b00a042319821812ee1e1e8b7f567caa218a4ccf Author: Paul Menzel paulepanter@users.sourceforge.net Date: Mon Jan 21 18:43:12 2013 +0100
AMD Fam14 boards: Set P_BLK length to 6 for all processors
Currently on for example on AMD Persimmon and ASRock E350M1 Linux complains, that the PBLK length is invalid [1].
ACPI: Invalid PBLK length [0]
Consequently, frequency scaling might not work correctly, though for these two boards it seems to work according to PowerTOP.
Indeed, according to the ACPI specification [2], setting PBlockLength to 0 is only allowed if there is no PBlockAddress. Otherwise it has to be set to 6.
18.5.93 Processor (Declare Processor)
[…]
PBlockAddress provides the system I/O address for the processors register block. Each processor can supply a different such address. PBlockLength is the length of the processor register block, in bytes and is either 0 (for no P_BLK) or 6. With one exception, all processors are required to have the same PBlockLength. The exception is that the boot processor can have a non-zero PBlockLength when all other processors have a zero PBlockLength. It is valid for every processor to have a PBlockLength of 0.
And that is exactly what Linux is checking in `drivers/acpi/processor_driver.c` [3].
static int acpi_processor_get_info(struct acpi_device *device) { […] /* * On some boxes several processors use the same processor bus id. * But they are located in different scope. For example: * _SB.SCK0.CPU0 * _SB.SCK1.CPU0 * Rename the processor device bus id. And the new bus id will be * generated as the following format: * CPU+CPU ID. */ sprintf(acpi_device_bid(device), "CPU%X", pr->id); ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Processor [%d:%d]\n", pr->id, pr->acpi_id));
if (!object.processor.pblk_address) ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No PBLK (NULL address)\n")); else if (object.processor.pblk_length != 6) printk(KERN_ERR PREFIX "Invalid PBLK length [%d]\n", object.processor.pblk_length); else { pr->throttling.address = object.processor.pblk_address; pr->throttling.duty_offset = acpi_gbl_FADT.duty_offset; pr->throttling.duty_width = acpi_gbl_FADT.duty_width;
pr->pblk = object.processor.pblk_address;
/* * We don't care about error returns - we just try to mark * these reserved so that nobody else is confused into thinking * that this region might be unused.. * * (In particular, allocating the IO range for Cardbus) */ request_region(pr->throttling.address, 6, "ACPI CPU throttle"); } […] }
This issue has proliferated to all AMD based boards so fix it for all of them by setting P_BLK length to 6.
The DSDT of for example AMD Parmer and AMD Thatcher also set it to 6 everywhere so this solution is taken instead of setting the P_BLK system I/O base to 0 for all but the first processor which is how it is done for earlier AMD based boards.
As note having to set this manually should not be needed and this should be autogenerated as done for most of the Intel boards and the AMD K8 based boards (`src/cpu/amd/model_fxx/powernow_acpi.c`).
[1] http://www.coreboot.org/pipermail/coreboot/2013-January/073636.html [2] http://acpi.info/DOWNLOADS/ACPIspec40a.pdf [3] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=driver...
Tested-by: Paul Menzel paulepanter@users.sourceforge.net • ASRock E350M1: Tested-by: Paul Menzel paulepanter@users.sourceforge.net • AMD Persimmon: Tested-by: Martin Roth martin.roth@se-eng.com Change-Id: Ie79fe4812532d124cc81747c75a4f3d88d00531c Signed-off-by: Paul Menzel paulepanter@users.sourceforge.net --- 3rdparty | 2 +- src/mainboard/amd/dinar/dsdt.asl | 14 +++++++------- src/mainboard/amd/inagua/dsdt.asl | 6 +++--- src/mainboard/amd/persimmon/dsdt.asl | 6 +++--- src/mainboard/amd/south_station/dsdt.asl | 6 +++--- src/mainboard/amd/torpedo/dsdt.asl | 6 +++--- src/mainboard/amd/union_station/dsdt.asl | 6 +++--- src/mainboard/asrock/e350m1/dsdt.asl | 6 +++--- 8 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/3rdparty b/3rdparty index dcd1ca7..dac1a18 160000 --- a/3rdparty +++ b/3rdparty @@ -1 +1 @@ -Subproject commit dcd1ca72bbef1c53b54282e1c77633f0f1876325 +Subproject commit dac1a18d184976e4447b98479f0b7a172054b98f diff --git a/src/mainboard/amd/dinar/dsdt.asl b/src/mainboard/amd/dinar/dsdt.asl index 7df090f..0611fd3 100644 --- a/src/mainboard/amd/dinar/dsdt.asl +++ b/src/mainboard/amd/dinar/dsdt.asl @@ -61,49 +61,49 @@ DefinitionBlock ( C001, /* name space name */ 1, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x0 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } Processor( C002, /* name space name */ 2, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } Processor( C003, /* name space name */ 3, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } Processor( C004, /* name space name */ 4, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } Processor( C005, /* name space name */ 5, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } Processor( C006, /* name space name */ 6, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } Processor( C007, /* name space name */ 7, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } } /* End _PR scope */ diff --git a/src/mainboard/amd/inagua/dsdt.asl b/src/mainboard/amd/inagua/dsdt.asl index 46b92f1..819bb32 100644 --- a/src/mainboard/amd/inagua/dsdt.asl +++ b/src/mainboard/amd/inagua/dsdt.asl @@ -75,21 +75,21 @@ DefinitionBlock ( C001, /* name space name */ 1, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } Processor( C002, /* name space name */ 2, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } Processor( C003, /* name space name */ 3, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } } /* End _PR scope */ diff --git a/src/mainboard/amd/persimmon/dsdt.asl b/src/mainboard/amd/persimmon/dsdt.asl index dd7b4b1..22c0295 100644 --- a/src/mainboard/amd/persimmon/dsdt.asl +++ b/src/mainboard/amd/persimmon/dsdt.asl @@ -75,21 +75,21 @@ DefinitionBlock ( C001, /* name space name */ 1, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } Processor( C002, /* name space name */ 2, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } Processor( C003, /* name space name */ 3, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } } /* End _PR scope */ diff --git a/src/mainboard/amd/south_station/dsdt.asl b/src/mainboard/amd/south_station/dsdt.asl index 958295b..77e1aab 100644 --- a/src/mainboard/amd/south_station/dsdt.asl +++ b/src/mainboard/amd/south_station/dsdt.asl @@ -75,21 +75,21 @@ DefinitionBlock ( C001, /* name space name */ 1, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } Processor( C002, /* name space name */ 2, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } Processor( C003, /* name space name */ 3, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } } /* End _PR scope */ diff --git a/src/mainboard/amd/torpedo/dsdt.asl b/src/mainboard/amd/torpedo/dsdt.asl index 61ceca0..17e0deb 100755 --- a/src/mainboard/amd/torpedo/dsdt.asl +++ b/src/mainboard/amd/torpedo/dsdt.asl @@ -61,21 +61,21 @@ DefinitionBlock ( C001, /* name space name */ 1, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } Processor( C002, /* name space name */ 2, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } Processor( C003, /* name space name */ 3, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } } /* End _PR scope */ diff --git a/src/mainboard/amd/union_station/dsdt.asl b/src/mainboard/amd/union_station/dsdt.asl index 0752640..818cc18 100644 --- a/src/mainboard/amd/union_station/dsdt.asl +++ b/src/mainboard/amd/union_station/dsdt.asl @@ -75,21 +75,21 @@ DefinitionBlock ( C001, /* name space name */ 1, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } Processor( C002, /* name space name */ 2, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } Processor( C003, /* name space name */ 3, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } } /* End _PR scope */ diff --git a/src/mainboard/asrock/e350m1/dsdt.asl b/src/mainboard/asrock/e350m1/dsdt.asl index 1cd88b8..e34f161 100644 --- a/src/mainboard/asrock/e350m1/dsdt.asl +++ b/src/mainboard/asrock/e350m1/dsdt.asl @@ -75,21 +75,21 @@ DefinitionBlock ( C001, /* name space name */ 1, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } Processor( C002, /* name space name */ 2, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } Processor( C003, /* name space name */ 3, /* Unique number for this processor */ 0x810, /* PBLK system I/O address !hardcoded! */ - 0x00 /* PBLKLEN for boot processor */ + 0x06 /* PBLKLEN for boot processor */ ) { } } /* End _PR scope */