Skip to content

Commit

Permalink
pc: acpi: q35: move link devices to SSDT
Browse files Browse the repository at this point in the history
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
  • Loading branch information
Igor Mammedov authored and mstsirkin committed Jan 9, 2016
1 parent 80b32df commit 12e3b1f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 32 deletions.
9 changes: 9 additions & 0 deletions hw/i386/acpi-build.c
Expand Up @@ -1619,6 +1619,15 @@ static void build_q35_pci0_int(Aml *table)
{
Aml *sb_scope = aml_scope("_SB");

aml_append(sb_scope, build_link_dev("LNKA", 0, aml_name("PRQA")));
aml_append(sb_scope, build_link_dev("LNKB", 1, aml_name("PRQB")));
aml_append(sb_scope, build_link_dev("LNKC", 2, aml_name("PRQC")));
aml_append(sb_scope, build_link_dev("LNKD", 3, aml_name("PRQD")));
aml_append(sb_scope, build_link_dev("LNKE", 4, aml_name("PRQE")));
aml_append(sb_scope, build_link_dev("LNKF", 5, aml_name("PRQF")));
aml_append(sb_scope, build_link_dev("LNKG", 6, aml_name("PRQG")));
aml_append(sb_scope, build_link_dev("LNKH", 7, aml_name("PRQH")));

/*
* TODO: UID probably shouldn't be the same for GSIx devices
* but that's how it was in original ASL so keep it for now
Expand Down
40 changes: 8 additions & 32 deletions hw/i386/q35-acpi-dsdt.dsl
Expand Up @@ -315,38 +315,14 @@ DefinitionBlock (
Return (PRR0)
}

#define define_link(link, uid, reg) \
Device(link) { \
Name(_HID, EISAID("PNP0C0F")) \
Name(_UID, uid) \
Name(_PRS, ResourceTemplate() { \
Interrupt(, Level, ActiveHigh, Shared) { \
5, 10, 11 \
} \
}) \
Method(_STA, 0, NotSerialized) { \
Return (IQST(reg)) \
} \
Method(_DIS, 0, NotSerialized) { \
Or(reg, 0x80, reg) \
} \
Method(_CRS, 0, NotSerialized) { \
Return (IQCR(reg)) \
} \
Method(_SRS, 1, NotSerialized) { \
CreateDWordField(Arg0, 0x05, PRRI) \
Store(PRRI, reg) \
} \
}

define_link(LNKA, 0, PRQA)
define_link(LNKB, 1, PRQB)
define_link(LNKC, 2, PRQC)
define_link(LNKD, 3, PRQD)
define_link(LNKE, 4, PRQE)
define_link(LNKF, 5, PRQF)
define_link(LNKG, 6, PRQG)
define_link(LNKH, 7, PRQH)
External(LNKA, DeviceObj)
External(LNKB, DeviceObj)
External(LNKC, DeviceObj)
External(LNKD, DeviceObj)
External(LNKE, DeviceObj)
External(LNKF, DeviceObj)
External(LNKG, DeviceObj)
External(LNKH, DeviceObj)

External(GSIA, DeviceObj)
External(GSIB, DeviceObj)
Expand Down

0 comments on commit 12e3b1f

Please sign in to comment.