qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 3/3] acpi-build: load tables supplied by user


From: Michael S. Tsirkin
Subject: [Qemu-devel] [PATCH 3/3] acpi-build: load tables supplied by user
Date: Thu, 10 Oct 2013 11:04:38 +0300

If user supplies any SSDTs using -acpi,
install them in addition to the built-in ones.

Signed-off-by: Michael S. Tsirkin <address@hidden>
---
 hw/i386/acpi-build.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 262d1d6..6cfa044 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1041,6 +1041,7 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables 
*tables)
     AcpiMiscInfo misc;
     AcpiMcfgInfo mcfg;
     PcPciInfo pci;
+    uint8_t *u;
 
     acpi_get_cpu_info(&cpu);
     acpi_get_pm_info(&pm);
@@ -1092,6 +1093,14 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables 
*tables)
         build_mcfg_q35(tables->table_data, tables->linker, &mcfg);
     }
 
+    /* Add tables supplied by user (if any) */
+    for (u = acpi_table_first(); u; u = acpi_table_next(u)) {
+        unsigned len = acpi_table_len(u);
+
+        acpi_add_table(table_offsets, tables->table_data);
+        g_array_append_vals(tables->table_data, u, len);
+    }
+
     /* RSDT is pointed to by RSDP */
     rsdt = tables->table_data->len;
     build_rsdt(tables->table_data, tables->linker, table_offsets);
-- 
MST




reply via email to

[Prev in Thread] Current Thread [Next in Thread]