aboutsummaryrefslogtreecommitdiff
path: root/tests/acpi-utils.h
diff options
context:
space:
mode:
authorPhil Dennis-Jordan <phil@philjordan.eu>2017-03-15 19:20:26 +1300
committerPaolo Bonzini <pbonzini@redhat.com>2017-05-03 12:29:40 +0200
commit77af8a2b95b79699de650965d5228772743efe84 (patch)
tree99f42e47728226f4743aa91b234451343d63cebc /tests/acpi-utils.h
parente619b14746e5d8c0e53061661fd0e1da01fd4d60 (diff)
downloadqemu-77af8a2b95b79699de650965d5228772743efe84.zip
qemu-77af8a2b95b79699de650965d5228772743efe84.tar.gz
qemu-77af8a2b95b79699de650965d5228772743efe84.tar.bz2
hw/i386: Use Rev3 FADT (ACPI 2.0) instead of Rev1 to improve guest OS support.
This updates the FADT generated for x86/64 machine types from Revision 1 to 3. (Based on ACPI standard 2.0 instead of 1.0) The intention is to expose the reset register information to guest operating systems which require it, specifically OS X/macOS. Revision 1 FADTs do not contain the fields relating to the reset register. The new layout and contents remains backwards-compatible with operating systems which only support ACPI 1.0, as the existing fields are not modified by this change, as the 64-bit and 32-bit variants are allowed to co-exist according to the ACPI 2.0 standard. No regressions became apparent in tests with a range of Windows (XP-10) and Linux versions. The BIOS tables test suite's FADT checksum test has also been updated to reflect the new FADT layout and content. Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu> Message-Id: <1489558827-28971-2-git-send-email-phil@philjordan.eu> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests/acpi-utils.h')
-rw-r--r--tests/acpi-utils.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/acpi-utils.h b/tests/acpi-utils.h
index 348e4d7..f8d8723 100644
--- a/tests/acpi-utils.h
+++ b/tests/acpi-utils.h
@@ -87,6 +87,16 @@ typedef struct {
g_assert_cmpstr(ACPI_ASSERT_CMP_str, ==, expected); \
} while (0)
+#define ACPI_READ_GENERIC_ADDRESS(field, addr) \
+ do { \
+ ACPI_READ_FIELD((field).space_id, addr); \
+ ACPI_READ_FIELD((field).bit_width, addr); \
+ ACPI_READ_FIELD((field).bit_offset, addr); \
+ ACPI_READ_FIELD((field).access_width, addr); \
+ ACPI_READ_FIELD((field).address, addr); \
+ } while (0);
+
+
uint8_t acpi_calc_checksum(const uint8_t *data, int len);
uint32_t acpi_find_rsdp_address(void);
void acpi_parse_rsdp_table(uint32_t addr, AcpiRsdpDescriptor *rsdp_table);