|
@@ -37,7 +37,6 @@
|
|
#include "hw/acpi/piix4.h"
|
|
#include "hw/acpi/piix4.h"
|
|
#include "hw/nvram/fw_cfg.h"
|
|
#include "hw/nvram/fw_cfg.h"
|
|
#include "hw/acpi/bios-linker-loader.h"
|
|
#include "hw/acpi/bios-linker-loader.h"
|
|
-#include "hw/loader.h"
|
|
|
|
#include "hw/isa/isa.h"
|
|
#include "hw/isa/isa.h"
|
|
#include "hw/block/fdc.h"
|
|
#include "hw/block/fdc.h"
|
|
#include "hw/acpi/memory_hotplug.h"
|
|
#include "hw/acpi/memory_hotplug.h"
|
|
@@ -58,6 +57,7 @@
|
|
#include "hw/i386/x86-iommu.h"
|
|
#include "hw/i386/x86-iommu.h"
|
|
|
|
|
|
#include "hw/acpi/aml-build.h"
|
|
#include "hw/acpi/aml-build.h"
|
|
|
|
+#include "hw/acpi/utils.h"
|
|
#include "hw/acpi/pci.h"
|
|
#include "hw/acpi/pci.h"
|
|
|
|
|
|
#include "qom/qom-qobject.h"
|
|
#include "qom/qom-qobject.h"
|
|
@@ -2823,14 +2823,6 @@ static void acpi_build_reset(void *build_opaque)
|
|
build_state->patched = 0;
|
|
build_state->patched = 0;
|
|
}
|
|
}
|
|
|
|
|
|
-static MemoryRegion *acpi_add_rom_blob(AcpiBuildState *build_state,
|
|
|
|
- GArray *blob, const char *name,
|
|
|
|
- uint64_t max_size)
|
|
|
|
-{
|
|
|
|
- return rom_add_blob(name, blob->data, acpi_data_len(blob), max_size, -1,
|
|
|
|
- name, acpi_build_update, build_state, NULL, true);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static const VMStateDescription vmstate_acpi_build = {
|
|
static const VMStateDescription vmstate_acpi_build = {
|
|
.name = "acpi_build",
|
|
.name = "acpi_build",
|
|
.version_id = 1,
|
|
.version_id = 1,
|
|
@@ -2872,14 +2864,15 @@ void acpi_setup(void)
|
|
acpi_build(&tables, MACHINE(pcms));
|
|
acpi_build(&tables, MACHINE(pcms));
|
|
|
|
|
|
/* Now expose it all to Guest */
|
|
/* Now expose it all to Guest */
|
|
- build_state->table_mr = acpi_add_rom_blob(build_state, tables.table_data,
|
|
|
|
- ACPI_BUILD_TABLE_FILE,
|
|
|
|
- ACPI_BUILD_TABLE_MAX_SIZE);
|
|
|
|
|
|
+ build_state->table_mr = acpi_add_rom_blob(acpi_build_update,
|
|
|
|
+ build_state, tables.table_data,
|
|
|
|
+ ACPI_BUILD_TABLE_FILE,
|
|
|
|
+ ACPI_BUILD_TABLE_MAX_SIZE);
|
|
assert(build_state->table_mr != NULL);
|
|
assert(build_state->table_mr != NULL);
|
|
|
|
|
|
build_state->linker_mr =
|
|
build_state->linker_mr =
|
|
- acpi_add_rom_blob(build_state, tables.linker->cmd_blob,
|
|
|
|
- "etc/table-loader", 0);
|
|
|
|
|
|
+ acpi_add_rom_blob(acpi_build_update, build_state,
|
|
|
|
+ tables.linker->cmd_blob, "etc/table-loader", 0);
|
|
|
|
|
|
fw_cfg_add_file(pcms->fw_cfg, ACPI_BUILD_TPMLOG_FILE,
|
|
fw_cfg_add_file(pcms->fw_cfg, ACPI_BUILD_TPMLOG_FILE,
|
|
tables.tcpalog->data, acpi_data_len(tables.tcpalog));
|
|
tables.tcpalog->data, acpi_data_len(tables.tcpalog));
|
|
@@ -2916,8 +2909,9 @@ void acpi_setup(void)
|
|
build_state->rsdp_mr = NULL;
|
|
build_state->rsdp_mr = NULL;
|
|
} else {
|
|
} else {
|
|
build_state->rsdp = NULL;
|
|
build_state->rsdp = NULL;
|
|
- build_state->rsdp_mr = acpi_add_rom_blob(build_state, tables.rsdp,
|
|
|
|
- ACPI_BUILD_RSDP_FILE, 0);
|
|
|
|
|
|
+ build_state->rsdp_mr = acpi_add_rom_blob(acpi_build_update,
|
|
|
|
+ build_state, tables.rsdp,
|
|
|
|
+ ACPI_BUILD_RSDP_FILE, 0);
|
|
}
|
|
}
|
|
|
|
|
|
qemu_register_reset(acpi_build_reset, build_state);
|
|
qemu_register_reset(acpi_build_reset, build_state);
|