Fix ACPI COM port detection
PATCH 1/1 Fix ACPI COM port detection
Fix to ACPI DSDT and qemu to properly detect COM ports.
Signed-off-by Ben Guthro <[email protected]>
Signed-off-by Gary Grebus <[email protected]>
tools/firmware/hvmloader/acpi/dsdt.asl +52 -2
@@ -635,7 +635,16 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, Name (_UID, 0x01) Method (_STA, 0, NotSerialized) { - Return (0x0F) + Store (\_SB.PCI0.PX13.DRSC, Local0) + And (Local0, 0x08000000, Local0) + If (LEqual (Local0, 0)) + { + Return (0x00) + } + Else + { + Return (0x0F) + } } Name (_CRS, ResourceTemplate()
@@ -644,7 +653,29 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, IRQNoFlags () {4} }) } - + Device (UAR2) + { + Name (_HID, EisaId ("PNP0501")) + Name (_UID, 0x02) + Method (_STA, 0, NotSerialized) + { + Store (\_SB.PCI0.PX13.DRSC, Local0) + And (Local0, 0x80000000, Local0) + If (LEqual (Local0, 0)) + { + Return (0x00) + } + Else + { + Return (0x0F) + } + } + Name (_CRS, ResourceTemplate() + { + IO (Decode16, 0x02F8, 0x02F8, 0x00, 0x08) + IRQNoFlags () {3} + }) + } Device (LTP1) { Name (_HID, EisaId ("PNP0400"))
@@ -661,6 +692,25 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, }) } } + /* PIIX4 PM */ + Device (PX13) { + Name (_ADR, 0x00010002) + + OperationRegion (P13C, PCI_Config, 0x5c, 0x24) + Field (P13C, DWordAcc, NoLock, Preserve) + { + DRSA, 32, + DRSB, 32, + DRSC, 32, + DRSE, 32, + DRSF, 32, + DRSG, 32, + DRSH, 32, + DRSI, 32, + DRSJ, 32 + } + } + } } }
tools/firmware/hvmloader/acpi/dsdt.c +48 -22
110 lines not on this page · raw message
tools/ioemu/hw/piix4acpi.c +5 -0
@@ -166,6 +166,11 @@ void pci_piix4_acpi_init(PCIBus *bus, in pci_conf[0x43 ] =0x00 ; d->pm1_control =SCI_EN ; +/* ACPI BIOS determines presence of COM ports based on these decodes */ + pci_conf[0x63 ] =0x60 ; + pci_conf[0x67 ] = (serial_hds[0 ] !=NULL ?0x08 :0 ) | + (serial_hds[1 ] !=NULL ?0x90 :0 ); +acpi_map ((PCIDevice *)d,0 ,0x1f40 ,0x10 ,PCI_ADDRESS_SPACE_IO );register_savevm ("piix4acpi" ,0 ,1 , piix4acpi_save, piix4acpi_load, d);
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel