From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43646) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6oO7-00015F-FF for qemu-devel@nongnu.org; Wed, 09 Dec 2015 18:43:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6oO6-000543-Kc for qemu-devel@nongnu.org; Wed, 09 Dec 2015 18:43:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43084) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6oO6-00053k-G3 for qemu-devel@nongnu.org; Wed, 09 Dec 2015 18:43:10 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 233974258B for ; Wed, 9 Dec 2015 23:43:10 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.34.112.60]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tB9Ng8W8005315 for ; Wed, 9 Dec 2015 18:43:09 -0500 From: Igor Mammedov Date: Thu, 10 Dec 2015 00:42:00 +0100 Message-Id: <1449704528-289297-67-git-send-email-imammedo@redhat.com> In-Reply-To: <1449704528-289297-1-git-send-email-imammedo@redhat.com> References: <1449704528-289297-1-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [PATCH 66/74] pc: acpi: q35: move _PRT() into SSDT List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Signed-off-by: Igor Mammedov --- 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 876605d..744f047 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1553,7 +1553,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) -- 1.8.3.1