Gerd Hoffmann (kraxel@redhat.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3342
-gerrit
commit c7caabe219f5676bbff11dfb4595d33e16b913a5 Author: Gerd Hoffmann kraxel@redhat.com Date: Thu May 30 11:16:04 2013 +0200
qemu: adapt dsdt tables for coreboot & enable acpi
Disable cpu/pci hotplug bits. Disable dynamic pci window. Both depend on stuff in the SSDT tables created by SeaBIOS.
Adapt dsdt DefinitionBlock. Enable acpi table generation.
With this patch linux boots successfully with ACPI enabled. It's not bug-free though. Missing cpu detection leads to funky messages like this one:
weird, boot CPU (#0) not listed by the BIOS.
and SMP most likely wouldn't work either.
Change-Id: Ic3803a6f1ef6d54c11cc4ca3844d3032a374ae6b Signed-off-by: Gerd Hoffmann kraxel@redhat.com --- src/mainboard/emulation/qemu-x86/acpi-dsdt-pci-crs.dsl | 4 ++++ src/mainboard/emulation/qemu-x86/acpi_tables.c | 4 ---- src/mainboard/emulation/qemu-x86/dsdt.asl | 14 +++++++++----- 3 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/src/mainboard/emulation/qemu-x86/acpi-dsdt-pci-crs.dsl b/src/mainboard/emulation/qemu-x86/acpi-dsdt-pci-crs.dsl index d421891..63d1fd5 100644 --- a/src/mainboard/emulation/qemu-x86/acpi-dsdt-pci-crs.dsl +++ b/src/mainboard/emulation/qemu-x86/acpi-dsdt-pci-crs.dsl @@ -56,6 +56,7 @@ Scope(_SB.PCI0) { })
Method(_CRS, 0) { +#if 0 /* Fields provided by dynamically created ssdt */ External(P0S, IntObj) External(P0E, IntObj) @@ -86,5 +87,8 @@ Scope(_SB.PCI0) { /* add window and return result */ ConcatenateResTemplate(CRES, CR64, Local0) Return (Local0) +#else + Return (CRES) +#endif } } diff --git a/src/mainboard/emulation/qemu-x86/acpi_tables.c b/src/mainboard/emulation/qemu-x86/acpi_tables.c index de8d7f1..904fe0f 100644 --- a/src/mainboard/emulation/qemu-x86/acpi_tables.c +++ b/src/mainboard/emulation/qemu-x86/acpi_tables.c @@ -73,7 +73,6 @@ unsigned long acpi_fill_srat(unsigned long current) #define ALIGN_CURRENT current = (ALIGN(current, 16)) unsigned long write_acpi_tables(unsigned long start) { -#ifdef ACPI unsigned long current; acpi_rsdp_t *rsdp; acpi_rsdt_t *rsdt; @@ -187,7 +186,4 @@ unsigned long write_acpi_tables(unsigned long start) printk(BIOS_DEBUG, "current = %lx\n", current); printk(BIOS_INFO, "ACPI: done.\n"); return current; -#else - return start; -#endif } diff --git a/src/mainboard/emulation/qemu-x86/dsdt.asl b/src/mainboard/emulation/qemu-x86/dsdt.asl index 158f6b4..8cb1a12 100644 --- a/src/mainboard/emulation/qemu-x86/dsdt.asl +++ b/src/mainboard/emulation/qemu-x86/dsdt.asl @@ -17,14 +17,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-ACPI_EXTRACT_ALL_CODE AmlCode - DefinitionBlock ( - "acpi-dsdt.aml", // Output Filename + "dsdt.aml", // Output Filename "DSDT", // Signature 0x01, // DSDT Compliance Revision - "BXPC", // OEMID - "BXDSDT", // TABLE ID + "CORE", // OEMID + "COREBOOT", // TABLE ID 0x1 // OEM Revision ) { @@ -293,7 +291,9 @@ DefinitionBlock ( } }
+#if 0 #include "acpi-dsdt-cpu-hotplug.dsl" +#endif
/**************************************************************** @@ -306,12 +306,16 @@ DefinitionBlock ( Method(_L00) { } Method(_E01) { +#if 0 // PCI hotplug event _SB.PCI0.PCNF() +#endif } Method(_E02) { +#if 0 // CPU hotplug event _SB.PRSC() +#endif } Method(_L03) { }