This patch series generate six ACPI v5.1 tables for machine virt on ARM. The set of generated tables are: - RSDP - RSDT - MADT - GTDT - FADT - DSDT
These tables are created dynamically using the function of acpi-build-utils.c, taking into account the needed information passed from the virt machine model. When the generation is finalized, it use fw_cfg to expose the tables to guest. This patchset is based on Igor Mammedov's branch which can be found at below git tree: https://github.com/imammedo/qemu/commits/ASL_API_v3 And this patchset refers to Alexander Spyridakis's patches which are sent to qemu-devel mailing list before. http://lists.gnu.org/archive/html/qemu-devel/2014-10/msg03987.html Thanks to Laszlo's work on UEFI (ArmVirtualizationQemu) supporting downloading ACPI tables over fw_cfg, we now can use ACPI in VM. I have done following vm startup test: xp, windows2008, sles11 on X86 Linux on ARM64 Laszlo's patch http://thread.gmane.org/gmane.comp.bios.tianocore.devel/12158 Todo: 1) add GPIO controller in virt and expose it through ACPI 2) add cpu hotplug support Any comments are welcome. changes since v2: * rebase on Igor Mammedov's new branch ASL_API_v3 * use rsdt instead of xsdt according to Igor Mammedov's suggestion changes since v1: * fix bug found by Laszlo * move common helpers into dedictated file and change generating table order according to Igor's comments * fix copyright and function name according to Michael's comments Shannon Zhao (11): hw/i386: Move ACPI header definitions in an arch-independent location hw/i386/acpi-build: move generic acpi building helpers into dedictated file hw/arm/virt-acpi-build: Basic framework for building ACPI tables on ARM hw/acpi/aml-build: Add aml_memory32_fixed() and aml_interrupt() hw/arm/virt-acpi-build: Generation of DSDT table for virt devices hw/arm/virt-acpi-build: Generate FADT table and update ACPI headers hw/arm/virt-acpi-build: Generate MADT table hw/arm/virt-acpi-build: Generate GTDT table hw/arm/virt-acpi-build: Generate RSDT table hw/arm/virt-acpi-build: Generate RSDP table hw/arm/virt: Enable dynamic generation of ACPI v5.1 tables default-configs/arm-softmmu.mak | 1 + default-configs/i386-softmmu.mak | 3 + default-configs/mips-softmmu.mak | 3 + default-configs/mips64-softmmu.mak | 3 + default-configs/mips64el-softmmu.mak | 3 + default-configs/mipsel-softmmu.mak | 3 + default-configs/x86_64-softmmu.mak | 3 + hw/acpi/Makefile.objs | 5 +- hw/acpi/aml-build.c | 98 +++++++ hw/arm/Makefile.objs | 1 + hw/arm/virt-acpi-build.c | 523 ++++++++++++++++++++++++++++++++++ hw/arm/virt.c | 59 ++++- hw/i2c/Makefile.objs | 2 +- hw/i386/acpi-build.c | 106 ++------ hw/i386/acpi-build.h | 5 + hw/i386/acpi-defs.h | 368 ------------------------ include/hw/acpi/acpi-defs.h | 479 +++++++++++++++++++++++++++++++ include/hw/acpi/aml-build.h | 30 ++- include/hw/arm/virt-acpi-build.h | 72 +++++ tests/bios-tables-test.c | 2 +- 20 files changed, 1305 insertions(+), 464 deletions(-) create mode 100644 hw/arm/virt-acpi-build.c delete mode 100644 hw/i386/acpi-defs.h create mode 100644 include/hw/acpi/acpi-defs.h create mode 100644 include/hw/arm/virt-acpi-build.h