From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAzpq-0007J9-UR for qemu-devel@nongnu.org; Mon, 21 Dec 2015 07:45:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aAzpm-0004d2-Tb for qemu-devel@nongnu.org; Mon, 21 Dec 2015 07:45:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47922) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAzpm-0004cx-M8 for qemu-devel@nongnu.org; Mon, 21 Dec 2015 07:45:02 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 137118EA34 for ; Mon, 21 Dec 2015 12:45:02 +0000 (UTC) Date: Mon, 21 Dec 2015 13:45:00 +0100 From: Igor Mammedov Message-ID: <20151221134500.68461c64@nial.brq.redhat.com> In-Reply-To: <20151219222828-mutt-send-email-mst@redhat.com> References: <1449704528-289297-1-git-send-email-imammedo@redhat.com> <1449704528-289297-55-git-send-email-imammedo@redhat.com> <20151219222828-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 54/74] pc: acpi: move remaining GPE handlers into SSDT List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org On Sat, 19 Dec 2015 22:34:55 +0200 "Michael S. Tsirkin" wrote: > On Thu, Dec 10, 2015 at 12:41:48AM +0100, Igor Mammedov wrote: > > Signed-off-by: Igor Mammedov > > --- > > hw/i386/acpi-build.c | 26 +++++++++++++++++++++++++- > > hw/i386/acpi-dsdt.dsl | 40 ---------------------------------------- > > hw/i386/q35-acpi-dsdt.dsl | 36 ------------------------------------ > > 3 files changed, 25 insertions(+), 77 deletions(-) > > > > diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c > > index 581ad98..99c0294 100644 > > --- a/hw/i386/acpi-build.c > > +++ b/hw/i386/acpi-build.c > > @@ -1400,8 +1400,25 @@ build_ssdt(GArray *table_data, GArray *linker, > > build_memory_hotplug_aml(ssdt, nr_mem, pm->mem_hp_io_base, > > pm->mem_hp_io_len); > > > > - scope = aml_scope("\\_GPE"); > > + scope = aml_scope("_GPE"); > > { > > + aml_append(scope, aml_name_decl("_HID", aml_string("ACPI0006"))); > > + > > + method = aml_method("_L00", 0, AML_NOTSERIALIZED); > > + aml_append(scope, method); > > + > > + if (misc->is_piix4) { > > + method = aml_method("_E01", 0, AML_NOTSERIALIZED); > > + aml_append(method, > > + aml_acquire(aml_name("\\_SB.PCI0.BLCK"), 0xFFFF)); > > + aml_append(method, aml_call0("\\_SB.PCI0.PCNT")); > > + aml_append(method, aml_release(aml_name("\\_SB.PCI0.BLCK"))); > > + aml_append(scope, method); > > + } else { > > + method = aml_method("_L01", 0, AML_NOTSERIALIZED); > > + aml_append(scope, method); > > + } > > + > > method = aml_method("_E02", 0, AML_NOTSERIALIZED); > > aml_append(method, aml_call0("\\_SB." CPU_SCAN_METHOD)); > > aml_append(scope, method); > > @@ -1409,6 +1426,13 @@ build_ssdt(GArray *table_data, GArray *linker, > > method = aml_method("_E03", 0, AML_NOTSERIALIZED); > > aml_append(method, aml_call0(MEMORY_HOTPLUG_HANDLER_PATH)); > > aml_append(scope, method); > > + > > + for (i = 4; i <= 0xF; i++) { > > + char *name = g_strdup_printf("_L0%X", i); > > + method = aml_method(name, 0, AML_NOTSERIALIZED); > > + aml_append(scope, method); > > + g_free(name); > > + } > > How about we make aml_method accept ... format instead? ok, I'll do it on respin > > > > } > > aml_append(ssdt, scope); > > > > diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl > > index 11e2e61..c9b2725 100644 > > --- a/hw/i386/acpi-dsdt.dsl > > +++ b/hw/i386/acpi-dsdt.dsl > > @@ -197,44 +197,4 @@ DefinitionBlock ( > > Method(_SRS, 1, NotSerialized) { } > > } > > } > > - > > -/**************************************************************** > > - * General purpose events > > - ****************************************************************/ > > - Scope(\_GPE) { > > - Name(_HID, "ACPI0006") > > - > > - Method(_L00) { > > - } > > - Method(_E01) { > > - // PCI hotplug event > > - Acquire(\_SB.PCI0.BLCK, 0xFFFF) > > - \_SB.PCI0.PCNT() > > - Release(\_SB.PCI0.BLCK) > > - } > > - Method(_L04) { > > - } > > - Method(_L05) { > > - } > > - Method(_L06) { > > - } > > - Method(_L07) { > > - } > > - Method(_L08) { > > - } > > - Method(_L09) { > > - } > > - Method(_L0A) { > > - } > > - Method(_L0B) { > > - } > > - Method(_L0C) { > > - } > > - Method(_L0D) { > > - } > > - Method(_L0E) { > > - } > > - Method(_L0F) { > > - } > > - } > > } > > diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl > > index 4862ded..e157615 100644 > > --- a/hw/i386/q35-acpi-dsdt.dsl > > +++ b/hw/i386/q35-acpi-dsdt.dsl > > @@ -375,40 +375,4 @@ DefinitionBlock ( > > define_gsi_link(GSIG, 0, 0x16) > > define_gsi_link(GSIH, 0, 0x17) > > } > > - > > -/**************************************************************** > > - * General purpose events > > - ****************************************************************/ > > - Scope(\_GPE) { > > - Name(_HID, "ACPI0006") > > - > > - Method(_L00) { > > - } > > - Method(_L01) { > > - } > > - Method(_L04) { > > - } > > - Method(_L05) { > > - } > > - Method(_L06) { > > - } > > - Method(_L07) { > > - } > > - Method(_L08) { > > - } > > - Method(_L09) { > > - } > > - Method(_L0A) { > > - } > > - Method(_L0B) { > > - } > > - Method(_L0C) { > > - } > > - Method(_L0D) { > > - } > > - Method(_L0E) { > > - } > > - Method(_L0F) { > > - } > > - } > > } > > -- > > 1.8.3.1 > >