diff options
author | Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> | 2019-09-18 14:06:23 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2019-10-05 17:12:08 -0400 |
commit | 091c466e26867656d3d650a3a5a40169b97648a1 (patch) | |
tree | 753b2fc0afae13c62f0360e805924667a5098ee2 /hw/i386 | |
parent | c6beefd674fff8d41b90365dfccad32e53a5abcb (diff) | |
download | qemu-091c466e26867656d3d650a3a5a40169b97648a1.zip qemu-091c466e26867656d3d650a3a5a40169b97648a1.tar.gz qemu-091c466e26867656d3d650a3a5a40169b97648a1.tar.bz2 |
hw/acpi: Make ACPI IO address space configurable
This is in preparation for adding support for ARM64 platforms
where it doesn't use port mapped IO for ACPI IO space. We are
making changes so that MMIO region can be accommodated
and board can pass the base address into the aml build function.
Also move few MEMORY_* definitions to header so that other memory
hotplug event signalling mechanisms (eg. Generic Event Device on
HW-reduced acpi platforms) can use the same from their respective
event handler code.
Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20190918130633.4872-2-shameerali.kolothum.thodi@huawei.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386')
-rw-r--r-- | hw/i386/acpi-build.c | 7 | ||||
-rw-r--r-- | hw/i386/pc.c | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 4e0f9f4..1d077a7 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1888,7 +1888,12 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, build_cpus_aml(dsdt, machine, opts, pm->cpu_hp_io_base, "\\_SB.PCI0", "\\_GPE._E02"); } - build_memory_hotplug_aml(dsdt, nr_mem, "\\_SB.PCI0", "\\_GPE._E03"); + + if (pcms->memhp_io_base && nr_mem) { + build_memory_hotplug_aml(dsdt, nr_mem, "\\_SB.PCI0", + "\\_GPE._E03", AML_SYSTEM_IO, + pcms->memhp_io_base); + } scope = aml_scope("_GPE"); { diff --git a/hw/i386/pc.c b/hw/i386/pc.c index bcda50e..4b19042 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1766,6 +1766,9 @@ void pc_memory_init(PCMachineState *pcms, /* Init default IOAPIC address space */ pcms->ioapic_as = &address_space_memory; + + /* Init ACPI memory hotplug IO base address */ + pcms->memhp_io_base = ACPI_MEMORY_HOTPLUG_BASE; } /* |