[SeaBIOS] [PATCH 2/2 v2] Introduce CONFIG_ACPI_MADT to possibly prevent SeaBIOS from building MADT
Laszlo Ersek
lersek at redhat.com
Thu Mar 21 16:54:57 CET 2013
This config option, when set to N, allows any qemu-built MADT to take
precedence.
Signed-off-by: Laszlo Ersek <lersek at redhat.com>
---
in v2:
- replaced primitive dynamic detection code with static config option
- 352 bytes saved in 32bit flat init when set to N (RHEL-6 gcc-4.4.7)
v2 depends on Michael's [PATCHv4] acpi: make default DSDT optional
src/acpi.c | 3 +++
src/Kconfig | 14 ++++++++++++++
2 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/src/acpi.c b/src/acpi.c
index 66509b4..6ef7106 100644
--- a/src/acpi.c
+++ b/src/acpi.c
@@ -327,6 +327,9 @@ build_fadt(struct pci_device *pci)
static void*
build_madt(void)
{
+ if (!CONFIG_ACPI_MADT)
+ return NULL;
+
int madt_size = (sizeof(struct multiple_apic_table)
+ sizeof(struct madt_processor_apic) * MaxCountCPUs
+ sizeof(struct madt_io_apic)
diff --git a/src/Kconfig b/src/Kconfig
index 3c80132..a847e71 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -397,6 +397,20 @@ menu "BIOS Tables"
This option can be disabled for QEMU 1.4 and newer
to save some space in the ROM file.
If unsure, say Y.
+ config ACPI_MADT
+ bool "Build ACPI MADT (APIC) in SeaBIOS"
+ default y
+ depends on ACPI
+ help
+ Dynamically build the ACPI MADT (APIC) table in SeaBIOS, based on
+ individual values exported by QEMU and online status of VCPUs.
+ Required for QEMU 1.4 and older.
+ This option can (and should) be disabled for QEMU 1.5 and newer as
+ QEMU prepares and exports the MADT for SeaBIOS to install.
+ (Although presence of more than one MADT (APIC) tables counts as a
+ BIOS bug, guest OSes should stick with the first instance, built by
+ SeaBIOS.)
+ If unsure, say Y.
endmenu
source vgasrc/Kconfig
--
1.7.1
More information about the SeaBIOS
mailing list