hw/arm/virt: generate 64-bit addressable ACPI objects
commitcb51ac2ffe3649eb8f5c65dccc2012f0ba2c6b12
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 10 Apr 2017 15:03:50 +0000 (10 16:03 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 10 May 2017 19:04:23 +0000 (10 22:04 +0300)
treeef8a06d6fc7f4c9fc4f1c3c606c3fcff4e7b18ad
parent5ee8534731645551a3883210b9a8d5741bb79df2
hw/arm/virt: generate 64-bit addressable ACPI objects

Our current ACPI table generation code limits the placement of ACPI
tables to 32-bit addressable memory, in order to be able to emit the
root pointer (RSDP) and root table (RSDT) using table types from the
ACPI 1.0 days.

Since ARM was not supported by ACPI before version 5.0, it makes sense
to lift this restriction. This is not crucial for mach-virt, which is
guaranteed to have some memory available below the 4 GB mark, but it
is a nice to have for QEMU machines that do not have any 32-bit
addressable memory, which is not uncommon for real world 64-bit ARM
systems.

Since we already emit a version of the RSDP root pointer that has a
secondary 64-bit wide address field for the 64-bit root table (XSDT),
all we need to do is replace the RSDT generation with the generation
of an XSDT table, and use a different slot in the FADT table to refer
to the DSDT.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
hw/acpi/aml-build.c
hw/arm/virt-acpi-build.c
include/hw/acpi/acpi-defs.h
include/hw/acpi/aml-build.h