diff options
author | Phil Dennis-Jordan <phil@philjordan.eu> | 2017-03-15 19:20:27 +1300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-05-03 12:29:40 +0200 |
commit | 6103451aeb749e92bf7d730429985189c6921c32 (patch) | |
tree | 84405a2567192cbff75286eb005af0f0a440d81e /hw/i386/acpi-build.c | |
parent | 77af8a2b95b79699de650965d5228772743efe84 (diff) | |
download | qemu-6103451aeb749e92bf7d730429985189c6921c32.tar.gz |
hw/i386: Build-time assertion on pc/q35 reset register being identical.
This adds a clarifying comment and build time assert to the FADT reset register field initialisation: the reset register is the same on both machine types.
Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu>
Message-Id: <1489558827-28971-3-git-send-email-phil@philjordan.eu>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/i386/acpi-build.c')
-rw-r--r-- | hw/i386/acpi-build.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 7997f06823..1d8c645ed3 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -310,6 +310,9 @@ static void fadt_setup(AcpiFadtDescriptorRev3 *fadt, AcpiPmInfo *pm) fadt->reset_register.space_id = AML_SYSTEM_IO; fadt->reset_register.bit_width = 8; fadt->reset_register.address = cpu_to_le64(ICH9_RST_CNT_IOPORT); + /* The above need not be conditional on machine type because the reset port + * happens to be the same on PIIX (pc) and ICH9 (q35). */ + QEMU_BUILD_BUG_ON(ICH9_RST_CNT_IOPORT != RCR_IOPORT); fadt->xpm1a_event_block.space_id = AML_SYSTEM_IO; fadt->xpm1a_event_block.bit_width = fadt->pm1_evt_len * 8; |