From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHXuR-00077t-F9 for qemu-devel@nongnu.org; Fri, 08 Jan 2016 09:20:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHXuQ-0003l5-C2 for qemu-devel@nongnu.org; Fri, 08 Jan 2016 09:20:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58567) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHXuQ-0003l1-6N for qemu-devel@nongnu.org; Fri, 08 Jan 2016 09:20:54 -0500 Date: Fri, 8 Jan 2016 16:20:50 +0200 From: "Michael S. Tsirkin" Message-ID: <1452262668-31244-47-git-send-email-mst@redhat.com> References: <1452262668-31244-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1452262668-31244-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 46/59] pc: acpi: q35: move _PRT() into SSDT List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Richard Henderson , Paolo Bonzini , Eduardo Habkost , Igor Mammedov From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/i386/acpi-build.c | 21 +++++++++++++++++++++ hw/i386/q35-acpi-dsdt.dsl | 12 ------------ 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 103a08f..0c23c22 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1634,7 +1634,28 @@ static void build_piix4_pci0_int(Aml *table) static void build_q35_pci0_int(Aml *table) { Aml *field; + Aml *method; Aml *sb_scope = aml_scope("_SB"); + Aml *pci0_scope = aml_scope("PCI0"); + + method = aml_method("_PRT", 0, AML_NOTSERIALIZED); + { + Aml *if_ctx; + Aml *else_ctx; + + /* PCI IRQ routing table, example from ACPI 2.0a specification, + section 6.2.8.1 */ + /* Note: we provide the same info as the PCI routing + table of the Bochs BIOS */ + if_ctx = aml_if(aml_equal(aml_name("PICF"), aml_int(0))); + aml_append(if_ctx, aml_return(aml_name("PRTP"))); + aml_append(method, if_ctx); + else_ctx = aml_else(); + aml_append(else_ctx, aml_return(aml_name("PRTA"))); + aml_append(method, else_ctx); + } + aml_append(pci0_scope, method); + aml_append(sb_scope, pci0_scope); field = aml_field("PCI0.ISA.PIRQ", AML_BYTE_ACC, AML_NOLOCK, AML_PRESERVE); aml_append(field, aml_named_field("PRQA", 8)); diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl index b01d4de..f265583 100644 --- a/hw/i386/q35-acpi-dsdt.dsl +++ b/hw/i386/q35-acpi-dsdt.dsl @@ -238,18 +238,6 @@ DefinitionBlock ( prt_slot_gsiA(0x001f) }) - - Method(_PRT, 0, NotSerialized) { - /* PCI IRQ routing table, example from ACPI 2.0a specification, - section 6.2.8.1 */ - /* Note: we provide the same info as the PCI routing - table of the Bochs BIOS */ - If (LEqual(\PICF, Zero)) { - Return (PRTP) - } Else { - Return (PRTA) - } - } } External(LNKA, DeviceObj) -- MST