All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table
@ 2022-02-21 19:13 Liav Albani
  2022-02-21 19:13 ` [PATCH v2 1/2] hw/isa: add function to check for existence of device by its type Liav Albani
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Liav Albani @ 2022-02-21 19:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: ani, imammedo, Liav Albani, mst

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.

To allow "flexible" indication, I don't hardcode the bit at location 1
as on in the IA-PC boot flags, but try to search for i8042 on the ISA
bus to verify it exists in the system.

Why this is useful you might ask - this patch allows the guest OS to
probe and use the i8042 controller without decoding the ACPI AML blob
at all. For example, as a developer of the SerenityOS kernel, I might
want to allow people to not try to decode the ACPI AML namespace (for
now, we still don't support ACPI AML as it's a work in progress), but
still to not probe for the i8042 but just use it after looking in the
IA-PC boot flags in the ACPI FADT table.

A note about this version of the patch series: I changed the assertion
checking if the ISA bus exists to a if statement, because I can see how
in the future someone might want to run a x86 machine without an ISA bus
so we should not assert if someone calls the ISA check device existence
function but return FALSE gracefully.
If someone thinks this is wrong, I'm more than happy to discuss and fix
the code :)

Liav Albani (2):
  hw/isa: add function to check for existence of device by its type
  hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT
    table

 hw/acpi/aml-build.c         |  7 ++++++-
 hw/i386/acpi-build.c        |  5 +++++
 hw/i386/acpi-microvm.c      |  5 +++++
 hw/isa/isa-bus.c            | 23 +++++++++++++++++++++++
 include/hw/acpi/acpi-defs.h |  1 +
 include/hw/isa/isa.h        |  1 +
 6 files changed, 41 insertions(+), 1 deletion(-)

-- 
2.35.1



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-02-22 12:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-21 19:13 [PATCH v2 0/2] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table Liav Albani
2022-02-21 19:13 ` [PATCH v2 1/2] hw/isa: add function to check for existence of device by its type Liav Albani
2022-02-21 19:13 ` [PATCH v2 2/2] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table Liav Albani
2022-02-21 20:05   ` Liav Albani
2022-02-22  6:55   ` Ani Sinha
2022-02-22  7:20     ` Ani Sinha
2022-02-22  7:12   ` Ani Sinha
2022-02-22 12:20 ` [PATCH v2 0/2] " Ani Sinha

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.