>From Windows 8.1 onwards ISA serial IRQs cannot be shared when ACPI Revision 5.0 is used in the FACP table. The reason for this is that if a 2-byte IRQ Descriptor is used then the interrupt is considered to be high true, edge sensitive, non-shareable. Since legacy serial ports COM1/3 and COM2/4 share an IRQ then if more than 2 serial ports are added, Windows indicates a conflict in Device Manager and these combinations cannot be used together.
Add a new 3-byte IRQ Descriptor to the _CRS resource indicating that the ISA serial IRQ is low true, edge sensitive and shareable, along with a corresponding _PRS resource so that the legacy serial ports also appear at a fixed address. This enables all 4 legacy serial ports to be used in Windows without conflict. Tested on Windows 11 with 4 instances of -serial on the command line and copying data simultaneously across serial ports COM1/3 and COM2/4. Note that with this series applied, if extra ISA serial ports are added to an existing VM then it is necessary to go to Device Manager, select "Add legacy hardware" from the "Action" menu, and then reboot the VM for the serial ports to be detected correctly without Device Manager indicating a conflict. Signed-off-by: Mark Cave-Ayland <[email protected]> Mark Cave-Ayland (5): hw/acpi/aml-build.c: add aml_irq() representing the 3-byte IRQ descriptor hw/acpi/aml-build.c: add AML functions for StartDependentFn/EndDependentFn tests/acpi: allow DSDT acpi table changes hw/char/serial-isa.c: declare IRQ as shared in ACPI IRQ descriptor tests: data: update x86 ACPI tables include/hw/acpi/aml-build.h | 4 ++ hw/acpi/aml-build-stub.c | 16 +++++++ hw/acpi/aml-build.c | 40 ++++++++++++++++++ hw/char/serial-isa.c | 23 +++++++++- hw/i386/pc.c | 4 +- tests/data/acpi/x86/microvm/DSDT | Bin 365 -> 393 bytes tests/data/acpi/x86/microvm/DSDT.ioapic2 | Bin 365 -> 393 bytes tests/data/acpi/x86/microvm/DSDT.pcie | Bin 2985 -> 3013 bytes tests/data/acpi/x86/microvm/DSDT.rtc | Bin 404 -> 432 bytes tests/data/acpi/x86/microvm/DSDT.usb | Bin 414 -> 442 bytes tests/data/acpi/x86/pc/DSDT | Bin 8598 -> 8626 bytes tests/data/acpi/x86/pc/DSDT.acpierst | Bin 8509 -> 8537 bytes tests/data/acpi/x86/pc/DSDT.acpihmat | Bin 9923 -> 9951 bytes tests/data/acpi/x86/pc/DSDT.bridge | Bin 15469 -> 15497 bytes tests/data/acpi/x86/pc/DSDT.cphp | Bin 9062 -> 9090 bytes tests/data/acpi/x86/pc/DSDT.dimmpxm | Bin 10252 -> 10280 bytes tests/data/acpi/x86/pc/DSDT.hpbridge | Bin 8549 -> 8577 bytes tests/data/acpi/x86/pc/DSDT.hpbrroot | Bin 5087 -> 5115 bytes tests/data/acpi/x86/pc/DSDT.ipmikcs | Bin 8670 -> 8698 bytes tests/data/acpi/x86/pc/DSDT.memhp | Bin 9957 -> 9985 bytes tests/data/acpi/x86/pc/DSDT.nohpet | Bin 8456 -> 8484 bytes tests/data/acpi/x86/pc/DSDT.numamem | Bin 8604 -> 8632 bytes tests/data/acpi/x86/pc/DSDT.roothp | Bin 12391 -> 12419 bytes tests/data/acpi/x86/q35/DSDT | Bin 8427 -> 8455 bytes tests/data/acpi/x86/q35/DSDT.acpierst | Bin 8444 -> 8472 bytes tests/data/acpi/x86/q35/DSDT.acpihmat | Bin 9752 -> 9780 bytes .../data/acpi/x86/q35/DSDT.acpihmat-generic-x | Bin 12637 -> 12665 bytes .../acpi/x86/q35/DSDT.acpihmat-noinitiator | Bin 8706 -> 8734 bytes tests/data/acpi/x86/q35/DSDT.applesmc | Bin 8473 -> 8501 bytes tests/data/acpi/x86/q35/DSDT.bridge | Bin 12040 -> 12068 bytes tests/data/acpi/x86/q35/DSDT.core-count | Bin 12985 -> 13013 bytes tests/data/acpi/x86/q35/DSDT.core-count2 | Bin 33842 -> 33870 bytes tests/data/acpi/x86/q35/DSDT.cphp | Bin 8891 -> 8919 bytes tests/data/acpi/x86/q35/DSDT.cxl | Bin 13218 -> 13246 bytes tests/data/acpi/x86/q35/DSDT.dimmpxm | Bin 10081 -> 10109 bytes tests/data/acpi/x86/q35/DSDT.ipmibt | Bin 8502 -> 8530 bytes tests/data/acpi/x86/q35/DSDT.ipmismbus | Bin 8515 -> 8543 bytes tests/data/acpi/x86/q35/DSDT.ivrs | Bin 8444 -> 8472 bytes tests/data/acpi/x86/q35/DSDT.memhp | Bin 9786 -> 9814 bytes tests/data/acpi/x86/q35/DSDT.mmio64 | Bin 9557 -> 9585 bytes tests/data/acpi/x86/q35/DSDT.multi-bridge | Bin 13280 -> 13308 bytes tests/data/acpi/x86/q35/DSDT.noacpihp | Bin 8289 -> 8317 bytes tests/data/acpi/x86/q35/DSDT.nohpet | Bin 8285 -> 8313 bytes tests/data/acpi/x86/q35/DSDT.numamem | Bin 8433 -> 8461 bytes tests/data/acpi/x86/q35/DSDT.pvpanic-isa | Bin 8528 -> 8556 bytes tests/data/acpi/x86/q35/DSDT.thread-count | Bin 12985 -> 13013 bytes tests/data/acpi/x86/q35/DSDT.thread-count2 | Bin 33842 -> 33870 bytes tests/data/acpi/x86/q35/DSDT.tis.tpm12 | Bin 9033 -> 9061 bytes tests/data/acpi/x86/q35/DSDT.tis.tpm2 | Bin 9059 -> 9087 bytes tests/data/acpi/x86/q35/DSDT.type4-count | Bin 18661 -> 18689 bytes tests/data/acpi/x86/q35/DSDT.viot | Bin 14684 -> 14712 bytes tests/data/acpi/x86/q35/DSDT.xapic | Bin 35790 -> 35818 bytes 52 files changed, 85 insertions(+), 2 deletions(-) -- 2.43.0
