[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 54/74] pc: acpi: move remaining GPE handlers int
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [PATCH 54/74] pc: acpi: move remaining GPE handlers into SSDT |
Date: |
Mon, 21 Dec 2015 16:35:23 +0100 |
On Sat, 19 Dec 2015 22:34:55 +0200
"Michael S. Tsirkin" <address@hidden> wrote:
> On Thu, Dec 10, 2015 at 12:41:48AM +0100, Igor Mammedov wrote:
> > Signed-off-by: Igor Mammedov <address@hidden>
> > ---
> > 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?
actually instead of making aml_method(format,...) it would be
easier to make it accept Aml* so we could reuse aml_name(format,...)
in the end it would look like:
Aml gpe_name = aml_name("_L0%X", i);
aml_method(gpe_name, AML_NOTSERIALIZED);
in addition name object could be reused in other places
that reference that method.
- [Qemu-devel] [PATCH 42/74] pc: acpi: cpuhp: move PRSC() method into SSDT, (continued)
- [Qemu-devel] [PATCH 42/74] pc: acpi: cpuhp: move PRSC() method into SSDT, Igor Mammedov, 2015/12/09
- [Qemu-devel] [PATCH 52/74] pc: acpi: move COM devices from DSDT to SSDT, Igor Mammedov, 2015/12/09
- [Qemu-devel] [PATCH 61/74] pc: acpi: q35: move GSI links to SSDT, Igor Mammedov, 2015/12/09
- [Qemu-devel] [PATCH 57/74] pc: acpi: piix4: move IQST() into SSDT, Igor Mammedov, 2015/12/09
- [Qemu-devel] [PATCH 65/74] pc: acpi: q35: move ISA bridge into SSDT, Igor Mammedov, 2015/12/09
- [Qemu-devel] [PATCH 49/74] pc: acpi: move MOU device from DSDT to SSDT, Igor Mammedov, 2015/12/09
- [Qemu-devel] [PATCH 54/74] pc: acpi: move remaining GPE handlers into SSDT, Igor Mammedov, 2015/12/09
- Re: [Qemu-devel] [PATCH 54/74] pc: acpi: move remaining GPE handlers into SSDT, Michael S. Tsirkin, 2015/12/19
- Re: [Qemu-devel] [PATCH 54/74] pc: acpi: move remaining GPE handlers into SSDT, Michael S. Tsirkin, 2015/12/19
- Re: [Qemu-devel] [PATCH 54/74] pc: acpi: move remaining GPE handlers into SSDT, Igor Mammedov, 2015/12/21
- Re: [Qemu-devel] [PATCH 54/74] pc: acpi: move remaining GPE handlers into SSDT,
Igor Mammedov <=
- Re: [Qemu-devel] [PATCH 54/74] pc: acpi: move remaining GPE handlers into SSDT, Michael S. Tsirkin, 2015/12/22
- Re: [Qemu-devel] [PATCH 54/74] pc: acpi: move remaining GPE handlers into SSDT, Igor Mammedov, 2015/12/22
- Re: [Qemu-devel] [PATCH 54/74] pc: acpi: move remaining GPE handlers into SSDT, Michael S. Tsirkin, 2015/12/22
- Re: [Qemu-devel] [PATCH 54/74] pc: acpi: move remaining GPE handlers into SSDT, Igor Mammedov, 2015/12/22
[Qemu-devel] [PATCH 58/74] pc: acpi: piix4: move PCI0._PRT() into SSDT, Igor Mammedov, 2015/12/09