qemu: load acpi tables from fw_cfg.

Starting with release 1.7 qemu provides acpi tables via fw_cfg.  Main
advantage is that new (virtual) hardware which needs acpi support
JustWorks[tm] without having to patch & update the firmware (seabios,
coreboot, ...) accordingly.

So if we find acpi tables in fw_cfg try loading them, otherwise fallback
to the builtin acpi tables.

Change-Id: I792232829b870ff6ed8414a3007e0af17f6c4223
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-on: http://review.coreboot.org/4040
Tested-by: build bot (Jenkins)
This commit is contained in:
Gerd Hoffmann
2013-07-25 15:59:07 +02:00
parent 55b059385a
commit d69da8475e
4 changed files with 204 additions and 0 deletions

View File

@ -29,6 +29,8 @@
#include <device/pci_ids.h>
#include <cpu/x86/msr.h>
#include "../qemu-i440fx/fw_cfg.h"
extern const unsigned char AmlCode[];
#if CONFIG_HAVE_ACPI_SLIC
unsigned long acpi_create_slic(unsigned long current);
@ -238,6 +240,10 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_header_t *ssdt;
acpi_header_t *dsdt;
current = fw_cfg_acpi_tables(start);
if (current)
return current;
current = start;
/* Align ACPI tables to 16byte */