diff options
author | Liav Albani <liavalb@gmail.com> | 2022-03-04 21:10:30 +0530 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2022-03-06 16:06:16 -0500 |
commit | 5334bf5703408b7948d9fd8bb8a599c97cdc84a3 (patch) | |
tree | 658e28b52c5a3f07133dffce8a75468cb6952034 /hw/acpi | |
parent | 43b6277ac2dc2a61acf303d9d515fafb0b876cc1 (diff) | |
download | qemu-5334bf5703408b7948d9fd8bb8a599c97cdc84a3.zip qemu-5334bf5703408b7948d9fd8bb8a599c97cdc84a3.tar.gz qemu-5334bf5703408b7948d9fd8bb8a599c97cdc84a3.tar.bz2 |
hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table
This can allow the guest OS to determine more easily if i8042 controller
is present in the system or not, so it doesn't need to do probing of the
controller, but just initialize it immediately, before enumerating the
ACPI AML namespace.
The 8042 bit in IAPC_BOOT_ARCH was introduced from ACPI spec v2 (FADT
revision 2 and above). Therefore, in this change, we only enable this bit for
x86/q35 machine types since x86/i440fx machines use FADT ACPI table with
revision 1.
Signed-off-by: Liav Albani <liavalb@gmail.com>
Signed-off-by: Ani Sinha <ani@anisinha.ca>
Message-Id: <20220304154032.2071585-3-ani@anisinha.ca>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/acpi')
-rw-r--r-- | hw/acpi/aml-build.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 8966e16..1773cf5 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -2152,7 +2152,13 @@ void build_fadt(GArray *tbl, BIOSLinker *linker, const AcpiFadtData *f, build_append_int_noprefix(tbl, 0, 1); /* DAY_ALRM */ build_append_int_noprefix(tbl, 0, 1); /* MON_ALRM */ build_append_int_noprefix(tbl, f->rtc_century, 1); /* CENTURY */ - build_append_int_noprefix(tbl, 0, 2); /* IAPC_BOOT_ARCH */ + /* IAPC_BOOT_ARCH */ + if (f->rev == 1) { + build_append_int_noprefix(tbl, 0, 2); + } else { + /* since ACPI v2.0 */ + build_append_int_noprefix(tbl, f->iapc_boot_arch, 2); + } build_append_int_noprefix(tbl, 0, 1); /* Reserved */ build_append_int_noprefix(tbl, f->flags, 4); /* Flags */ |