]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/qemu-xen-traditional.git/commit
hw/piix4acpi: Make writes to ACPI_DBG_IO_ADDR actually work.
authorKonrad Rzeszutek Wilk <konrad@kernel.org>
Mon, 11 Nov 2013 18:42:56 +0000 (13:42 -0500)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 12 Nov 2013 15:40:38 +0000 (15:40 +0000)
commit832f9bde25542961ea4f768be6e00e4801484e3a
tree2dbdee4a95f1c50cc48f7c0a8a23f0afdaf63692
parent18a08a23da88863435d56a0b14ff72013ef3b003
hw/piix4acpi: Make writes to ACPI_DBG_IO_ADDR actually work.

The ACPI AML code has little snippets where it uses two
memory locations to stash debug information when doing PCI
hotplug, such as:

Device (S20)
{
    Name (_ADR, 0x00040000)
    Name (_SUN, 0x04)
    Method (_EJ0, 1, NotSerialized)
    {
Store (0x20, \_GPE.DPT1)
Store (0x88, \_GPE.DPT2)
Store (One, \_GPE.PH20)
    }

    Method (_STA, 0, NotSerialized)
    {
Store (0x20, \_GPE.DPT1)
Store (0x89, \_GPE.DPT2)
    }
}

and DPT1 (and DPT2) is defined as:

OperationRegion ( DG1, SystemIO, 0xb044, 0x04 )
Field ( DG1, ByteAcc, NoLock, Preserve ) {
    DPT1, 8, DPT2, 8
}

But unfortunately when we do the writes they are done
as byte writes, not as 4-byte writes (long). Hence
any debug values are never show in QEMU.

This fixes it so that we can see them in the log file.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
hw/piix4acpi.c