[SeaBIOS] [PATCH v3 5/5] acpi: add an option to disable builtin tables

Michael S. Tsirkin mst at redhat.com
Sun Sep 22 15:17:28 CEST 2013


Serves to save a bit of memory, and is helpful
for debugging (making sure tables come from qemu).

Memory stats:
Enabled:
Total size: 128776  Fixed: 59100  Free: 2296 (used 98.2% of 128KiB rom)
Disabled:
Total size: 119836  Fixed: 58996  Free: 11236 (used 91.4% of 128KiB rom)

Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
 src/acpi.c  |  3 +++
 src/Kconfig | 12 +++++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/acpi.c b/src/acpi.c
index 8ec7d8d..8b562f1 100644
--- a/src/acpi.c
+++ b/src/acpi.c
@@ -632,6 +632,9 @@ acpi_setup(void)
     if (!loader_err)
 	warn_internalerror();
 
+    if (!CONFIG_ACPI_BUILTIN)
+        return;
+
     dprintf(3, "generate ACPI tables\n");
 
     // This code is hardcoded for PIIX4 Power Management device.
diff --git a/src/Kconfig b/src/Kconfig
index 3a4d580..e73eecc 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -399,10 +399,20 @@ menu "BIOS Tables"
         default y
         help
             Support generation of ACPI tables.
+    config ACPI_BUILTIN
+        bool "Include built-in ACPI tables"
+        default y
+        depends on ACPI
+        help
+            Include built-in ACPI tables in BIOS.
+            Required for QEMU 1.5 and older.
+            This option can be disabled for QEMU 1.6 and newer
+            to save some space in the ROM file.
+            If unsure, say Y.
     config ACPI_DSDT
         bool "Include default ACPI DSDT"
         default y
-        depends on ACPI
+        depends on ACPI && ACPI_BUILTIN
         help
             Include default DSDT ACPI table in BIOS.
             Required for QEMU 1.3 and older.
-- 
MST




More information about the SeaBIOS mailing list