]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hw/acpi: Add standalone function to build MADT
authorOliver Steffen <osteffen@redhat.com>
Fri, 30 Jan 2026 05:47:08 +0000 (06:47 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 3 Feb 2026 07:32:33 +0000 (08:32 +0100)
Add a function called `acpi_build_madt_standalone()` that builds a MADT
without the rest of the ACPI table structure.

Signed-off-by: Oliver Steffen <osteffen@redhat.com>
Message-ID: <20260130054714.715928-4-osteffen@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/i386/acpi-build.c
hw/i386/acpi-build.h

index 9446a9f862ca483c83075e526fe50c560845f71e..19c62362e31df07cadadaf516a714ddeb624c1b5 100644 (file)
@@ -2249,3 +2249,12 @@ void acpi_setup(void)
      */
     acpi_build_tables_cleanup(&tables, false);
 }
+
+GArray *acpi_build_madt_standalone(MachineState *machine)
+{
+  X86MachineState *x86ms = X86_MACHINE(machine);
+  GArray *table = g_array_new(false, true, 1);
+  acpi_build_madt(table, NULL, x86ms, x86ms->oem_id,
+                  x86ms->oem_table_id);
+  return table;
+}
index 8ba3c33e483166e7e8cbfc2e7f5a96533e22a6e6..00e19bbe5edf76bb8fb473ad895f6b67a0f1281f 100644 (file)
@@ -8,4 +8,6 @@ extern const struct AcpiGenericAddress x86_nvdimm_acpi_dsmio;
 void acpi_setup(void);
 Object *acpi_get_i386_pci_host(void);
 
+GArray *acpi_build_madt_standalone(MachineState *machine);
+
 #endif