QEMU now loads its own copy of DSDT, so let's not build in PIIX. This leaves building in the DSDT an option, default to off. If no one complains for a while, we'll be able to remove this altogether.
Signed-off-by: Michael S. Tsirkin mst@redhat.com --- src/Kconfig | 5 +++++ src/acpi.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/Kconfig b/src/Kconfig index 3141069..3be07f4 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -387,6 +387,11 @@ menu "BIOS Tables" default y help Support generation of ACPI tables. + config ACPI_DSDT + bool "Include default ACPI DSDT" + depends on ACPI + help + Include default DSDT ACPI table in BIOS. endmenu
source vgasrc/Kconfig diff --git a/src/acpi.c b/src/acpi.c index 119d1c1..69dd3aa 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -202,7 +202,11 @@ struct srat_memory_affinity u32 reserved3[2]; } PACKED;
+#ifdef CONFIG_ACPI_DSDT #include "acpi-dsdt.hex" +#else +static u8 AmlCode[1]; +#endif
static void build_header(struct acpi_table_header *h, u32 sig, int len, u8 rev) @@ -826,7 +830,8 @@ acpi_setup(void) break; } } - if (fadt && !fadt->dsdt) { + + if (fadt && !fadt->dsdt && CONFIG_ACPI_DSDT) { /* default DSDT */ void *dsdt = malloc_high(sizeof(AmlCode)); if (!dsdt) {
On Sun, Mar 17, 2013 at 08:32:34PM +0200, Michael S. Tsirkin wrote:
QEMU now loads its own copy of DSDT, so let's not build in PIIX. This leaves building in the DSDT an option, default to off. If no one complains for a while, we'll be able to remove this altogether.
Thanks. I don't think it will be that easy to remove support for this as older versions of QEMU (and all versions of Bochs) wont work properly if the DSDT is not present. Ultimately, we want to move all of the acpi stuff to qemu - I think we should wait for that before enabling the ability to remove the support in SeaBIOS.
-Kevin
On Sun, Mar 17, 2013 at 10:23:21PM -0400, Kevin O'Connor wrote:
On Sun, Mar 17, 2013 at 08:32:34PM +0200, Michael S. Tsirkin wrote:
QEMU now loads its own copy of DSDT, so let's not build in PIIX. This leaves building in the DSDT an option, default to off. If no one complains for a while, we'll be able to remove this altogether.
Thanks. I don't think it will be that easy to remove support for this as older versions of QEMU (and all versions of Bochs) wont work properly if the DSDT is not present. Ultimately, we want to move all of the acpi stuff to qemu - I think we should wait for that before enabling the ability to remove the support in SeaBIOS.
-Kevin
This is exactly what I am working on actually. There's lost of activity related to acpi so keeping this work on a branch until is complete will be hard. Surely a config option does no harm? Maybe you can merge it if I change the default to y?
On 03/18/13 09:23, Michael S. Tsirkin wrote:
On Sun, Mar 17, 2013 at 10:23:21PM -0400, Kevin O'Connor wrote:
On Sun, Mar 17, 2013 at 08:32:34PM +0200, Michael S. Tsirkin wrote:
QEMU now loads its own copy of DSDT, so let's not build in PIIX. This leaves building in the DSDT an option, default to off. If no one complains for a while, we'll be able to remove this altogether.
Thanks. I don't think it will be that easy to remove support for this as older versions of QEMU (and all versions of Bochs) wont work properly if the DSDT is not present. Ultimately, we want to move all of the acpi stuff to qemu - I think we should wait for that before enabling the ability to remove the support in SeaBIOS.
-Kevin
This is exactly what I am working on actually. There's lost of activity related to acpi so keeping this work on a branch until is complete will be hard. Surely a config option does no harm? Maybe you can merge it if I change the default to y?
I think defaulting to 'y' for compatibility with older qemu versions is a good idea. For the builds bundled with qemu (where we _know_ qemu is new enougth that it actually works) we can flip the switch to 'n' (via roms/config.seabios).
cheers, Gerd