* [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support @ 2015-12-28 16:57 Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 01/51] tests: acpi: print ASL diff in verbose mode Igor Mammedov ` (50 more replies) 0 siblings, 51 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 16:57 UTC (permalink / raw) To: qemu-devel; +Cc: ehabkost, marcel.apfelbaum, mst Changelog: v1->v2: - rebase on top of PCI tree skipping AML API patches as they are already applied there - drop a_ prefix for AML variables - use DIFF env. var. to specify diff utility to show ASL difference - build ISA device with a function pre device type at expence of some code duplication it makes code a little bit more readable. Later refactoring will remove duplicated code folding all of it into one simple function for all ISA devices. - unfold GPE stub handlers loop and opencode it, it adds ~10 extra LOC that will be removed at refactoring stage since stubs are not required by spec/guest leaving only GPE handlers that are actually doing something. - minor cleanups to make code more readble/clear, based on Marcel's and Michael's review. Due to huge size, CCing only cover letter instead of individual patches. Series converts DSDT using existing and new AML API. Series does exact byte by byte conversion and passes ACPI tables 'make check' tests. The conversion first moves common for PIIX4/Q35 parts, getting rid of *.dsl includes and then converts PIIX4 and Q35 parts of DSDT. Diff-stat looks nice but actual code base is reduced by ~2000LOC while the rest of 10000 removals is dropping precompiled AML templates from the tree. There are some AML parts that could be optimized/simplified and shared between PIIX4/Q35/ARM but doing it will break exact match with original tests, hence it's left out for later refactoring. git tree for testing: https://github.com/imammedo/qemu/tree/drop_ASL_support_v2 or github.com:imammedo/qemu.git drop_ASL_support_v2 Igor Mammedov (51): tests: acpi: print ASL diff in verbose mode pc: acpi: memhp: prepare context in SSDT for moving memhp DSDT code pc: acpi: memhp: move MHPD._STA method into SSDT pc: acpi: memhp: move MHPD.MLCK mutex into SSDT pc: acpi: memhp: move MHPD.MSCN method into SSDT pc: acpi: memhp: move MHPD.MRST method into SSDT pc: acpi: memhp: move MHPD.MPXM method into SSDT pc: acpi: memhp: move MHPD.MOST method into SSDT pc: acpi: memhp: move MHPD.MEJ0 method into SSDT pc: acpi: memhp: move MHPD.MCRS method into SSDT pc: acpi: memhp: move MHPD Device into SSDT pc: acpi: factor out memhp code from build_ssdt() into separate function pc: acpi: memhp: move \_GPE._E03 into SSDT pc: acpi: memhp: drop not needed stringify(MEMORY_foo) usage pc: acpi: drop unused CPU_STATUS_LEN from DSDT pc: acpi: cpuhp: move CPEJ() method to SSDT pc: acpi: cpuhp: move CPMA() method into SSDT pc: acpi: cpuhp: move CPST() method into SSDT pc: acpi: cpuhp: move PRSC() method into SSDT pc: acpi: cpuhp: move \_GPE._E02() into SSDT pc: acpi: factor out cpu hotplug code from build_ssdt() into separate function pc: acpi: move HPET from DSDT to SSDT pc: acpi: move DBUG() from DSDT to SSDT pc: acpi: move RTC device from DSDT to SSDT pc: acpi: move KBD device from DSDT to SSDT pc: acpi: move MOU device from DSDT to SSDT pc: acpi: move FDC0 device from DSDT to SSDT pc: acpi: move LPT device from DSDT to SSDT pc: acpi: move COM devices from DSDT to SSDT pc: acpi: move PIIX4 isa-bridge and pm devices into SSDT pc: acpi: move remaining GPE handlers into SSDT pc: acpi: pci: move link devices into SSDT pc: acpi: piix4: move IQCR() into SSDT pc: acpi: piix4: move IQST() into SSDT pc: acpi: piix4: move PCI0._PRT() into SSDT pc: acpi: piix4: move remaining PCI hotplug bits into SSDT pc: acpi: piix4: acpi move PCI0 device to SSDT pc: acpi: q35: move GSI links to SSDT pc: acpi: q35: move link devices to SSDT pc: acpi: q35: move IQCR() into SSDT pc: acpi: q35: move IQST() into SSDT pc: acpi: q35: move ISA bridge into SSDT pc: acpi: q35: move _PRT() into SSDT pc: acpi: q35: move PRTA routing table into SSDT pc: acpi: q35: move PRTP routing table into SSDT pc: acpi: q35: move _PIC() method into SSDT pc: acpi: q35: move PCI0._OSC() method into SSDT pc: acpi: q35: move PCI0 device definition into SSDT pc: acpi: q35: PCST, PCSB opregions and PCIB field into SSDT pc: acpi: switch to AML API composed DSDT pc: acpi: remove unused ASL templates and related blobs/utils hw/acpi/Makefile.objs | 4 +- hw/acpi/cpu_hotplug_acpi_table.c | 135 + hw/acpi/memory_hotplug_acpi_table.c | 262 ++ hw/i386/Makefile.objs | 30 - hw/i386/acpi-build.c | 1367 +++++-- hw/i386/acpi-dsdt-cpu-hotplug.dsl | 90 - hw/i386/acpi-dsdt-dbug.dsl | 41 - hw/i386/acpi-dsdt-hpet.dsl | 48 - hw/i386/acpi-dsdt-isa.dsl | 117 - hw/i386/acpi-dsdt-mem-hotplug.dsl | 171 - hw/i386/acpi-dsdt.dsl | 303 -- hw/i386/acpi-dsdt.hex.generated | 2972 -------------- hw/i386/q35-acpi-dsdt.dsl | 436 -- hw/i386/q35-acpi-dsdt.hex.generated | 7610 ----------------------------------- hw/timer/hpet.c | 2 +- include/hw/acpi/aml-build.h | 3 + include/hw/acpi/cpu_hotplug.h | 10 + include/hw/acpi/memory_hotplug.h | 9 + include/hw/acpi/pc-hotplug.h | 44 +- include/hw/timer/hpet.h | 1 + scripts/acpi_extract.py | 367 -- scripts/acpi_extract_preprocess.py | 51 - scripts/update-acpi.sh | 4 - tests/bios-tables-test.c | 16 + 24 files changed, 1599 insertions(+), 12494 deletions(-) create mode 100644 hw/acpi/cpu_hotplug_acpi_table.c create mode 100644 hw/acpi/memory_hotplug_acpi_table.c delete mode 100644 hw/i386/acpi-dsdt-cpu-hotplug.dsl delete mode 100644 hw/i386/acpi-dsdt-dbug.dsl delete mode 100644 hw/i386/acpi-dsdt-hpet.dsl delete mode 100644 hw/i386/acpi-dsdt-isa.dsl delete mode 100644 hw/i386/acpi-dsdt-mem-hotplug.dsl delete mode 100644 hw/i386/acpi-dsdt.dsl delete mode 100644 hw/i386/acpi-dsdt.hex.generated delete mode 100644 hw/i386/q35-acpi-dsdt.dsl delete mode 100644 hw/i386/q35-acpi-dsdt.hex.generated delete mode 100755 scripts/acpi_extract.py delete mode 100755 scripts/acpi_extract_preprocess.py delete mode 100644 scripts/update-acpi.sh -- 1.8.3.1 ^ permalink raw reply [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 01/51] tests: acpi: print ASL diff in verbose mode 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 02/51] pc: acpi: memhp: prepare context in SSDT for moving memhp DSDT code Igor Mammedov ` (49 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel print ASL difference if there is any when executing 'make V=1 check'. Use 'DIFF' environment variable to determine which diff utility to use and if it's not set notify user by printing warning that DIFF is not set if run in verbose mode and there is difference in ASL. Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- tests/bios-tables-test.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c index 6d37332..75ec330 100644 --- a/tests/bios-tables-test.c +++ b/tests/bios-tables-test.c @@ -580,6 +580,22 @@ static void test_acpi_asl(test_data *data) (gchar *)&signature, sdt->asl_file, sdt->aml_file, exp_sdt->asl_file, exp_sdt->aml_file); + if (getenv("V")) { + const char *diff_cmd = getenv("DIFF"); + if (diff_cmd) { + int ret G_GNUC_UNUSED; + char *diff = g_strdup_printf("%s %s %s", diff_cmd, + exp_sdt->asl_file, sdt->asl_file); + ret = system(diff) ; + g_free(diff); + } else { + fprintf(stderr, "acpi-test: Warning. not showing " + "difference since no diff utility is specified. " + "Set 'DIFF' environment variable to a preferred " + "diff utility and run 'make V=1 check' again to " + "see ASL difference."); + } + } } } g_string_free(asl, true); -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 02/51] pc: acpi: memhp: prepare context in SSDT for moving memhp DSDT code 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 01/51] tests: acpi: print ASL diff in verbose mode Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 03/51] pc: acpi: memhp: move MHPD._STA method into SSDT Igor Mammedov ` (48 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/acpi/Makefile.objs | 2 +- hw/acpi/memory_hotplug_acpi_table.c | 30 ++++++++++++++++++++++++++++++ hw/i386/acpi-build.c | 3 +++ include/hw/acpi/memory_hotplug.h | 4 ++++ 4 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 hw/acpi/memory_hotplug_acpi_table.c diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs index 095597f..052be62 100644 --- a/hw/acpi/Makefile.objs +++ b/hw/acpi/Makefile.objs @@ -1,7 +1,7 @@ common-obj-$(CONFIG_ACPI_X86) += core.o piix4.o pcihp.o common-obj-$(CONFIG_ACPI_X86_ICH) += ich9.o tco.o common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu_hotplug.o -common-obj-$(CONFIG_ACPI_MEMORY_HOTPLUG) += memory_hotplug.o +common-obj-$(CONFIG_ACPI_MEMORY_HOTPLUG) += memory_hotplug.o memory_hotplug_acpi_table.o common-obj-$(CONFIG_ACPI_NVDIMM) += nvdimm.o common-obj-$(CONFIG_ACPI) += acpi_interface.o common-obj-$(CONFIG_ACPI) += bios-linker-loader.o diff --git a/hw/acpi/memory_hotplug_acpi_table.c b/hw/acpi/memory_hotplug_acpi_table.c new file mode 100644 index 0000000..35fefba --- /dev/null +++ b/hw/acpi/memory_hotplug_acpi_table.c @@ -0,0 +1,30 @@ +/* + * Memory hotplug AML code of DSDT ACPI table + * + * Copyright (C) 2015 Red Hat Inc + * + * Author: Igor Mammedov <imammedo@redhat.com> + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#include <stdbool.h> +#include "hw/acpi/memory_hotplug.h" +#include "include/hw/acpi/pc-hotplug.h" +#include "hw/boards.h" + +void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, + uint16_t io_base, uint16_t io_len) +{ + Aml *pci_scope; + Aml *mem_ctrl_dev; + + /* scope for memory hotplug controller device node */ + pci_scope = aml_scope("_SB.PCI0"); + mem_ctrl_dev = aml_scope(stringify(MEMORY_HOTPLUG_DEVICE)); + { + } + aml_append(pci_scope, mem_ctrl_dev); + aml_append(ctx, pci_scope); +} diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 4cc1440..e365047 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -954,6 +954,9 @@ build_ssdt(GArray *table_data, GArray *linker, /* Reserve space for header */ acpi_data_push(ssdt->buf, sizeof(AcpiTableHeader)); + build_memory_hotplug_aml(ssdt, nr_mem, pm->mem_hp_io_base, + pm->mem_hp_io_len); + bus = PC_MACHINE(machine)->bus; if (bus) { QLIST_FOREACH(bus, &bus->child, sibling) { diff --git a/include/hw/acpi/memory_hotplug.h b/include/hw/acpi/memory_hotplug.h index 1342adb..b6e9f50 100644 --- a/include/hw/acpi/memory_hotplug.h +++ b/include/hw/acpi/memory_hotplug.h @@ -4,6 +4,7 @@ #include "hw/qdev-core.h" #include "hw/acpi/acpi.h" #include "migration/vmstate.h" +#include "hw/acpi/aml-build.h" /** * MemStatus: @@ -45,4 +46,7 @@ extern const VMStateDescription vmstate_memory_hotplug; vmstate_memory_hotplug, MemHotplugState) void acpi_memory_ospm_status(MemHotplugState *mem_st, ACPIOSTInfoList ***list); + +void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, + uint16_t io_base, uint16_t io_len); #endif -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 03/51] pc: acpi: memhp: move MHPD._STA method into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 01/51] tests: acpi: print ASL diff in verbose mode Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 02/51] pc: acpi: memhp: prepare context in SSDT for moving memhp DSDT code Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 04/51] pc: acpi: memhp: move MHPD.MLCK mutex " Igor Mammedov ` (47 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- v3: - drop ASL comment - s/ctrl_dev/mem_ctrl_dev/ - move locals 'zero', 'slots_nr' inside if block v2: - add parentheses around ifctx block Suggested-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> --- hw/acpi/memory_hotplug_acpi_table.c | 14 ++++++++++++++ hw/i386/acpi-dsdt-mem-hotplug.dsl | 8 -------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/hw/acpi/memory_hotplug_acpi_table.c b/hw/acpi/memory_hotplug_acpi_table.c index 35fefba..a21ef6f 100644 --- a/hw/acpi/memory_hotplug_acpi_table.c +++ b/hw/acpi/memory_hotplug_acpi_table.c @@ -17,6 +17,8 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, uint16_t io_base, uint16_t io_len) { + Aml *ifctx; + Aml *method; Aml *pci_scope; Aml *mem_ctrl_dev; @@ -24,6 +26,18 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, pci_scope = aml_scope("_SB.PCI0"); mem_ctrl_dev = aml_scope(stringify(MEMORY_HOTPLUG_DEVICE)); { + Aml *zero = aml_int(0); + Aml *slots_nr = aml_name(stringify(MEMORY_SLOTS_NUMBER)); + + method = aml_method("_STA", 0, AML_NOTSERIALIZED); + ifctx = aml_if(aml_equal(slots_nr, zero)); + { + aml_append(ifctx, aml_return(zero)); + } + aml_append(method, ifctx); + /* present, functioning, decoding, not shown in UI */ + aml_append(method, aml_return(aml_int(0xB))); + aml_append(mem_ctrl_dev, method); } aml_append(pci_scope, mem_ctrl_dev); aml_append(ctx, pci_scope); diff --git a/hw/i386/acpi-dsdt-mem-hotplug.dsl b/hw/i386/acpi-dsdt-mem-hotplug.dsl index c2bb6a1..b4eacc9 100644 --- a/hw/i386/acpi-dsdt-mem-hotplug.dsl +++ b/hw/i386/acpi-dsdt-mem-hotplug.dsl @@ -35,14 +35,6 @@ External(MEMORY_SLOT_OST_EVENT, FieldUnitObj) // _OST event code, write only External(MEMORY_SLOT_OST_STATUS, FieldUnitObj) // _OST status code, write only - Method(_STA, 0) { - If (LEqual(MEMORY_SLOTS_NUMBER, Zero)) { - Return(0x0) - } - /* present, functioning, decoding, not shown in UI */ - Return(0xB) - } - Mutex (MEMORY_SLOT_LOCK, 0) Method(MEMORY_SLOT_SCAN_METHOD, 0) { -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 04/51] pc: acpi: memhp: move MHPD.MLCK mutex into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (2 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 03/51] pc: acpi: memhp: move MHPD._STA method into SSDT Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 05/51] pc: acpi: memhp: move MHPD.MSCN method " Igor Mammedov ` (46 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/acpi/memory_hotplug_acpi_table.c | 2 ++ hw/i386/acpi-dsdt-mem-hotplug.dsl | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/acpi/memory_hotplug_acpi_table.c b/hw/acpi/memory_hotplug_acpi_table.c index a21ef6f..c2bd928 100644 --- a/hw/acpi/memory_hotplug_acpi_table.c +++ b/hw/acpi/memory_hotplug_acpi_table.c @@ -38,6 +38,8 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, /* present, functioning, decoding, not shown in UI */ aml_append(method, aml_return(aml_int(0xB))); aml_append(mem_ctrl_dev, method); + + aml_append(mem_ctrl_dev, aml_mutex(stringify(MEMORY_SLOT_LOCK), 0)); } aml_append(pci_scope, mem_ctrl_dev); aml_append(ctx, pci_scope); diff --git a/hw/i386/acpi-dsdt-mem-hotplug.dsl b/hw/i386/acpi-dsdt-mem-hotplug.dsl index b4eacc9..a1e519b 100644 --- a/hw/i386/acpi-dsdt-mem-hotplug.dsl +++ b/hw/i386/acpi-dsdt-mem-hotplug.dsl @@ -34,8 +34,7 @@ External(MEMORY_SLOT_SLECTOR, FieldUnitObj) // DIMM selector, write only External(MEMORY_SLOT_OST_EVENT, FieldUnitObj) // _OST event code, write only External(MEMORY_SLOT_OST_STATUS, FieldUnitObj) // _OST status code, write only - - Mutex (MEMORY_SLOT_LOCK, 0) + External(MEMORY_SLOT_LOCK, MutexObj) Method(MEMORY_SLOT_SCAN_METHOD, 0) { If (LEqual(MEMORY_SLOTS_NUMBER, Zero)) { -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 05/51] pc: acpi: memhp: move MHPD.MSCN method into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (3 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 04/51] pc: acpi: memhp: move MHPD.MLCK mutex " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 06/51] pc: acpi: memhp: move MHPD.MRST " Igor Mammedov ` (45 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/acpi/memory_hotplug_acpi_table.c | 60 +++++++++++++++++++++++++++++++++++++ hw/i386/acpi-dsdt-mem-hotplug.dsl | 27 +---------------- 2 files changed, 61 insertions(+), 26 deletions(-) diff --git a/hw/acpi/memory_hotplug_acpi_table.c b/hw/acpi/memory_hotplug_acpi_table.c index c2bd928..86b8233 100644 --- a/hw/acpi/memory_hotplug_acpi_table.c +++ b/hw/acpi/memory_hotplug_acpi_table.c @@ -26,8 +26,11 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, pci_scope = aml_scope("_SB.PCI0"); mem_ctrl_dev = aml_scope(stringify(MEMORY_HOTPLUG_DEVICE)); { + Aml *one = aml_int(1); Aml *zero = aml_int(0); Aml *slots_nr = aml_name(stringify(MEMORY_SLOTS_NUMBER)); + Aml *ctrl_lock = aml_name(stringify(MEMORY_SLOT_LOCK)); + Aml *slot_selector = aml_name(stringify(MEMORY_SLOT_SLECTOR)); method = aml_method("_STA", 0, AML_NOTSERIALIZED); ifctx = aml_if(aml_equal(slots_nr, zero)); @@ -40,6 +43,63 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, aml_append(mem_ctrl_dev, method); aml_append(mem_ctrl_dev, aml_mutex(stringify(MEMORY_SLOT_LOCK), 0)); + + method = aml_method(stringify(MEMORY_SLOT_SCAN_METHOD), 0, + AML_NOTSERIALIZED); + { + Aml *else_ctx; + Aml *while_ctx; + Aml *idx = aml_local(0); + Aml *eject_req = aml_int(3); + Aml *dev_chk = aml_int(1); + + ifctx = aml_if(aml_equal(slots_nr, zero)); + { + aml_append(ifctx, aml_return(zero)); + } + aml_append(method, ifctx); + + aml_append(method, aml_store(zero, idx)); + aml_append(method, aml_acquire(ctrl_lock, 0xFFFF)); + /* build AML that: + * loops over all slots and Notifies DIMMs with + * Device Check or Eject Request notifications if + * slot has corresponding status bit set and clears + * slot status. + */ + while_ctx = aml_while(aml_lless(idx, slots_nr)); + { + Aml *ins_evt = aml_name(stringify(MEMORY_SLOT_INSERT_EVENT)); + Aml *rm_evt = aml_name(stringify(MEMORY_SLOT_REMOVE_EVENT)); + + aml_append(while_ctx, aml_store(idx, slot_selector)); + ifctx = aml_if(aml_equal(ins_evt, one)); + { + aml_append(ifctx, + aml_call2(stringify(MEMORY_SLOT_NOTIFY_METHOD), + idx, dev_chk)); + aml_append(ifctx, aml_store(one, ins_evt)); + } + aml_append(while_ctx, ifctx); + + else_ctx = aml_else(); + ifctx = aml_if(aml_equal(rm_evt, one)); + { + aml_append(ifctx, + aml_call2(stringify(MEMORY_SLOT_NOTIFY_METHOD), + idx, eject_req)); + aml_append(ifctx, aml_store(one, rm_evt)); + } + aml_append(else_ctx, ifctx); + aml_append(while_ctx, else_ctx); + + aml_append(while_ctx, aml_add(idx, one, idx)); + } + aml_append(method, while_ctx); + aml_append(method, aml_release(ctrl_lock)); + aml_append(method, aml_return(one)); + } + aml_append(mem_ctrl_dev, method); } aml_append(pci_scope, mem_ctrl_dev); aml_append(ctx, pci_scope); diff --git a/hw/i386/acpi-dsdt-mem-hotplug.dsl b/hw/i386/acpi-dsdt-mem-hotplug.dsl index a1e519b..92baf87 100644 --- a/hw/i386/acpi-dsdt-mem-hotplug.dsl +++ b/hw/i386/acpi-dsdt-mem-hotplug.dsl @@ -13,13 +13,12 @@ * with this program; if not, see <http://www.gnu.org/licenses/>. */ - External(MEMORY_SLOT_NOTIFY_METHOD, MethodObj) + External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD, MethodObj) Scope(\_SB.PCI0) { Device(MEMORY_HOTPLUG_DEVICE) { Name(_HID, "PNP0A06") Name(_UID, "Memory hotplug resources") - External(MEMORY_SLOTS_NUMBER, IntObj) /* Memory hotplug IO registers */ External(MEMORY_SLOT_ADDR_LOW, FieldUnitObj) // read only @@ -28,36 +27,12 @@ External(MEMORY_SLOT_SIZE_HIGH, FieldUnitObj) // read only External(MEMORY_SLOT_PROXIMITY, FieldUnitObj) // read only External(MEMORY_SLOT_ENABLED, FieldUnitObj) // 1 if enabled, read only - External(MEMORY_SLOT_INSERT_EVENT, FieldUnitObj) // (read) 1 if has a insert event. (write) 1 to clear event - External(MEMORY_SLOT_REMOVE_EVENT, FieldUnitObj) // (read) 1 if has a remove event. (write) 1 to clear event External(MEMORY_SLOT_EJECT, FieldUnitObj) // initiates device eject, write only External(MEMORY_SLOT_SLECTOR, FieldUnitObj) // DIMM selector, write only External(MEMORY_SLOT_OST_EVENT, FieldUnitObj) // _OST event code, write only External(MEMORY_SLOT_OST_STATUS, FieldUnitObj) // _OST status code, write only External(MEMORY_SLOT_LOCK, MutexObj) - Method(MEMORY_SLOT_SCAN_METHOD, 0) { - If (LEqual(MEMORY_SLOTS_NUMBER, Zero)) { - Return(Zero) - } - - Store(Zero, Local0) // Mem devs iterrator - Acquire(MEMORY_SLOT_LOCK, 0xFFFF) - while (LLess(Local0, MEMORY_SLOTS_NUMBER)) { - Store(Local0, MEMORY_SLOT_SLECTOR) // select Local0 DIMM - If (LEqual(MEMORY_SLOT_INSERT_EVENT, One)) { // Memory device needs check - MEMORY_SLOT_NOTIFY_METHOD(Local0, 1) - Store(1, MEMORY_SLOT_INSERT_EVENT) - } Elseif (LEqual(MEMORY_SLOT_REMOVE_EVENT, One)) { // Ejection request - MEMORY_SLOT_NOTIFY_METHOD(Local0, 3) - Store(1, MEMORY_SLOT_REMOVE_EVENT) - } - Add(Local0, One, Local0) // goto next DIMM - } - Release(MEMORY_SLOT_LOCK) - Return(One) - } - Method(MEMORY_SLOT_STATUS_METHOD, 1) { Store(Zero, Local0) -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 06/51] pc: acpi: memhp: move MHPD.MRST method into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (4 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 05/51] pc: acpi: memhp: move MHPD.MSCN method " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 07/51] pc: acpi: memhp: move MHPD.MPXM " Igor Mammedov ` (44 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/acpi/memory_hotplug_acpi_table.c | 23 +++++++++++++++++++++++ hw/i386/acpi-dsdt-mem-hotplug.dsl | 15 --------------- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/hw/acpi/memory_hotplug_acpi_table.c b/hw/acpi/memory_hotplug_acpi_table.c index 86b8233..07d78f0 100644 --- a/hw/acpi/memory_hotplug_acpi_table.c +++ b/hw/acpi/memory_hotplug_acpi_table.c @@ -28,6 +28,8 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, { Aml *one = aml_int(1); Aml *zero = aml_int(0); + Aml *ret_val = aml_local(0); + Aml *slot_arg0 = aml_arg(0); Aml *slots_nr = aml_name(stringify(MEMORY_SLOTS_NUMBER)); Aml *ctrl_lock = aml_name(stringify(MEMORY_SLOT_LOCK)); Aml *slot_selector = aml_name(stringify(MEMORY_SLOT_SLECTOR)); @@ -100,6 +102,27 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, aml_append(method, aml_return(one)); } aml_append(mem_ctrl_dev, method); + + method = aml_method(stringify(MEMORY_SLOT_STATUS_METHOD), 1, + AML_NOTSERIALIZED); + { + Aml *slot_enabled = aml_name(stringify(MEMORY_SLOT_ENABLED)); + + aml_append(method, aml_store(zero, ret_val)); + aml_append(method, aml_acquire(ctrl_lock, 0xFFFF)); + aml_append(method, + aml_store(aml_to_integer(slot_arg0), slot_selector)); + + ifctx = aml_if(aml_equal(slot_enabled, one)); + { + aml_append(ifctx, aml_store(aml_int(0xF), ret_val)); + } + aml_append(method, ifctx); + + aml_append(method, aml_release(ctrl_lock)); + aml_append(method, aml_return(ret_val)); + } + aml_append(mem_ctrl_dev, method); } aml_append(pci_scope, mem_ctrl_dev); aml_append(ctx, pci_scope); diff --git a/hw/i386/acpi-dsdt-mem-hotplug.dsl b/hw/i386/acpi-dsdt-mem-hotplug.dsl index 92baf87..13e93dc 100644 --- a/hw/i386/acpi-dsdt-mem-hotplug.dsl +++ b/hw/i386/acpi-dsdt-mem-hotplug.dsl @@ -26,27 +26,12 @@ External(MEMORY_SLOT_SIZE_LOW, FieldUnitObj) // read only External(MEMORY_SLOT_SIZE_HIGH, FieldUnitObj) // read only External(MEMORY_SLOT_PROXIMITY, FieldUnitObj) // read only - External(MEMORY_SLOT_ENABLED, FieldUnitObj) // 1 if enabled, read only External(MEMORY_SLOT_EJECT, FieldUnitObj) // initiates device eject, write only External(MEMORY_SLOT_SLECTOR, FieldUnitObj) // DIMM selector, write only External(MEMORY_SLOT_OST_EVENT, FieldUnitObj) // _OST event code, write only External(MEMORY_SLOT_OST_STATUS, FieldUnitObj) // _OST status code, write only External(MEMORY_SLOT_LOCK, MutexObj) - Method(MEMORY_SLOT_STATUS_METHOD, 1) { - Store(Zero, Local0) - - Acquire(MEMORY_SLOT_LOCK, 0xFFFF) - Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM - - If (LEqual(MEMORY_SLOT_ENABLED, One)) { - Store(0xF, Local0) - } - - Release(MEMORY_SLOT_LOCK) - Return(Local0) - } - Method(MEMORY_SLOT_CRS_METHOD, 1, Serialized) { Acquire(MEMORY_SLOT_LOCK, 0xFFFF) Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 07/51] pc: acpi: memhp: move MHPD.MPXM method into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (5 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 06/51] pc: acpi: memhp: move MHPD.MRST " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 08/51] pc: acpi: memhp: move MHPD.MOST " Igor Mammedov ` (43 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/acpi/memory_hotplug_acpi_table.c | 14 ++++++++++++++ hw/i386/acpi-dsdt-mem-hotplug.dsl | 9 --------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/hw/acpi/memory_hotplug_acpi_table.c b/hw/acpi/memory_hotplug_acpi_table.c index 07d78f0..5289014 100644 --- a/hw/acpi/memory_hotplug_acpi_table.c +++ b/hw/acpi/memory_hotplug_acpi_table.c @@ -123,6 +123,20 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, aml_append(method, aml_return(ret_val)); } aml_append(mem_ctrl_dev, method); + + method = aml_method(stringify(MEMORY_SLOT_PROXIMITY_METHOD), 1, + AML_NOTSERIALIZED); + { + Aml *proximity = aml_name(stringify(MEMORY_SLOT_PROXIMITY)); + + aml_append(method, aml_acquire(ctrl_lock, 0xFFFF)); + aml_append(method, aml_store(aml_to_integer(slot_arg0), + slot_selector)); + aml_append(method, aml_store(proximity, ret_val)); + aml_append(method, aml_release(ctrl_lock)); + aml_append(method, aml_return(ret_val)); + } + aml_append(mem_ctrl_dev, method); } aml_append(pci_scope, mem_ctrl_dev); aml_append(ctx, pci_scope); diff --git a/hw/i386/acpi-dsdt-mem-hotplug.dsl b/hw/i386/acpi-dsdt-mem-hotplug.dsl index 13e93dc..02fecf2 100644 --- a/hw/i386/acpi-dsdt-mem-hotplug.dsl +++ b/hw/i386/acpi-dsdt-mem-hotplug.dsl @@ -25,7 +25,6 @@ External(MEMORY_SLOT_ADDR_HIGH, FieldUnitObj) // read only External(MEMORY_SLOT_SIZE_LOW, FieldUnitObj) // read only External(MEMORY_SLOT_SIZE_HIGH, FieldUnitObj) // read only - External(MEMORY_SLOT_PROXIMITY, FieldUnitObj) // read only External(MEMORY_SLOT_EJECT, FieldUnitObj) // initiates device eject, write only External(MEMORY_SLOT_SLECTOR, FieldUnitObj) // DIMM selector, write only External(MEMORY_SLOT_OST_EVENT, FieldUnitObj) // _OST event code, write only @@ -96,14 +95,6 @@ Return(MR64) } - Method(MEMORY_SLOT_PROXIMITY_METHOD, 1) { - Acquire(MEMORY_SLOT_LOCK, 0xFFFF) - Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM - Store(MEMORY_SLOT_PROXIMITY, Local0) - Release(MEMORY_SLOT_LOCK) - Return(Local0) - } - Method(MEMORY_SLOT_OST_METHOD, 4) { Acquire(MEMORY_SLOT_LOCK, 0xFFFF) Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 08/51] pc: acpi: memhp: move MHPD.MOST method into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (6 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 07/51] pc: acpi: memhp: move MHPD.MPXM " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 09/51] pc: acpi: memhp: move MHPD.MEJ0 " Igor Mammedov ` (42 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/acpi/memory_hotplug_acpi_table.c | 15 +++++++++++++++ hw/i386/acpi-dsdt-mem-hotplug.dsl | 10 ---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/hw/acpi/memory_hotplug_acpi_table.c b/hw/acpi/memory_hotplug_acpi_table.c index 5289014..4edf680 100644 --- a/hw/acpi/memory_hotplug_acpi_table.c +++ b/hw/acpi/memory_hotplug_acpi_table.c @@ -137,6 +137,21 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, aml_append(method, aml_return(ret_val)); } aml_append(mem_ctrl_dev, method); + + method = aml_method(stringify(MEMORY_SLOT_OST_METHOD), 4, + AML_NOTSERIALIZED); + { + Aml *ost_evt = aml_name(stringify(MEMORY_SLOT_OST_EVENT)); + Aml *ost_status = aml_name(stringify(MEMORY_SLOT_OST_STATUS)); + + aml_append(method, aml_acquire(ctrl_lock, 0xFFFF)); + aml_append(method, aml_store(aml_to_integer(slot_arg0), + slot_selector)); + aml_append(method, aml_store(aml_arg(1), ost_evt)); + aml_append(method, aml_store(aml_arg(2), ost_status)); + aml_append(method, aml_release(ctrl_lock)); + } + aml_append(mem_ctrl_dev, method); } aml_append(pci_scope, mem_ctrl_dev); aml_append(ctx, pci_scope); diff --git a/hw/i386/acpi-dsdt-mem-hotplug.dsl b/hw/i386/acpi-dsdt-mem-hotplug.dsl index 02fecf2..8889eca 100644 --- a/hw/i386/acpi-dsdt-mem-hotplug.dsl +++ b/hw/i386/acpi-dsdt-mem-hotplug.dsl @@ -27,8 +27,6 @@ External(MEMORY_SLOT_SIZE_HIGH, FieldUnitObj) // read only External(MEMORY_SLOT_EJECT, FieldUnitObj) // initiates device eject, write only External(MEMORY_SLOT_SLECTOR, FieldUnitObj) // DIMM selector, write only - External(MEMORY_SLOT_OST_EVENT, FieldUnitObj) // _OST event code, write only - External(MEMORY_SLOT_OST_STATUS, FieldUnitObj) // _OST status code, write only External(MEMORY_SLOT_LOCK, MutexObj) Method(MEMORY_SLOT_CRS_METHOD, 1, Serialized) { @@ -95,14 +93,6 @@ Return(MR64) } - Method(MEMORY_SLOT_OST_METHOD, 4) { - Acquire(MEMORY_SLOT_LOCK, 0xFFFF) - Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM - Store(Arg1, MEMORY_SLOT_OST_EVENT) - Store(Arg2, MEMORY_SLOT_OST_STATUS) - Release(MEMORY_SLOT_LOCK) - } - Method(MEMORY_SLOT_EJECT_METHOD, 2) { Acquire(MEMORY_SLOT_LOCK, 0xFFFF) Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 09/51] pc: acpi: memhp: move MHPD.MEJ0 method into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (7 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 08/51] pc: acpi: memhp: move MHPD.MOST " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 10/51] pc: acpi: memhp: move MHPD.MCRS " Igor Mammedov ` (41 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/acpi/memory_hotplug_acpi_table.c | 13 +++++++++++++ hw/i386/acpi-dsdt-mem-hotplug.dsl | 8 -------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/hw/acpi/memory_hotplug_acpi_table.c b/hw/acpi/memory_hotplug_acpi_table.c index 4edf680..c2bfcd6 100644 --- a/hw/acpi/memory_hotplug_acpi_table.c +++ b/hw/acpi/memory_hotplug_acpi_table.c @@ -152,6 +152,19 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, aml_append(method, aml_release(ctrl_lock)); } aml_append(mem_ctrl_dev, method); + + method = aml_method(stringify(MEMORY_SLOT_EJECT_METHOD), 2, + AML_NOTSERIALIZED); + { + Aml *eject = aml_name(stringify(MEMORY_SLOT_EJECT)); + + aml_append(method, aml_acquire(ctrl_lock, 0xFFFF)); + aml_append(method, aml_store(aml_to_integer(slot_arg0), + slot_selector)); + aml_append(method, aml_store(one, eject)); + aml_append(method, aml_release(ctrl_lock)); + } + aml_append(mem_ctrl_dev, method); } aml_append(pci_scope, mem_ctrl_dev); aml_append(ctx, pci_scope); diff --git a/hw/i386/acpi-dsdt-mem-hotplug.dsl b/hw/i386/acpi-dsdt-mem-hotplug.dsl index 8889eca..87d8d66 100644 --- a/hw/i386/acpi-dsdt-mem-hotplug.dsl +++ b/hw/i386/acpi-dsdt-mem-hotplug.dsl @@ -25,7 +25,6 @@ External(MEMORY_SLOT_ADDR_HIGH, FieldUnitObj) // read only External(MEMORY_SLOT_SIZE_LOW, FieldUnitObj) // read only External(MEMORY_SLOT_SIZE_HIGH, FieldUnitObj) // read only - External(MEMORY_SLOT_EJECT, FieldUnitObj) // initiates device eject, write only External(MEMORY_SLOT_SLECTOR, FieldUnitObj) // DIMM selector, write only External(MEMORY_SLOT_LOCK, MutexObj) @@ -92,12 +91,5 @@ Release(MEMORY_SLOT_LOCK) Return(MR64) } - - Method(MEMORY_SLOT_EJECT_METHOD, 2) { - Acquire(MEMORY_SLOT_LOCK, 0xFFFF) - Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM - Store(1, MEMORY_SLOT_EJECT) - Release(MEMORY_SLOT_LOCK) - } } // Device() } // Scope() -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 10/51] pc: acpi: memhp: move MHPD.MCRS method into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (8 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 09/51] pc: acpi: memhp: move MHPD.MEJ0 " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 11/51] pc: acpi: memhp: move MHPD Device " Igor Mammedov ` (40 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/acpi/memory_hotplug_acpi_table.c | 92 +++++++++++++++++++++++++++++++++++++ hw/i386/acpi-dsdt-mem-hotplug.dsl | 72 ----------------------------- 2 files changed, 92 insertions(+), 72 deletions(-) diff --git a/hw/acpi/memory_hotplug_acpi_table.c b/hw/acpi/memory_hotplug_acpi_table.c index c2bfcd6..2428e84 100644 --- a/hw/acpi/memory_hotplug_acpi_table.c +++ b/hw/acpi/memory_hotplug_acpi_table.c @@ -124,6 +124,98 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, } aml_append(mem_ctrl_dev, method); + method = aml_method(stringify(MEMORY_SLOT_CRS_METHOD), 1, + AML_SERIALIZED); + { + Aml *mr64 = aml_name("MR64"); + Aml *mr32 = aml_name("MR32"); + Aml *crs_tmpl = aml_resource_template(); + Aml *minl = aml_name("MINL"); + Aml *minh = aml_name("MINH"); + Aml *maxl = aml_name("MAXL"); + Aml *maxh = aml_name("MAXH"); + Aml *lenl = aml_name("LENL"); + Aml *lenh = aml_name("LENH"); + + aml_append(method, aml_acquire(ctrl_lock, 0xFFFF)); + aml_append(method, aml_store(aml_to_integer(slot_arg0), + slot_selector)); + + aml_append(crs_tmpl, + aml_qword_memory(AML_POS_DECODE, AML_MIN_FIXED, AML_MAX_FIXED, + AML_CACHEABLE, AML_READ_WRITE, + 0, 0x0, 0xFFFFFFFFFFFFFFFE, 0, + 0xFFFFFFFFFFFFFFFF)); + aml_append(method, aml_name_decl("MR64", crs_tmpl)); + aml_append(method, + aml_create_dword_field(mr64, aml_int(14), "MINL")); + aml_append(method, + aml_create_dword_field(mr64, aml_int(18), "MINH")); + aml_append(method, + aml_create_dword_field(mr64, aml_int(38), "LENL")); + aml_append(method, + aml_create_dword_field(mr64, aml_int(42), "LENH")); + aml_append(method, + aml_create_dword_field(mr64, aml_int(22), "MAXL")); + aml_append(method, + aml_create_dword_field(mr64, aml_int(26), "MAXH")); + + aml_append(method, + aml_store(aml_name(stringify(MEMORY_SLOT_ADDR_HIGH)), minh)); + aml_append(method, + aml_store(aml_name(stringify(MEMORY_SLOT_ADDR_LOW)), minl)); + aml_append(method, + aml_store(aml_name(stringify(MEMORY_SLOT_SIZE_HIGH)), lenh)); + aml_append(method, + aml_store(aml_name(stringify(MEMORY_SLOT_SIZE_LOW)), lenl)); + + /* 64-bit math: MAX = MIN + LEN - 1 */ + aml_append(method, aml_add(minl, lenl, maxl)); + aml_append(method, aml_add(minh, lenh, maxh)); + ifctx = aml_if(aml_lless(maxl, minl)); + { + aml_append(ifctx, aml_add(maxh, one, maxh)); + } + aml_append(method, ifctx); + ifctx = aml_if(aml_lless(maxl, one)); + { + aml_append(ifctx, aml_subtract(maxh, one, maxh)); + } + aml_append(method, ifctx); + aml_append(method, aml_subtract(maxl, one, maxl)); + + /* return 32-bit _CRS if addr/size is in low mem */ + /* TODO: remove it since all hotplugged DIMMs are in high mem */ + ifctx = aml_if(aml_equal(maxh, zero)); + { + crs_tmpl = aml_resource_template(); + aml_append(crs_tmpl, + aml_dword_memory(AML_POS_DECODE, AML_MIN_FIXED, + AML_MAX_FIXED, AML_CACHEABLE, + AML_READ_WRITE, + 0, 0x0, 0xFFFFFFFE, 0, + 0xFFFFFFFF)); + aml_append(ifctx, aml_name_decl("MR32", crs_tmpl)); + aml_append(ifctx, + aml_create_dword_field(mr32, aml_int(10), "MIN")); + aml_append(ifctx, + aml_create_dword_field(mr32, aml_int(14), "MAX")); + aml_append(ifctx, + aml_create_dword_field(mr32, aml_int(22), "LEN")); + aml_append(ifctx, aml_store(minl, aml_name("MIN"))); + aml_append(ifctx, aml_store(maxl, aml_name("MAX"))); + aml_append(ifctx, aml_store(lenl, aml_name("LEN"))); + + aml_append(ifctx, aml_release(ctrl_lock)); + aml_append(ifctx, aml_return(mr32)); + } + aml_append(method, ifctx); + + aml_append(method, aml_release(ctrl_lock)); + aml_append(method, aml_return(mr64)); + } + aml_append(mem_ctrl_dev, method); + method = aml_method(stringify(MEMORY_SLOT_PROXIMITY_METHOD), 1, AML_NOTSERIALIZED); { diff --git a/hw/i386/acpi-dsdt-mem-hotplug.dsl b/hw/i386/acpi-dsdt-mem-hotplug.dsl index 87d8d66..50b7541 100644 --- a/hw/i386/acpi-dsdt-mem-hotplug.dsl +++ b/hw/i386/acpi-dsdt-mem-hotplug.dsl @@ -19,77 +19,5 @@ Device(MEMORY_HOTPLUG_DEVICE) { Name(_HID, "PNP0A06") Name(_UID, "Memory hotplug resources") - - /* Memory hotplug IO registers */ - External(MEMORY_SLOT_ADDR_LOW, FieldUnitObj) // read only - External(MEMORY_SLOT_ADDR_HIGH, FieldUnitObj) // read only - External(MEMORY_SLOT_SIZE_LOW, FieldUnitObj) // read only - External(MEMORY_SLOT_SIZE_HIGH, FieldUnitObj) // read only - External(MEMORY_SLOT_SLECTOR, FieldUnitObj) // DIMM selector, write only - External(MEMORY_SLOT_LOCK, MutexObj) - - Method(MEMORY_SLOT_CRS_METHOD, 1, Serialized) { - Acquire(MEMORY_SLOT_LOCK, 0xFFFF) - Store(ToInteger(Arg0), MEMORY_SLOT_SLECTOR) // select DIMM - - Name(MR64, ResourceTemplate() { - QWordMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, - Cacheable, ReadWrite, - 0x0000000000000000, // Address Space Granularity - 0x0000000000000000, // Address Range Minimum - 0xFFFFFFFFFFFFFFFE, // Address Range Maximum - 0x0000000000000000, // Address Translation Offset - 0xFFFFFFFFFFFFFFFF, // Address Length - ,, MW64, AddressRangeMemory, TypeStatic) - }) - - CreateDWordField(MR64, 14, MINL) - CreateDWordField(MR64, 18, MINH) - CreateDWordField(MR64, 38, LENL) - CreateDWordField(MR64, 42, LENH) - CreateDWordField(MR64, 22, MAXL) - CreateDWordField(MR64, 26, MAXH) - - Store(MEMORY_SLOT_ADDR_HIGH, MINH) - Store(MEMORY_SLOT_ADDR_LOW, MINL) - Store(MEMORY_SLOT_SIZE_HIGH, LENH) - Store(MEMORY_SLOT_SIZE_LOW, LENL) - - // 64-bit math: MAX = MIN + LEN - 1 - Add(MINL, LENL, MAXL) - Add(MINH, LENH, MAXH) - If (LLess(MAXL, MINL)) { - Add(MAXH, One, MAXH) - } - If (LLess(MAXL, One)) { - Subtract(MAXH, One, MAXH) - } - Subtract(MAXL, One, MAXL) - - If (LEqual(MAXH, Zero)){ - Name(MR32, ResourceTemplate() { - DWordMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, - Cacheable, ReadWrite, - 0x00000000, // Address Space Granularity - 0x00000000, // Address Range Minimum - 0xFFFFFFFE, // Address Range Maximum - 0x00000000, // Address Translation Offset - 0xFFFFFFFF, // Address Length - ,, MW32, AddressRangeMemory, TypeStatic) - }) - CreateDWordField(MR32, MW32._MIN, MIN) - CreateDWordField(MR32, MW32._MAX, MAX) - CreateDWordField(MR32, MW32._LEN, LEN) - Store(MINL, MIN) - Store(MAXL, MAX) - Store(LENL, LEN) - - Release(MEMORY_SLOT_LOCK) - Return(MR32) - } - - Release(MEMORY_SLOT_LOCK) - Return(MR64) - } } // Device() } // Scope() -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 11/51] pc: acpi: memhp: move MHPD Device into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (9 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 10/51] pc: acpi: memhp: move MHPD.MCRS " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 12/51] pc: acpi: factor out memhp code from build_ssdt() into separate function Igor Mammedov ` (39 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel move remnants of MHPD device from DSDT into SSDT. i.e. Device(MHPD), _UID, _HID Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/acpi/memory_hotplug_acpi_table.c | 6 +++++- hw/i386/acpi-dsdt-mem-hotplug.dsl | 7 ------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/hw/acpi/memory_hotplug_acpi_table.c b/hw/acpi/memory_hotplug_acpi_table.c index 2428e84..83e739c 100644 --- a/hw/acpi/memory_hotplug_acpi_table.c +++ b/hw/acpi/memory_hotplug_acpi_table.c @@ -24,7 +24,7 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, /* scope for memory hotplug controller device node */ pci_scope = aml_scope("_SB.PCI0"); - mem_ctrl_dev = aml_scope(stringify(MEMORY_HOTPLUG_DEVICE)); + mem_ctrl_dev = aml_device(stringify(MEMORY_HOTPLUG_DEVICE)); { Aml *one = aml_int(1); Aml *zero = aml_int(0); @@ -34,6 +34,10 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, Aml *ctrl_lock = aml_name(stringify(MEMORY_SLOT_LOCK)); Aml *slot_selector = aml_name(stringify(MEMORY_SLOT_SLECTOR)); + aml_append(mem_ctrl_dev, aml_name_decl("_HID", aml_string("PNP0A06"))); + aml_append(mem_ctrl_dev, + aml_name_decl("_UID", aml_string("Memory hotplug resources"))); + method = aml_method("_STA", 0, AML_NOTSERIALIZED); ifctx = aml_if(aml_equal(slots_nr, zero)); { diff --git a/hw/i386/acpi-dsdt-mem-hotplug.dsl b/hw/i386/acpi-dsdt-mem-hotplug.dsl index 50b7541..20c5ec1 100644 --- a/hw/i386/acpi-dsdt-mem-hotplug.dsl +++ b/hw/i386/acpi-dsdt-mem-hotplug.dsl @@ -14,10 +14,3 @@ */ External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD, MethodObj) - - Scope(\_SB.PCI0) { - Device(MEMORY_HOTPLUG_DEVICE) { - Name(_HID, "PNP0A06") - Name(_UID, "Memory hotplug resources") - } // Device() - } // Scope() -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 12/51] pc: acpi: factor out memhp code from build_ssdt() into separate function 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (10 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 11/51] pc: acpi: memhp: move MHPD Device " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 13/51] pc: acpi: memhp: move \_GPE._E03 into SSDT Igor Mammedov ` (38 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel before consolidating memhp code in memory_hotplug_acpi_table.c and for simplifying review, first factor out memhp code into new function build_memory_devices() in i386/acpi-build.c Signed-off-by: Igor Mammedov <imammedo@redhat.com> ---- PS: no functional change, only code movement. --- hw/i386/acpi-build.c | 239 +++++++++++++++++++++++++++------------------------ 1 file changed, 126 insertions(+), 113 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index e365047..a4a90b3 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -929,6 +929,130 @@ static Aml *build_crs(PCIHostState *host, return crs; } +static void build_memory_devices(Aml *sb_scope, int nr_mem, + uint16_t io_base, uint16_t io_len) +{ + int i; + Aml *scope; + Aml *crs; + Aml *field; + Aml *dev; + Aml *method; + Aml *ifctx; + + /* build memory devices */ + assert(nr_mem <= ACPI_MAX_RAM_SLOTS); + scope = aml_scope("\\_SB.PCI0." stringify(MEMORY_HOTPLUG_DEVICE)); + aml_append(scope, + aml_name_decl(stringify(MEMORY_SLOTS_NUMBER), aml_int(nr_mem)) + ); + + crs = aml_resource_template(); + aml_append(crs, + aml_io(AML_DECODE16, io_base, io_base, 0, io_len) + ); + aml_append(scope, aml_name_decl("_CRS", crs)); + + aml_append(scope, aml_operation_region( + stringify(MEMORY_HOTPLUG_IO_REGION), AML_SYSTEM_IO, + io_base, io_len) + ); + + field = aml_field(stringify(MEMORY_HOTPLUG_IO_REGION), AML_DWORD_ACC, + AML_NOLOCK, AML_PRESERVE); + aml_append(field, /* read only */ + aml_named_field(stringify(MEMORY_SLOT_ADDR_LOW), 32)); + aml_append(field, /* read only */ + aml_named_field(stringify(MEMORY_SLOT_ADDR_HIGH), 32)); + aml_append(field, /* read only */ + aml_named_field(stringify(MEMORY_SLOT_SIZE_LOW), 32)); + aml_append(field, /* read only */ + aml_named_field(stringify(MEMORY_SLOT_SIZE_HIGH), 32)); + aml_append(field, /* read only */ + aml_named_field(stringify(MEMORY_SLOT_PROXIMITY), 32)); + aml_append(scope, field); + + field = aml_field(stringify(MEMORY_HOTPLUG_IO_REGION), AML_BYTE_ACC, + AML_NOLOCK, AML_WRITE_AS_ZEROS); + aml_append(field, aml_reserved_field(160 /* bits, Offset(20) */)); + aml_append(field, /* 1 if enabled, read only */ + aml_named_field(stringify(MEMORY_SLOT_ENABLED), 1)); + aml_append(field, + /*(read) 1 if has a insert event. (write) 1 to clear event */ + aml_named_field(stringify(MEMORY_SLOT_INSERT_EVENT), 1)); + aml_append(field, + /* (read) 1 if has a remove event. (write) 1 to clear event */ + aml_named_field(stringify(MEMORY_SLOT_REMOVE_EVENT), 1)); + aml_append(field, + /* initiates device eject, write only */ + aml_named_field(stringify(MEMORY_SLOT_EJECT), 1)); + aml_append(scope, field); + + field = aml_field(stringify(MEMORY_HOTPLUG_IO_REGION), AML_DWORD_ACC, + AML_NOLOCK, AML_PRESERVE); + aml_append(field, /* DIMM selector, write only */ + aml_named_field(stringify(MEMORY_SLOT_SLECTOR), 32)); + aml_append(field, /* _OST event code, write only */ + aml_named_field(stringify(MEMORY_SLOT_OST_EVENT), 32)); + aml_append(field, /* _OST status code, write only */ + aml_named_field(stringify(MEMORY_SLOT_OST_STATUS), 32)); + aml_append(scope, field); + aml_append(sb_scope, scope); + + for (i = 0; i < nr_mem; i++) { + #define BASEPATH "\\_SB.PCI0." stringify(MEMORY_HOTPLUG_DEVICE) "." + const char *s; + + dev = aml_device("MP%02X", i); + aml_append(dev, aml_name_decl("_UID", aml_string("0x%02X", i))); + aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0C80"))); + + method = aml_method("_CRS", 0, AML_NOTSERIALIZED); + s = BASEPATH stringify(MEMORY_SLOT_CRS_METHOD); + aml_append(method, aml_return(aml_call1(s, aml_name("_UID")))); + aml_append(dev, method); + + method = aml_method("_STA", 0, AML_NOTSERIALIZED); + s = BASEPATH stringify(MEMORY_SLOT_STATUS_METHOD); + aml_append(method, aml_return(aml_call1(s, aml_name("_UID")))); + aml_append(dev, method); + + method = aml_method("_PXM", 0, AML_NOTSERIALIZED); + s = BASEPATH stringify(MEMORY_SLOT_PROXIMITY_METHOD); + aml_append(method, aml_return(aml_call1(s, aml_name("_UID")))); + aml_append(dev, method); + + method = aml_method("_OST", 3, AML_NOTSERIALIZED); + s = BASEPATH stringify(MEMORY_SLOT_OST_METHOD); + aml_append(method, aml_return(aml_call4( + s, aml_name("_UID"), aml_arg(0), aml_arg(1), aml_arg(2) + ))); + aml_append(dev, method); + + method = aml_method("_EJ0", 1, AML_NOTSERIALIZED); + s = BASEPATH stringify(MEMORY_SLOT_EJECT_METHOD); + aml_append(method, aml_return(aml_call2( + s, aml_name("_UID"), aml_arg(0)))); + aml_append(dev, method); + + aml_append(sb_scope, dev); + } + + /* build Method(MEMORY_SLOT_NOTIFY_METHOD, 2) { + * If (LEqual(Arg0, 0x00)) {Notify(MP00, Arg1)} ... } + */ + method = aml_method(stringify(MEMORY_SLOT_NOTIFY_METHOD), 2, + AML_NOTSERIALIZED); + for (i = 0; i < nr_mem; i++) { + ifctx = aml_if(aml_equal(aml_arg(0), aml_int(i))); + aml_append(ifctx, + aml_notify(aml_name("MP%.02X", i), aml_arg(1)) + ); + aml_append(method, ifctx); + } + aml_append(sb_scope, method); +} + static void build_ssdt(GArray *table_data, GArray *linker, AcpiCpuInfo *cpu, AcpiPmInfo *pm, AcpiMiscInfo *misc, @@ -1231,119 +1355,8 @@ build_ssdt(GArray *table_data, GArray *linker, } aml_append(sb_scope, aml_name_decl("CPON", pkg)); - /* build memory devices */ - assert(nr_mem <= ACPI_MAX_RAM_SLOTS); - scope = aml_scope("\\_SB.PCI0." stringify(MEMORY_HOTPLUG_DEVICE)); - aml_append(scope, - aml_name_decl(stringify(MEMORY_SLOTS_NUMBER), aml_int(nr_mem)) - ); - - crs = aml_resource_template(); - aml_append(crs, - aml_io(AML_DECODE16, pm->mem_hp_io_base, pm->mem_hp_io_base, 0, - pm->mem_hp_io_len) - ); - aml_append(scope, aml_name_decl("_CRS", crs)); - - aml_append(scope, aml_operation_region( - stringify(MEMORY_HOTPLUG_IO_REGION), AML_SYSTEM_IO, - pm->mem_hp_io_base, pm->mem_hp_io_len) - ); - - field = aml_field(stringify(MEMORY_HOTPLUG_IO_REGION), AML_DWORD_ACC, - AML_NOLOCK, AML_PRESERVE); - aml_append(field, /* read only */ - aml_named_field(stringify(MEMORY_SLOT_ADDR_LOW), 32)); - aml_append(field, /* read only */ - aml_named_field(stringify(MEMORY_SLOT_ADDR_HIGH), 32)); - aml_append(field, /* read only */ - aml_named_field(stringify(MEMORY_SLOT_SIZE_LOW), 32)); - aml_append(field, /* read only */ - aml_named_field(stringify(MEMORY_SLOT_SIZE_HIGH), 32)); - aml_append(field, /* read only */ - aml_named_field(stringify(MEMORY_SLOT_PROXIMITY), 32)); - aml_append(scope, field); - - field = aml_field(stringify(MEMORY_HOTPLUG_IO_REGION), AML_BYTE_ACC, - AML_NOLOCK, AML_WRITE_AS_ZEROS); - aml_append(field, aml_reserved_field(160 /* bits, Offset(20) */)); - aml_append(field, /* 1 if enabled, read only */ - aml_named_field(stringify(MEMORY_SLOT_ENABLED), 1)); - aml_append(field, - /*(read) 1 if has a insert event. (write) 1 to clear event */ - aml_named_field(stringify(MEMORY_SLOT_INSERT_EVENT), 1)); - aml_append(field, - /* (read) 1 if has a remove event. (write) 1 to clear event */ - aml_named_field(stringify(MEMORY_SLOT_REMOVE_EVENT), 1)); - aml_append(field, - /* initiates device eject, write only */ - aml_named_field(stringify(MEMORY_SLOT_EJECT), 1)); - aml_append(scope, field); - - field = aml_field(stringify(MEMORY_HOTPLUG_IO_REGION), AML_DWORD_ACC, - AML_NOLOCK, AML_PRESERVE); - aml_append(field, /* DIMM selector, write only */ - aml_named_field(stringify(MEMORY_SLOT_SLECTOR), 32)); - aml_append(field, /* _OST event code, write only */ - aml_named_field(stringify(MEMORY_SLOT_OST_EVENT), 32)); - aml_append(field, /* _OST status code, write only */ - aml_named_field(stringify(MEMORY_SLOT_OST_STATUS), 32)); - aml_append(scope, field); - - aml_append(sb_scope, scope); - - for (i = 0; i < nr_mem; i++) { - #define BASEPATH "\\_SB.PCI0." stringify(MEMORY_HOTPLUG_DEVICE) "." - const char *s; - - dev = aml_device("MP%02X", i); - aml_append(dev, aml_name_decl("_UID", aml_string("0x%02X", i))); - aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0C80"))); - - method = aml_method("_CRS", 0, AML_NOTSERIALIZED); - s = BASEPATH stringify(MEMORY_SLOT_CRS_METHOD); - aml_append(method, aml_return(aml_call1(s, aml_name("_UID")))); - aml_append(dev, method); - - method = aml_method("_STA", 0, AML_NOTSERIALIZED); - s = BASEPATH stringify(MEMORY_SLOT_STATUS_METHOD); - aml_append(method, aml_return(aml_call1(s, aml_name("_UID")))); - aml_append(dev, method); - - method = aml_method("_PXM", 0, AML_NOTSERIALIZED); - s = BASEPATH stringify(MEMORY_SLOT_PROXIMITY_METHOD); - aml_append(method, aml_return(aml_call1(s, aml_name("_UID")))); - aml_append(dev, method); - - method = aml_method("_OST", 3, AML_NOTSERIALIZED); - s = BASEPATH stringify(MEMORY_SLOT_OST_METHOD); - aml_append(method, aml_return(aml_call4( - s, aml_name("_UID"), aml_arg(0), aml_arg(1), aml_arg(2) - ))); - aml_append(dev, method); - - method = aml_method("_EJ0", 1, AML_NOTSERIALIZED); - s = BASEPATH stringify(MEMORY_SLOT_EJECT_METHOD); - aml_append(method, aml_return(aml_call2( - s, aml_name("_UID"), aml_arg(0)))); - aml_append(dev, method); - - aml_append(sb_scope, dev); - } - - /* build Method(MEMORY_SLOT_NOTIFY_METHOD, 2) { - * If (LEqual(Arg0, 0x00)) {Notify(MP00, Arg1)} ... } - */ - method = aml_method(stringify(MEMORY_SLOT_NOTIFY_METHOD), 2, - AML_NOTSERIALIZED); - for (i = 0; i < nr_mem; i++) { - ifctx = aml_if(aml_equal(aml_arg(0), aml_int(i))); - aml_append(ifctx, - aml_notify(aml_name("MP%.02X", i), aml_arg(1)) - ); - aml_append(method, ifctx); - } - aml_append(sb_scope, method); + build_memory_devices(sb_scope, nr_mem, pm->mem_hp_io_base, + pm->mem_hp_io_len); { Object *pci_host; -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 13/51] pc: acpi: memhp: move \_GPE._E03 into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (11 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 12/51] pc: acpi: factor out memhp code from build_ssdt() into separate function Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 14/51] pc: acpi: memhp: drop not needed stringify(MEMORY_foo) usage Igor Mammedov ` (37 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel in addition remove no longer needed acpi-dsdt-mem-hotplug.dsl. Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 6 ++++++ hw/i386/acpi-dsdt-mem-hotplug.dsl | 16 ---------------- hw/i386/acpi-dsdt.dsl | 5 ----- hw/i386/q35-acpi-dsdt.dsl | 5 ----- include/hw/acpi/memory_hotplug.h | 5 +++++ include/hw/acpi/pc-hotplug.h | 2 -- 6 files changed, 11 insertions(+), 28 deletions(-) delete mode 100644 hw/i386/acpi-dsdt-mem-hotplug.dsl diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index a4a90b3..8bdb673 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1081,6 +1081,12 @@ 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"); + method = aml_method("_E03", 0, AML_NOTSERIALIZED); + aml_append(method, aml_call0(MEMORY_HOTPLUG_HANDLER_PATH)); + aml_append(scope, method); + aml_append(ssdt, scope); + bus = PC_MACHINE(machine)->bus; if (bus) { QLIST_FOREACH(bus, &bus->child, sibling) { diff --git a/hw/i386/acpi-dsdt-mem-hotplug.dsl b/hw/i386/acpi-dsdt-mem-hotplug.dsl deleted file mode 100644 index 20c5ec1..0000000 --- a/hw/i386/acpi-dsdt-mem-hotplug.dsl +++ /dev/null @@ -1,16 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License along - * with this program; if not, see <http://www.gnu.org/licenses/>. - */ - - External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD, MethodObj) diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl index 8dba096..9cf1b88 100644 --- a/hw/i386/acpi-dsdt.dsl +++ b/hw/i386/acpi-dsdt.dsl @@ -250,7 +250,6 @@ DefinitionBlock ( #include "hw/acpi/pc-hotplug.h" #define CPU_STATUS_BASE PIIX4_CPU_HOTPLUG_IO_BASE #include "acpi-dsdt-cpu-hotplug.dsl" -#include "acpi-dsdt-mem-hotplug.dsl" /**************************************************************** @@ -271,10 +270,6 @@ DefinitionBlock ( // CPU hotplug event \_SB.PRSC() } - Method(_E03) { - // Memory hotplug event - \_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD() - } Method(_L04) { } Method(_L05) { diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl index 7be7b37..f950f39 100644 --- a/hw/i386/q35-acpi-dsdt.dsl +++ b/hw/i386/q35-acpi-dsdt.dsl @@ -387,7 +387,6 @@ DefinitionBlock ( #include "hw/acpi/pc-hotplug.h" #define CPU_STATUS_BASE ICH9_CPU_HOTPLUG_IO_BASE #include "acpi-dsdt-cpu-hotplug.dsl" -#include "acpi-dsdt-mem-hotplug.dsl" /**************************************************************** @@ -404,10 +403,6 @@ DefinitionBlock ( // CPU hotplug event \_SB.PRSC() } - Method(_E03) { - // Memory hotplug event - \_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD() - } Method(_L04) { } Method(_L05) { diff --git a/include/hw/acpi/memory_hotplug.h b/include/hw/acpi/memory_hotplug.h index b6e9f50..de164f2 100644 --- a/include/hw/acpi/memory_hotplug.h +++ b/include/hw/acpi/memory_hotplug.h @@ -47,6 +47,11 @@ extern const VMStateDescription vmstate_memory_hotplug; void acpi_memory_ospm_status(MemHotplugState *mem_st, ACPIOSTInfoList ***list); +#define MEMORY_HOTPLUG_DEVICE MHPD +#define MEMORY_SLOT_SCAN_METHOD MSCN +#define MEMORY_HOTPLUG_HANDLER_PATH "\\_SB.PCI0." \ + stringify(MEMORY_HOTPLUG_DEVICE) "." stringify(MEMORY_SLOT_SCAN_METHOD) + void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, uint16_t io_base, uint16_t io_len); #endif diff --git a/include/hw/acpi/pc-hotplug.h b/include/hw/acpi/pc-hotplug.h index 77b1569..e5bb321 100644 --- a/include/hw/acpi/pc-hotplug.h +++ b/include/hw/acpi/pc-hotplug.h @@ -32,7 +32,6 @@ #define ACPI_MEMORY_HOTPLUG_IO_LEN 24 #define ACPI_MEMORY_HOTPLUG_BASE 0x0a00 -#define MEMORY_HOTPLUG_DEVICE MHPD #define MEMORY_SLOTS_NUMBER MDNR #define MEMORY_HOTPLUG_IO_REGION HPMR #define MEMORY_SLOT_ADDR_LOW MRBL @@ -54,6 +53,5 @@ #define MEMORY_SLOT_PROXIMITY_METHOD MPXM #define MEMORY_SLOT_EJECT_METHOD MEJ0 #define MEMORY_SLOT_NOTIFY_METHOD MTFY -#define MEMORY_SLOT_SCAN_METHOD MSCN #endif -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 14/51] pc: acpi: memhp: drop not needed stringify(MEMORY_foo) usage 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (12 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 13/51] pc: acpi: memhp: move \_GPE._E03 into SSDT Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 15/51] pc: acpi: drop unused CPU_STATUS_LEN from DSDT Igor Mammedov ` (36 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel most of MEMORY_foo defines are not shared with ASL anymore and are used only inside of memory_hotplug_acpi_table.c, so move them there and make them strings. As result we can replace stringify(MEMORY_foo) with just MEMORY_foo, which makes code a bit cleaner. No AML change introduced by this patch. Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/acpi/memory_hotplug_acpi_table.c | 53 +++++++++++++++++-------------------- hw/i386/acpi-build.c | 52 ++++++++++++++++++------------------ include/hw/acpi/memory_hotplug.h | 6 ++--- include/hw/acpi/pc-hotplug.h | 42 ++++++++++++++--------------- 4 files changed, 74 insertions(+), 79 deletions(-) diff --git a/hw/acpi/memory_hotplug_acpi_table.c b/hw/acpi/memory_hotplug_acpi_table.c index 83e739c..20728ac 100644 --- a/hw/acpi/memory_hotplug_acpi_table.c +++ b/hw/acpi/memory_hotplug_acpi_table.c @@ -24,15 +24,15 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, /* scope for memory hotplug controller device node */ pci_scope = aml_scope("_SB.PCI0"); - mem_ctrl_dev = aml_device(stringify(MEMORY_HOTPLUG_DEVICE)); + mem_ctrl_dev = aml_device(MEMORY_HOTPLUG_DEVICE); { Aml *one = aml_int(1); Aml *zero = aml_int(0); Aml *ret_val = aml_local(0); Aml *slot_arg0 = aml_arg(0); - Aml *slots_nr = aml_name(stringify(MEMORY_SLOTS_NUMBER)); - Aml *ctrl_lock = aml_name(stringify(MEMORY_SLOT_LOCK)); - Aml *slot_selector = aml_name(stringify(MEMORY_SLOT_SLECTOR)); + Aml *slots_nr = aml_name(MEMORY_SLOTS_NUMBER); + Aml *ctrl_lock = aml_name(MEMORY_SLOT_LOCK); + Aml *slot_selector = aml_name(MEMORY_SLOT_SLECTOR); aml_append(mem_ctrl_dev, aml_name_decl("_HID", aml_string("PNP0A06"))); aml_append(mem_ctrl_dev, @@ -48,10 +48,9 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, aml_append(method, aml_return(aml_int(0xB))); aml_append(mem_ctrl_dev, method); - aml_append(mem_ctrl_dev, aml_mutex(stringify(MEMORY_SLOT_LOCK), 0)); + aml_append(mem_ctrl_dev, aml_mutex(MEMORY_SLOT_LOCK, 0)); - method = aml_method(stringify(MEMORY_SLOT_SCAN_METHOD), 0, - AML_NOTSERIALIZED); + method = aml_method(MEMORY_SLOT_SCAN_METHOD, 0, AML_NOTSERIALIZED); { Aml *else_ctx; Aml *while_ctx; @@ -75,14 +74,14 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, */ while_ctx = aml_while(aml_lless(idx, slots_nr)); { - Aml *ins_evt = aml_name(stringify(MEMORY_SLOT_INSERT_EVENT)); - Aml *rm_evt = aml_name(stringify(MEMORY_SLOT_REMOVE_EVENT)); + Aml *ins_evt = aml_name(MEMORY_SLOT_INSERT_EVENT); + Aml *rm_evt = aml_name(MEMORY_SLOT_REMOVE_EVENT); aml_append(while_ctx, aml_store(idx, slot_selector)); ifctx = aml_if(aml_equal(ins_evt, one)); { aml_append(ifctx, - aml_call2(stringify(MEMORY_SLOT_NOTIFY_METHOD), + aml_call2(MEMORY_SLOT_NOTIFY_METHOD, idx, dev_chk)); aml_append(ifctx, aml_store(one, ins_evt)); } @@ -92,7 +91,7 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, ifctx = aml_if(aml_equal(rm_evt, one)); { aml_append(ifctx, - aml_call2(stringify(MEMORY_SLOT_NOTIFY_METHOD), + aml_call2(MEMORY_SLOT_NOTIFY_METHOD, idx, eject_req)); aml_append(ifctx, aml_store(one, rm_evt)); } @@ -107,10 +106,9 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, } aml_append(mem_ctrl_dev, method); - method = aml_method(stringify(MEMORY_SLOT_STATUS_METHOD), 1, - AML_NOTSERIALIZED); + method = aml_method(MEMORY_SLOT_STATUS_METHOD, 1, AML_NOTSERIALIZED); { - Aml *slot_enabled = aml_name(stringify(MEMORY_SLOT_ENABLED)); + Aml *slot_enabled = aml_name(MEMORY_SLOT_ENABLED); aml_append(method, aml_store(zero, ret_val)); aml_append(method, aml_acquire(ctrl_lock, 0xFFFF)); @@ -128,8 +126,7 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, } aml_append(mem_ctrl_dev, method); - method = aml_method(stringify(MEMORY_SLOT_CRS_METHOD), 1, - AML_SERIALIZED); + method = aml_method(MEMORY_SLOT_CRS_METHOD, 1, AML_SERIALIZED); { Aml *mr64 = aml_name("MR64"); Aml *mr32 = aml_name("MR32"); @@ -165,13 +162,13 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, aml_create_dword_field(mr64, aml_int(26), "MAXH")); aml_append(method, - aml_store(aml_name(stringify(MEMORY_SLOT_ADDR_HIGH)), minh)); + aml_store(aml_name(MEMORY_SLOT_ADDR_HIGH), minh)); aml_append(method, - aml_store(aml_name(stringify(MEMORY_SLOT_ADDR_LOW)), minl)); + aml_store(aml_name(MEMORY_SLOT_ADDR_LOW), minl)); aml_append(method, - aml_store(aml_name(stringify(MEMORY_SLOT_SIZE_HIGH)), lenh)); + aml_store(aml_name(MEMORY_SLOT_SIZE_HIGH), lenh)); aml_append(method, - aml_store(aml_name(stringify(MEMORY_SLOT_SIZE_LOW)), lenl)); + aml_store(aml_name(MEMORY_SLOT_SIZE_LOW), lenl)); /* 64-bit math: MAX = MIN + LEN - 1 */ aml_append(method, aml_add(minl, lenl, maxl)); @@ -220,10 +217,10 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, } aml_append(mem_ctrl_dev, method); - method = aml_method(stringify(MEMORY_SLOT_PROXIMITY_METHOD), 1, + method = aml_method(MEMORY_SLOT_PROXIMITY_METHOD, 1, AML_NOTSERIALIZED); { - Aml *proximity = aml_name(stringify(MEMORY_SLOT_PROXIMITY)); + Aml *proximity = aml_name(MEMORY_SLOT_PROXIMITY); aml_append(method, aml_acquire(ctrl_lock, 0xFFFF)); aml_append(method, aml_store(aml_to_integer(slot_arg0), @@ -234,11 +231,10 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, } aml_append(mem_ctrl_dev, method); - method = aml_method(stringify(MEMORY_SLOT_OST_METHOD), 4, - AML_NOTSERIALIZED); + method = aml_method(MEMORY_SLOT_OST_METHOD, 4, AML_NOTSERIALIZED); { - Aml *ost_evt = aml_name(stringify(MEMORY_SLOT_OST_EVENT)); - Aml *ost_status = aml_name(stringify(MEMORY_SLOT_OST_STATUS)); + Aml *ost_evt = aml_name(MEMORY_SLOT_OST_EVENT); + Aml *ost_status = aml_name(MEMORY_SLOT_OST_STATUS); aml_append(method, aml_acquire(ctrl_lock, 0xFFFF)); aml_append(method, aml_store(aml_to_integer(slot_arg0), @@ -249,10 +245,9 @@ void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, } aml_append(mem_ctrl_dev, method); - method = aml_method(stringify(MEMORY_SLOT_EJECT_METHOD), 2, - AML_NOTSERIALIZED); + method = aml_method(MEMORY_SLOT_EJECT_METHOD, 2, AML_NOTSERIALIZED); { - Aml *eject = aml_name(stringify(MEMORY_SLOT_EJECT)); + Aml *eject = aml_name(MEMORY_SLOT_EJECT); aml_append(method, aml_acquire(ctrl_lock, 0xFFFF)); aml_append(method, aml_store(aml_to_integer(slot_arg0), diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 8bdb673..7e71540 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -942,9 +942,9 @@ static void build_memory_devices(Aml *sb_scope, int nr_mem, /* build memory devices */ assert(nr_mem <= ACPI_MAX_RAM_SLOTS); - scope = aml_scope("\\_SB.PCI0." stringify(MEMORY_HOTPLUG_DEVICE)); + scope = aml_scope("\\_SB.PCI0." MEMORY_HOTPLUG_DEVICE); aml_append(scope, - aml_name_decl(stringify(MEMORY_SLOTS_NUMBER), aml_int(nr_mem)) + aml_name_decl(MEMORY_SLOTS_NUMBER, aml_int(nr_mem)) ); crs = aml_resource_template(); @@ -954,53 +954,53 @@ static void build_memory_devices(Aml *sb_scope, int nr_mem, aml_append(scope, aml_name_decl("_CRS", crs)); aml_append(scope, aml_operation_region( - stringify(MEMORY_HOTPLUG_IO_REGION), AML_SYSTEM_IO, + MEMORY_HOTPLUG_IO_REGION, AML_SYSTEM_IO, io_base, io_len) ); - field = aml_field(stringify(MEMORY_HOTPLUG_IO_REGION), AML_DWORD_ACC, + field = aml_field(MEMORY_HOTPLUG_IO_REGION, AML_DWORD_ACC, AML_NOLOCK, AML_PRESERVE); aml_append(field, /* read only */ - aml_named_field(stringify(MEMORY_SLOT_ADDR_LOW), 32)); + aml_named_field(MEMORY_SLOT_ADDR_LOW, 32)); aml_append(field, /* read only */ - aml_named_field(stringify(MEMORY_SLOT_ADDR_HIGH), 32)); + aml_named_field(MEMORY_SLOT_ADDR_HIGH, 32)); aml_append(field, /* read only */ - aml_named_field(stringify(MEMORY_SLOT_SIZE_LOW), 32)); + aml_named_field(MEMORY_SLOT_SIZE_LOW, 32)); aml_append(field, /* read only */ - aml_named_field(stringify(MEMORY_SLOT_SIZE_HIGH), 32)); + aml_named_field(MEMORY_SLOT_SIZE_HIGH, 32)); aml_append(field, /* read only */ - aml_named_field(stringify(MEMORY_SLOT_PROXIMITY), 32)); + aml_named_field(MEMORY_SLOT_PROXIMITY, 32)); aml_append(scope, field); - field = aml_field(stringify(MEMORY_HOTPLUG_IO_REGION), AML_BYTE_ACC, + field = aml_field(MEMORY_HOTPLUG_IO_REGION, AML_BYTE_ACC, AML_NOLOCK, AML_WRITE_AS_ZEROS); aml_append(field, aml_reserved_field(160 /* bits, Offset(20) */)); aml_append(field, /* 1 if enabled, read only */ - aml_named_field(stringify(MEMORY_SLOT_ENABLED), 1)); + aml_named_field(MEMORY_SLOT_ENABLED, 1)); aml_append(field, /*(read) 1 if has a insert event. (write) 1 to clear event */ - aml_named_field(stringify(MEMORY_SLOT_INSERT_EVENT), 1)); + aml_named_field(MEMORY_SLOT_INSERT_EVENT, 1)); aml_append(field, /* (read) 1 if has a remove event. (write) 1 to clear event */ - aml_named_field(stringify(MEMORY_SLOT_REMOVE_EVENT), 1)); + aml_named_field(MEMORY_SLOT_REMOVE_EVENT, 1)); aml_append(field, /* initiates device eject, write only */ - aml_named_field(stringify(MEMORY_SLOT_EJECT), 1)); + aml_named_field(MEMORY_SLOT_EJECT, 1)); aml_append(scope, field); - field = aml_field(stringify(MEMORY_HOTPLUG_IO_REGION), AML_DWORD_ACC, + field = aml_field(MEMORY_HOTPLUG_IO_REGION, AML_DWORD_ACC, AML_NOLOCK, AML_PRESERVE); aml_append(field, /* DIMM selector, write only */ - aml_named_field(stringify(MEMORY_SLOT_SLECTOR), 32)); + aml_named_field(MEMORY_SLOT_SLECTOR, 32)); aml_append(field, /* _OST event code, write only */ - aml_named_field(stringify(MEMORY_SLOT_OST_EVENT), 32)); + aml_named_field(MEMORY_SLOT_OST_EVENT, 32)); aml_append(field, /* _OST status code, write only */ - aml_named_field(stringify(MEMORY_SLOT_OST_STATUS), 32)); + aml_named_field(MEMORY_SLOT_OST_STATUS, 32)); aml_append(scope, field); aml_append(sb_scope, scope); for (i = 0; i < nr_mem; i++) { - #define BASEPATH "\\_SB.PCI0." stringify(MEMORY_HOTPLUG_DEVICE) "." + #define BASEPATH "\\_SB.PCI0." MEMORY_HOTPLUG_DEVICE "." const char *s; dev = aml_device("MP%02X", i); @@ -1008,29 +1008,30 @@ static void build_memory_devices(Aml *sb_scope, int nr_mem, aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0C80"))); method = aml_method("_CRS", 0, AML_NOTSERIALIZED); - s = BASEPATH stringify(MEMORY_SLOT_CRS_METHOD); + s = BASEPATH MEMORY_SLOT_CRS_METHOD; aml_append(method, aml_return(aml_call1(s, aml_name("_UID")))); aml_append(dev, method); method = aml_method("_STA", 0, AML_NOTSERIALIZED); - s = BASEPATH stringify(MEMORY_SLOT_STATUS_METHOD); + s = BASEPATH MEMORY_SLOT_STATUS_METHOD; aml_append(method, aml_return(aml_call1(s, aml_name("_UID")))); aml_append(dev, method); method = aml_method("_PXM", 0, AML_NOTSERIALIZED); - s = BASEPATH stringify(MEMORY_SLOT_PROXIMITY_METHOD); + s = BASEPATH MEMORY_SLOT_PROXIMITY_METHOD; aml_append(method, aml_return(aml_call1(s, aml_name("_UID")))); aml_append(dev, method); method = aml_method("_OST", 3, AML_NOTSERIALIZED); - s = BASEPATH stringify(MEMORY_SLOT_OST_METHOD); + s = BASEPATH MEMORY_SLOT_OST_METHOD; + aml_append(method, aml_return(aml_call4( s, aml_name("_UID"), aml_arg(0), aml_arg(1), aml_arg(2) ))); aml_append(dev, method); method = aml_method("_EJ0", 1, AML_NOTSERIALIZED); - s = BASEPATH stringify(MEMORY_SLOT_EJECT_METHOD); + s = BASEPATH MEMORY_SLOT_EJECT_METHOD; aml_append(method, aml_return(aml_call2( s, aml_name("_UID"), aml_arg(0)))); aml_append(dev, method); @@ -1041,8 +1042,7 @@ static void build_memory_devices(Aml *sb_scope, int nr_mem, /* build Method(MEMORY_SLOT_NOTIFY_METHOD, 2) { * If (LEqual(Arg0, 0x00)) {Notify(MP00, Arg1)} ... } */ - method = aml_method(stringify(MEMORY_SLOT_NOTIFY_METHOD), 2, - AML_NOTSERIALIZED); + method = aml_method(MEMORY_SLOT_NOTIFY_METHOD, 2, AML_NOTSERIALIZED); for (i = 0; i < nr_mem; i++) { ifctx = aml_if(aml_equal(aml_arg(0), aml_int(i))); aml_append(ifctx, diff --git a/include/hw/acpi/memory_hotplug.h b/include/hw/acpi/memory_hotplug.h index de164f2..3a646b1 100644 --- a/include/hw/acpi/memory_hotplug.h +++ b/include/hw/acpi/memory_hotplug.h @@ -47,10 +47,10 @@ extern const VMStateDescription vmstate_memory_hotplug; void acpi_memory_ospm_status(MemHotplugState *mem_st, ACPIOSTInfoList ***list); -#define MEMORY_HOTPLUG_DEVICE MHPD -#define MEMORY_SLOT_SCAN_METHOD MSCN +#define MEMORY_HOTPLUG_DEVICE "MHPD" +#define MEMORY_SLOT_SCAN_METHOD "MSCN" #define MEMORY_HOTPLUG_HANDLER_PATH "\\_SB.PCI0." \ - stringify(MEMORY_HOTPLUG_DEVICE) "." stringify(MEMORY_SLOT_SCAN_METHOD) + MEMORY_HOTPLUG_DEVICE "." MEMORY_SLOT_SCAN_METHOD void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem, uint16_t io_base, uint16_t io_len); diff --git a/include/hw/acpi/pc-hotplug.h b/include/hw/acpi/pc-hotplug.h index e5bb321..6a8d268 100644 --- a/include/hw/acpi/pc-hotplug.h +++ b/include/hw/acpi/pc-hotplug.h @@ -32,26 +32,26 @@ #define ACPI_MEMORY_HOTPLUG_IO_LEN 24 #define ACPI_MEMORY_HOTPLUG_BASE 0x0a00 -#define MEMORY_SLOTS_NUMBER MDNR -#define MEMORY_HOTPLUG_IO_REGION HPMR -#define MEMORY_SLOT_ADDR_LOW MRBL -#define MEMORY_SLOT_ADDR_HIGH MRBH -#define MEMORY_SLOT_SIZE_LOW MRLL -#define MEMORY_SLOT_SIZE_HIGH MRLH -#define MEMORY_SLOT_PROXIMITY MPX -#define MEMORY_SLOT_ENABLED MES -#define MEMORY_SLOT_INSERT_EVENT MINS -#define MEMORY_SLOT_REMOVE_EVENT MRMV -#define MEMORY_SLOT_EJECT MEJ -#define MEMORY_SLOT_SLECTOR MSEL -#define MEMORY_SLOT_OST_EVENT MOEV -#define MEMORY_SLOT_OST_STATUS MOSC -#define MEMORY_SLOT_LOCK MLCK -#define MEMORY_SLOT_STATUS_METHOD MRST -#define MEMORY_SLOT_CRS_METHOD MCRS -#define MEMORY_SLOT_OST_METHOD MOST -#define MEMORY_SLOT_PROXIMITY_METHOD MPXM -#define MEMORY_SLOT_EJECT_METHOD MEJ0 -#define MEMORY_SLOT_NOTIFY_METHOD MTFY +#define MEMORY_SLOTS_NUMBER "MDNR" +#define MEMORY_HOTPLUG_IO_REGION "HPMR" +#define MEMORY_SLOT_ADDR_LOW "MRBL" +#define MEMORY_SLOT_ADDR_HIGH "MRBH" +#define MEMORY_SLOT_SIZE_LOW "MRLL" +#define MEMORY_SLOT_SIZE_HIGH "MRLH" +#define MEMORY_SLOT_PROXIMITY "MPX" +#define MEMORY_SLOT_ENABLED "MES" +#define MEMORY_SLOT_INSERT_EVENT "MINS" +#define MEMORY_SLOT_REMOVE_EVENT "MRMV" +#define MEMORY_SLOT_EJECT "MEJ" +#define MEMORY_SLOT_SLECTOR "MSEL" +#define MEMORY_SLOT_OST_EVENT "MOEV" +#define MEMORY_SLOT_OST_STATUS "MOSC" +#define MEMORY_SLOT_LOCK "MLCK" +#define MEMORY_SLOT_STATUS_METHOD "MRST" +#define MEMORY_SLOT_CRS_METHOD "MCRS" +#define MEMORY_SLOT_OST_METHOD "MOST" +#define MEMORY_SLOT_PROXIMITY_METHOD "MPXM" +#define MEMORY_SLOT_EJECT_METHOD "MEJ0" +#define MEMORY_SLOT_NOTIFY_METHOD "MTFY" #endif -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 15/51] pc: acpi: drop unused CPU_STATUS_LEN from DSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (13 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 14/51] pc: acpi: memhp: drop not needed stringify(MEMORY_foo) usage Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 16/51] pc: acpi: cpuhp: move CPEJ() method to SSDT Igor Mammedov ` (35 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-dsdt-cpu-hotplug.dsl | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/i386/acpi-dsdt-cpu-hotplug.dsl b/hw/i386/acpi-dsdt-cpu-hotplug.dsl index 1aff746..53e1389 100644 --- a/hw/i386/acpi-dsdt-cpu-hotplug.dsl +++ b/hw/i386/acpi-dsdt-cpu-hotplug.dsl @@ -53,7 +53,6 @@ Scope(\_SB) { Sleep(200) } -#define CPU_STATUS_LEN ACPI_GPE_PROC_LEN Method(PRSC, 0) { // Local5 = active cpu bitmap Store(PRS, Local5) -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 16/51] pc: acpi: cpuhp: move CPEJ() method to SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (14 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 15/51] pc: acpi: drop unused CPU_STATUS_LEN from DSDT Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 17/51] pc: acpi: cpuhp: move CPMA() method into SSDT Igor Mammedov ` (34 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/acpi/Makefile.objs | 2 +- hw/acpi/cpu_hotplug_acpi_table.c | 28 ++++++++++++++++++++++++++++ hw/i386/acpi-build.c | 3 ++- hw/i386/acpi-dsdt-cpu-hotplug.dsl | 4 ---- include/hw/acpi/cpu_hotplug.h | 5 +++++ 5 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 hw/acpi/cpu_hotplug_acpi_table.c diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs index 052be62..f3ade9a 100644 --- a/hw/acpi/Makefile.objs +++ b/hw/acpi/Makefile.objs @@ -1,6 +1,6 @@ common-obj-$(CONFIG_ACPI_X86) += core.o piix4.o pcihp.o common-obj-$(CONFIG_ACPI_X86_ICH) += ich9.o tco.o -common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu_hotplug.o +common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu_hotplug.o cpu_hotplug_acpi_table.o common-obj-$(CONFIG_ACPI_MEMORY_HOTPLUG) += memory_hotplug.o memory_hotplug_acpi_table.o common-obj-$(CONFIG_ACPI_NVDIMM) += nvdimm.o common-obj-$(CONFIG_ACPI) += acpi_interface.o diff --git a/hw/acpi/cpu_hotplug_acpi_table.c b/hw/acpi/cpu_hotplug_acpi_table.c new file mode 100644 index 0000000..422e57b --- /dev/null +++ b/hw/acpi/cpu_hotplug_acpi_table.c @@ -0,0 +1,28 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see <http://www.gnu.org/licenses/>. + */ + +#include "hw/acpi/cpu_hotplug.h" + +void build_cpu_hotplug_aml(Aml *ctx) +{ + Aml *method; + Aml *sb_scope = aml_scope("_SB"); + + method = aml_method(CPU_EJECT_METHOD, 2, AML_NOTSERIALIZED); + aml_append(method, aml_sleep(200)); + aml_append(sb_scope, method); + + aml_append(ctx, sb_scope); +} diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 7e71540..a4343de 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1078,6 +1078,7 @@ build_ssdt(GArray *table_data, GArray *linker, /* Reserve space for header */ acpi_data_push(ssdt->buf, sizeof(AcpiTableHeader)); + build_cpu_hotplug_aml(ssdt); build_memory_hotplug_aml(ssdt, nr_mem, pm->mem_hp_io_base, pm->mem_hp_io_len); @@ -1324,7 +1325,7 @@ build_ssdt(GArray *table_data, GArray *linker, method = aml_method("_EJ0", 1, AML_NOTSERIALIZED); aml_append(method, - aml_return(aml_call2("CPEJ", aml_int(i), aml_arg(0))) + aml_return(aml_call2(CPU_EJECT_METHOD, aml_int(i), aml_arg(0))) ); aml_append(dev, method); diff --git a/hw/i386/acpi-dsdt-cpu-hotplug.dsl b/hw/i386/acpi-dsdt-cpu-hotplug.dsl index 53e1389..18331be 100644 --- a/hw/i386/acpi-dsdt-cpu-hotplug.dsl +++ b/hw/i386/acpi-dsdt-cpu-hotplug.dsl @@ -48,10 +48,6 @@ Scope(\_SB) { Return (0x0) } } - Method(CPEJ, 2, NotSerialized) { - // _EJ0 method - eject callback - Sleep(200) - } Method(PRSC, 0) { // Local5 = active cpu bitmap diff --git a/include/hw/acpi/cpu_hotplug.h b/include/hw/acpi/cpu_hotplug.h index f6d358d..87504be 100644 --- a/include/hw/acpi/cpu_hotplug.h +++ b/include/hw/acpi/cpu_hotplug.h @@ -14,6 +14,7 @@ #include "hw/acpi/acpi.h" #include "hw/acpi/pc-hotplug.h" +#include "hw/acpi/aml-build.h" typedef struct AcpiCpuHotplug { MemoryRegion io; @@ -25,4 +26,8 @@ void acpi_cpu_plug_cb(ACPIREGS *ar, qemu_irq irq, void acpi_cpu_hotplug_init(MemoryRegion *parent, Object *owner, AcpiCpuHotplug *gpe_cpu, uint16_t base); + +#define CPU_EJECT_METHOD "CPEJ" + +void build_cpu_hotplug_aml(Aml *ctx); #endif -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 17/51] pc: acpi: cpuhp: move CPMA() method into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (15 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 16/51] pc: acpi: cpuhp: move CPEJ() method to SSDT Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 18/51] pc: acpi: cpuhp: move CPST() " Igor Mammedov ` (33 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/acpi/cpu_hotplug_acpi_table.c | 23 +++++++++++++++++++++++ hw/i386/acpi-build.c | 5 +++-- hw/i386/acpi-dsdt-cpu-hotplug.dsl | 13 ------------- include/hw/acpi/cpu_hotplug.h | 2 ++ 4 files changed, 28 insertions(+), 15 deletions(-) diff --git a/hw/acpi/cpu_hotplug_acpi_table.c b/hw/acpi/cpu_hotplug_acpi_table.c index 422e57b..69c37fa 100644 --- a/hw/acpi/cpu_hotplug_acpi_table.c +++ b/hw/acpi/cpu_hotplug_acpi_table.c @@ -19,6 +19,29 @@ void build_cpu_hotplug_aml(Aml *ctx) { Aml *method; Aml *sb_scope = aml_scope("_SB"); + uint8_t madt_tmpl[8] = {0x00, 0x08, 0x00, 0x00, 0x00, 0, 0, 0}; + Aml *cpu_id = aml_arg(0); + Aml *cpu_on = aml_local(0); + Aml *madt = aml_local(1); + Aml *cpus_map = aml_name(CPU_ON_BITMAP); + + /* + * _MAT method - creates an madt apic buffer + * cpu_id = Arg0 = Processor ID = Local APIC ID + * cpu_on = Local0 = CPON flag for this cpu + * madt = Local1 = Buffer (in madt apic form) to return + */ + method = aml_method(CPU_MAT_METHOD, 1, AML_NOTSERIALIZED); + aml_append(method, + aml_store(aml_derefof(aml_index(cpus_map, cpu_id)), cpu_on)); + aml_append(method, + aml_store(aml_buffer(sizeof(madt_tmpl), madt_tmpl), madt)); + /* Update the processor id, lapic id, and enable/disable status */ + aml_append(method, aml_store(cpu_id, aml_index(madt, aml_int(2)))); + aml_append(method, aml_store(cpu_id, aml_index(madt, aml_int(3)))); + aml_append(method, aml_store(cpu_on, aml_index(madt, aml_int(4)))); + aml_append(method, aml_return(madt)); + aml_append(sb_scope, method); method = aml_method(CPU_EJECT_METHOD, 2, AML_NOTSERIALIZED); aml_append(method, aml_sleep(200)); diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index a4343de..683687a 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1316,7 +1316,8 @@ build_ssdt(GArray *table_data, GArray *linker, dev = aml_processor(i, 0, 0, "CP%.02X", i); method = aml_method("_MAT", 0, AML_NOTSERIALIZED); - aml_append(method, aml_return(aml_call1("CPMA", aml_int(i)))); + aml_append(method, + aml_return(aml_call1(CPU_MAT_METHOD, aml_int(i)))); aml_append(dev, method); method = aml_method("_STA", 0, AML_NOTSERIALIZED); @@ -1360,7 +1361,7 @@ build_ssdt(GArray *table_data, GArray *linker, uint8_t b = test_bit(i, cpu->found_cpus) ? 0x01 : 0x00; aml_append(pkg, aml_int(b)); } - aml_append(sb_scope, aml_name_decl("CPON", pkg)); + aml_append(sb_scope, aml_name_decl(CPU_ON_BITMAP, pkg)); build_memory_devices(sb_scope, nr_mem, pm->mem_hp_io_base, pm->mem_hp_io_len); diff --git a/hw/i386/acpi-dsdt-cpu-hotplug.dsl b/hw/i386/acpi-dsdt-cpu-hotplug.dsl index 18331be..9739191 100644 --- a/hw/i386/acpi-dsdt-cpu-hotplug.dsl +++ b/hw/i386/acpi-dsdt-cpu-hotplug.dsl @@ -24,19 +24,6 @@ Scope(\_SB) { External(PRS, FieldUnitObj) /* Methods called by run-time generated SSDT Processor objects */ - Method(CPMA, 1, NotSerialized) { - // _MAT method - create an madt apic buffer - // Arg0 = Processor ID = Local APIC ID - // Local0 = CPON flag for this cpu - Store(DerefOf(Index(CPON, Arg0)), Local0) - // Local1 = Buffer (in madt apic form) to return - Store(Buffer(8) {0x00, 0x08, 0x00, 0x00, 0x00, 0, 0, 0}, Local1) - // Update the processor id, lapic id, and enable/disable status - Store(Arg0, Index(Local1, 2)) - Store(Arg0, Index(Local1, 3)) - Store(Local0, Index(Local1, 4)) - Return (Local1) - } Method(CPST, 1, NotSerialized) { // _STA method - return ON status of cpu // Arg0 = Processor ID = Local APIC ID diff --git a/include/hw/acpi/cpu_hotplug.h b/include/hw/acpi/cpu_hotplug.h index 87504be..40b9316 100644 --- a/include/hw/acpi/cpu_hotplug.h +++ b/include/hw/acpi/cpu_hotplug.h @@ -28,6 +28,8 @@ void acpi_cpu_hotplug_init(MemoryRegion *parent, Object *owner, AcpiCpuHotplug *gpe_cpu, uint16_t base); #define CPU_EJECT_METHOD "CPEJ" +#define CPU_MAT_METHOD "CPMA" +#define CPU_ON_BITMAP "CPON" void build_cpu_hotplug_aml(Aml *ctx); #endif -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 18/51] pc: acpi: cpuhp: move CPST() method into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (16 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 17/51] pc: acpi: cpuhp: move CPMA() method into SSDT Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 19/51] pc: acpi: cpuhp: move PRSC() " Igor Mammedov ` (32 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/acpi/cpu_hotplug_acpi_table.c | 22 ++++++++++++++++++++++ hw/i386/acpi-build.c | 3 ++- hw/i386/acpi-dsdt-cpu-hotplug.dsl | 12 ------------ include/hw/acpi/cpu_hotplug.h | 1 + 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/hw/acpi/cpu_hotplug_acpi_table.c b/hw/acpi/cpu_hotplug_acpi_table.c index 69c37fa..90c4043 100644 --- a/hw/acpi/cpu_hotplug_acpi_table.c +++ b/hw/acpi/cpu_hotplug_acpi_table.c @@ -18,6 +18,8 @@ void build_cpu_hotplug_aml(Aml *ctx) { Aml *method; + Aml *if_ctx; + Aml *else_ctx; Aml *sb_scope = aml_scope("_SB"); uint8_t madt_tmpl[8] = {0x00, 0x08, 0x00, 0x00, 0x00, 0, 0, 0}; Aml *cpu_id = aml_arg(0); @@ -43,6 +45,26 @@ void build_cpu_hotplug_aml(Aml *ctx) aml_append(method, aml_return(madt)); aml_append(sb_scope, method); + /* + * _STA method - return ON status of cpu + * cpu_id = Arg0 = Processor ID = Local APIC ID + * cpu_on = Local0 = CPON flag for this cpu + */ + method = aml_method(CPU_STATUS_METHOD, 1, AML_NOTSERIALIZED); + aml_append(method, + aml_store(aml_derefof(aml_index(cpus_map, cpu_id)), cpu_on)); + if_ctx = aml_if(cpu_on); + { + aml_append(if_ctx, aml_return(aml_int(0xF))); + } + aml_append(method, if_ctx); + else_ctx = aml_else(); + { + aml_append(else_ctx, aml_return(aml_int(0x0))); + } + aml_append(method, else_ctx); + aml_append(sb_scope, method); + method = aml_method(CPU_EJECT_METHOD, 2, AML_NOTSERIALIZED); aml_append(method, aml_sleep(200)); aml_append(sb_scope, method); diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 683687a..a1b4e98 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1321,7 +1321,8 @@ build_ssdt(GArray *table_data, GArray *linker, aml_append(dev, method); method = aml_method("_STA", 0, AML_NOTSERIALIZED); - aml_append(method, aml_return(aml_call1("CPST", aml_int(i)))); + aml_append(method, + aml_return(aml_call1(CPU_STATUS_METHOD, aml_int(i)))); aml_append(dev, method); method = aml_method("_EJ0", 1, AML_NOTSERIALIZED); diff --git a/hw/i386/acpi-dsdt-cpu-hotplug.dsl b/hw/i386/acpi-dsdt-cpu-hotplug.dsl index 9739191..fb75eda 100644 --- a/hw/i386/acpi-dsdt-cpu-hotplug.dsl +++ b/hw/i386/acpi-dsdt-cpu-hotplug.dsl @@ -24,18 +24,6 @@ Scope(\_SB) { External(PRS, FieldUnitObj) /* Methods called by run-time generated SSDT Processor objects */ - Method(CPST, 1, NotSerialized) { - // _STA method - return ON status of cpu - // Arg0 = Processor ID = Local APIC ID - // Local0 = CPON flag for this cpu - Store(DerefOf(Index(CPON, Arg0)), Local0) - If (Local0) { - Return (0xF) - } Else { - Return (0x0) - } - } - Method(PRSC, 0) { // Local5 = active cpu bitmap Store(PRS, Local5) diff --git a/include/hw/acpi/cpu_hotplug.h b/include/hw/acpi/cpu_hotplug.h index 40b9316..0755dd3 100644 --- a/include/hw/acpi/cpu_hotplug.h +++ b/include/hw/acpi/cpu_hotplug.h @@ -30,6 +30,7 @@ void acpi_cpu_hotplug_init(MemoryRegion *parent, Object *owner, #define CPU_EJECT_METHOD "CPEJ" #define CPU_MAT_METHOD "CPMA" #define CPU_ON_BITMAP "CPON" +#define CPU_STATUS_METHOD "CPST" void build_cpu_hotplug_aml(Aml *ctx); #endif -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 19/51] pc: acpi: cpuhp: move PRSC() method into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (17 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 18/51] pc: acpi: cpuhp: move CPST() " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 20/51] pc: acpi: cpuhp: move \_GPE._E02() " Igor Mammedov ` (31 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/acpi/cpu_hotplug_acpi_table.c | 64 ++++++++++++++++++++++++++++++++++++++- hw/i386/acpi-build.c | 2 +- hw/i386/acpi-dsdt-cpu-hotplug.dsl | 39 +----------------------- hw/i386/acpi-dsdt.dsl | 2 +- hw/i386/q35-acpi-dsdt.dsl | 2 +- include/hw/acpi/aml-build.h | 2 ++ include/hw/acpi/cpu_hotplug.h | 1 + include/hw/acpi/pc-hotplug.h | 1 + 8 files changed, 71 insertions(+), 42 deletions(-) diff --git a/hw/acpi/cpu_hotplug_acpi_table.c b/hw/acpi/cpu_hotplug_acpi_table.c index 90c4043..8dda4f4 100644 --- a/hw/acpi/cpu_hotplug_acpi_table.c +++ b/hw/acpi/cpu_hotplug_acpi_table.c @@ -26,6 +26,8 @@ void build_cpu_hotplug_aml(Aml *ctx) Aml *cpu_on = aml_local(0); Aml *madt = aml_local(1); Aml *cpus_map = aml_name(CPU_ON_BITMAP); + Aml *zero = aml_int(0); + Aml *one = aml_int(1); /* * _MAT method - creates an madt apic buffer @@ -60,7 +62,7 @@ void build_cpu_hotplug_aml(Aml *ctx) aml_append(method, if_ctx); else_ctx = aml_else(); { - aml_append(else_ctx, aml_return(aml_int(0x0))); + aml_append(else_ctx, aml_return(zero)); } aml_append(method, else_ctx); aml_append(sb_scope, method); @@ -69,5 +71,65 @@ void build_cpu_hotplug_aml(Aml *ctx) aml_append(method, aml_sleep(200)); aml_append(sb_scope, method); + method = aml_method(stringify(CPU_SCAN_METHOD), 0, AML_NOTSERIALIZED); + { + Aml *while_ctx, *if_ctx2, *else_ctx2; + Aml *bus_check_evt = aml_int(1); + Aml *remove_evt = aml_int(3); + Aml *status_map = aml_local(5); /* Local5 = active cpu bitmap */ + Aml *byte = aml_local(2); /* Local2 = last read byte from bitmap */ + Aml *idx = aml_local(0); /* Processor ID / APIC ID iterator */ + Aml *is_cpu_on = aml_local(1); /* Local1 = CPON flag for cpu */ + Aml *status = aml_local(3); /* Local3 = active state for cpu */ + + aml_append(method, aml_store(aml_name(CPU_STATUS_MAP), status_map)); + aml_append(method, aml_store(zero, byte)); + aml_append(method, aml_store(zero, idx)); + + /* While (idx < SizeOf(CPON)) */ + while_ctx = aml_while(aml_lless(idx, aml_sizeof(cpus_map))); + aml_append(while_ctx, + aml_store(aml_derefof(aml_index(cpus_map, idx)), is_cpu_on)); + + if_ctx = aml_if(aml_and(idx, aml_int(0x07), NULL)); + { + /* Shift down previously read bitmap byte */ + aml_append(if_ctx, aml_shiftright(byte, one, byte)); + } + aml_append(while_ctx, if_ctx); + + else_ctx = aml_else(); + { + /* Read next byte from cpu bitmap */ + aml_append(else_ctx, aml_store(aml_derefof(aml_index(status_map, + aml_shiftright(idx, aml_int(3), NULL))), byte)); + } + aml_append(while_ctx, else_ctx); + + aml_append(while_ctx, aml_store(aml_and(byte, one, NULL), status)); + if_ctx = aml_if(aml_lnot(aml_equal(is_cpu_on, status))); + { + /* State change - update CPON with new state */ + aml_append(if_ctx, aml_store(status, aml_index(cpus_map, idx))); + if_ctx2 = aml_if(aml_equal(status, one)); + { + aml_append(if_ctx2, + aml_call2(AML_NOTIFY_METHOD, idx, bus_check_evt)); + } + aml_append(if_ctx, if_ctx2); + else_ctx2 = aml_else(); + { + aml_append(else_ctx2, + aml_call2(AML_NOTIFY_METHOD, idx, remove_evt)); + } + } + aml_append(if_ctx, else_ctx2); + aml_append(while_ctx, if_ctx); + + aml_append(while_ctx, aml_increment(idx)); /* go to next cpu */ + aml_append(method, while_ctx); + } + aml_append(sb_scope, method); + aml_append(ctx, sb_scope); } diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index a1b4e98..1e0b7ed 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1338,7 +1338,7 @@ build_ssdt(GArray *table_data, GArray *linker, * Method(NTFY, 2) {If (LEqual(Arg0, 0x00)) {Notify(CP00, Arg1)} ...} */ /* Arg0 = Processor ID = APIC ID */ - method = aml_method("NTFY", 2, AML_NOTSERIALIZED); + method = aml_method(AML_NOTIFY_METHOD, 2, AML_NOTSERIALIZED); for (i = 0; i < acpi_cpus; i++) { ifctx = aml_if(aml_equal(aml_arg(0), aml_int(i))); aml_append(ifctx, diff --git a/hw/i386/acpi-dsdt-cpu-hotplug.dsl b/hw/i386/acpi-dsdt-cpu-hotplug.dsl index fb75eda..88c472b 100644 --- a/hw/i386/acpi-dsdt-cpu-hotplug.dsl +++ b/hw/i386/acpi-dsdt-cpu-hotplug.dsl @@ -19,42 +19,5 @@ Scope(\_SB) { /* Objects filled in by run-time generated SSDT */ - External(NTFY, MethodObj) - External(CPON, PkgObj) - External(PRS, FieldUnitObj) - - /* Methods called by run-time generated SSDT Processor objects */ - Method(PRSC, 0) { - // Local5 = active cpu bitmap - Store(PRS, Local5) - // Local2 = last read byte from bitmap - Store(Zero, Local2) - // Local0 = Processor ID / APIC ID iterator - Store(Zero, Local0) - While (LLess(Local0, SizeOf(CPON))) { - // Local1 = CPON flag for this cpu - Store(DerefOf(Index(CPON, Local0)), Local1) - If (And(Local0, 0x07)) { - // Shift down previously read bitmap byte - ShiftRight(Local2, 1, Local2) - } Else { - // Read next byte from cpu bitmap - Store(DerefOf(Index(Local5, ShiftRight(Local0, 3))), Local2) - } - // Local3 = active state for this cpu - Store(And(Local2, 1), Local3) - - If (LNotEqual(Local1, Local3)) { - // State change - update CPON with new state - Store(Local3, Index(CPON, Local0)) - // Do CPU notify - If (LEqual(Local3, 1)) { - NTFY(Local0, 1) - } Else { - NTFY(Local0, 3) - } - } - Increment(Local0) - } - } + External(CPU_SCAN_METHOD, MethodObj) } diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl index 9cf1b88..6a0c656 100644 --- a/hw/i386/acpi-dsdt.dsl +++ b/hw/i386/acpi-dsdt.dsl @@ -268,7 +268,7 @@ DefinitionBlock ( } Method(_E02) { // CPU hotplug event - \_SB.PRSC() + \_SB.CPU_SCAN_METHOD() } Method(_L04) { } diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl index f950f39..7211665 100644 --- a/hw/i386/q35-acpi-dsdt.dsl +++ b/hw/i386/q35-acpi-dsdt.dsl @@ -401,7 +401,7 @@ DefinitionBlock ( } Method(_E02) { // CPU hotplug event - \_SB.PRSC() + \_SB.CPU_SCAN_METHOD() } Method(_L04) { } diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index ef44d02..83c0102 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -16,6 +16,8 @@ #define ACPI_BUILD_RSDP_FILE "etc/acpi/rsdp" #define ACPI_BUILD_TPMLOG_FILE "etc/tpm/log" +#define AML_NOTIFY_METHOD "NTFY" + typedef enum { AML_NO_OPCODE = 0,/* has only data */ AML_OPCODE, /* has opcode optionally followed by data */ diff --git a/include/hw/acpi/cpu_hotplug.h b/include/hw/acpi/cpu_hotplug.h index 0755dd3..255e70c 100644 --- a/include/hw/acpi/cpu_hotplug.h +++ b/include/hw/acpi/cpu_hotplug.h @@ -31,6 +31,7 @@ void acpi_cpu_hotplug_init(MemoryRegion *parent, Object *owner, #define CPU_MAT_METHOD "CPMA" #define CPU_ON_BITMAP "CPON" #define CPU_STATUS_METHOD "CPST" +#define CPU_STATUS_MAP "PRS" void build_cpu_hotplug_aml(Aml *ctx); #endif diff --git a/include/hw/acpi/pc-hotplug.h b/include/hw/acpi/pc-hotplug.h index 6a8d268..6522745 100644 --- a/include/hw/acpi/pc-hotplug.h +++ b/include/hw/acpi/pc-hotplug.h @@ -28,6 +28,7 @@ #define ICH9_CPU_HOTPLUG_IO_BASE 0x0CD8 #define PIIX4_CPU_HOTPLUG_IO_BASE 0xaf00 #define CPU_HOTPLUG_RESOURCE_DEVICE PRES +#define CPU_SCAN_METHOD PRSC #define ACPI_MEMORY_HOTPLUG_IO_LEN 24 #define ACPI_MEMORY_HOTPLUG_BASE 0x0a00 -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 20/51] pc: acpi: cpuhp: move \_GPE._E02() into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (18 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 19/51] pc: acpi: cpuhp: move PRSC() " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 21/51] pc: acpi: factor out cpu hotplug code from build_ssdt() into separate function Igor Mammedov ` (30 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/acpi/cpu_hotplug_acpi_table.c | 2 +- hw/i386/acpi-build.c | 12 +++++++++--- hw/i386/acpi-dsdt-cpu-hotplug.dsl | 23 ----------------------- hw/i386/acpi-dsdt.dsl | 9 --------- hw/i386/q35-acpi-dsdt.dsl | 9 --------- include/hw/acpi/cpu_hotplug.h | 1 + include/hw/acpi/pc-hotplug.h | 1 - 7 files changed, 11 insertions(+), 46 deletions(-) delete mode 100644 hw/i386/acpi-dsdt-cpu-hotplug.dsl diff --git a/hw/acpi/cpu_hotplug_acpi_table.c b/hw/acpi/cpu_hotplug_acpi_table.c index 8dda4f4..13b210e 100644 --- a/hw/acpi/cpu_hotplug_acpi_table.c +++ b/hw/acpi/cpu_hotplug_acpi_table.c @@ -71,7 +71,7 @@ void build_cpu_hotplug_aml(Aml *ctx) aml_append(method, aml_sleep(200)); aml_append(sb_scope, method); - method = aml_method(stringify(CPU_SCAN_METHOD), 0, AML_NOTSERIALIZED); + method = aml_method(CPU_SCAN_METHOD, 0, AML_NOTSERIALIZED); { Aml *while_ctx, *if_ctx2, *else_ctx2; Aml *bus_check_evt = aml_int(1); diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 1e0b7ed..1cbc305 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1083,9 +1083,15 @@ build_ssdt(GArray *table_data, GArray *linker, pm->mem_hp_io_len); scope = aml_scope("\\_GPE"); - method = aml_method("_E03", 0, AML_NOTSERIALIZED); - aml_append(method, aml_call0(MEMORY_HOTPLUG_HANDLER_PATH)); - aml_append(scope, method); + { + method = aml_method("_E02", 0, AML_NOTSERIALIZED); + aml_append(method, aml_call0("\\_SB." CPU_SCAN_METHOD)); + aml_append(scope, method); + + method = aml_method("_E03", 0, AML_NOTSERIALIZED); + aml_append(method, aml_call0(MEMORY_HOTPLUG_HANDLER_PATH)); + aml_append(scope, method); + } aml_append(ssdt, scope); bus = PC_MACHINE(machine)->bus; diff --git a/hw/i386/acpi-dsdt-cpu-hotplug.dsl b/hw/i386/acpi-dsdt-cpu-hotplug.dsl deleted file mode 100644 index 88c472b..0000000 --- a/hw/i386/acpi-dsdt-cpu-hotplug.dsl +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License along - * with this program; if not, see <http://www.gnu.org/licenses/>. - */ - -/**************************************************************** - * CPU hotplug - ****************************************************************/ - -Scope(\_SB) { - /* Objects filled in by run-time generated SSDT */ - External(CPU_SCAN_METHOD, MethodObj) -} diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl index 6a0c656..007d3c9 100644 --- a/hw/i386/acpi-dsdt.dsl +++ b/hw/i386/acpi-dsdt.dsl @@ -247,11 +247,6 @@ DefinitionBlock ( } } -#include "hw/acpi/pc-hotplug.h" -#define CPU_STATUS_BASE PIIX4_CPU_HOTPLUG_IO_BASE -#include "acpi-dsdt-cpu-hotplug.dsl" - - /**************************************************************** * General purpose events ****************************************************************/ @@ -266,10 +261,6 @@ DefinitionBlock ( \_SB.PCI0.PCNT() Release(\_SB.PCI0.BLCK) } - Method(_E02) { - // CPU hotplug event - \_SB.CPU_SCAN_METHOD() - } Method(_L04) { } Method(_L05) { diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl index 7211665..0511e26 100644 --- a/hw/i386/q35-acpi-dsdt.dsl +++ b/hw/i386/q35-acpi-dsdt.dsl @@ -384,11 +384,6 @@ DefinitionBlock ( define_gsi_link(GSIH, 0, 0x17) } -#include "hw/acpi/pc-hotplug.h" -#define CPU_STATUS_BASE ICH9_CPU_HOTPLUG_IO_BASE -#include "acpi-dsdt-cpu-hotplug.dsl" - - /**************************************************************** * General purpose events ****************************************************************/ @@ -399,10 +394,6 @@ DefinitionBlock ( } Method(_L01) { } - Method(_E02) { - // CPU hotplug event - \_SB.CPU_SCAN_METHOD() - } Method(_L04) { } Method(_L05) { diff --git a/include/hw/acpi/cpu_hotplug.h b/include/hw/acpi/cpu_hotplug.h index 255e70c..f22640e 100644 --- a/include/hw/acpi/cpu_hotplug.h +++ b/include/hw/acpi/cpu_hotplug.h @@ -32,6 +32,7 @@ void acpi_cpu_hotplug_init(MemoryRegion *parent, Object *owner, #define CPU_ON_BITMAP "CPON" #define CPU_STATUS_METHOD "CPST" #define CPU_STATUS_MAP "PRS" +#define CPU_SCAN_METHOD "PRSC" void build_cpu_hotplug_aml(Aml *ctx); #endif diff --git a/include/hw/acpi/pc-hotplug.h b/include/hw/acpi/pc-hotplug.h index 6522745..6a8d268 100644 --- a/include/hw/acpi/pc-hotplug.h +++ b/include/hw/acpi/pc-hotplug.h @@ -28,7 +28,6 @@ #define ICH9_CPU_HOTPLUG_IO_BASE 0x0CD8 #define PIIX4_CPU_HOTPLUG_IO_BASE 0xaf00 #define CPU_HOTPLUG_RESOURCE_DEVICE PRES -#define CPU_SCAN_METHOD PRSC #define ACPI_MEMORY_HOTPLUG_IO_LEN 24 #define ACPI_MEMORY_HOTPLUG_BASE 0x0a00 -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 21/51] pc: acpi: factor out cpu hotplug code from build_ssdt() into separate function 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (19 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 20/51] pc: acpi: cpuhp: move \_GPE._E02() " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 22/51] pc: acpi: move HPET from DSDT to SSDT Igor Mammedov ` (29 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 174 ++++++++++++++++++++++++++++----------------------- 1 file changed, 94 insertions(+), 80 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 1cbc305..26655db 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -929,6 +929,98 @@ static Aml *build_crs(PCIHostState *host, return crs; } +static void build_processor_devices(Aml *sb_scope, unsigned acpi_cpus, + AcpiCpuInfo *cpu, AcpiPmInfo *pm) +{ + int i; + Aml *dev; + Aml *crs; + Aml *pkg; + Aml *field; + Aml *ifctx; + Aml *method; + + /* The current AML generator can cover the APIC ID range [0..255], + * inclusive, for VCPU hotplug. */ + QEMU_BUILD_BUG_ON(ACPI_CPU_HOTPLUG_ID_LIMIT > 256); + g_assert(acpi_cpus <= ACPI_CPU_HOTPLUG_ID_LIMIT); + + /* create PCI0.PRES device and its _CRS to reserve CPU hotplug MMIO */ + dev = aml_device("PCI0." stringify(CPU_HOTPLUG_RESOURCE_DEVICE)); + aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A06"))); + aml_append(dev, + aml_name_decl("_UID", aml_string("CPU Hotplug resources")) + ); + /* device present, functioning, decoding, not shown in UI */ + aml_append(dev, aml_name_decl("_STA", aml_int(0xB))); + crs = aml_resource_template(); + aml_append(crs, + aml_io(AML_DECODE16, pm->cpu_hp_io_base, pm->cpu_hp_io_base, 1, + pm->cpu_hp_io_len) + ); + aml_append(dev, aml_name_decl("_CRS", crs)); + aml_append(sb_scope, dev); + /* declare CPU hotplug MMIO region and PRS field to access it */ + aml_append(sb_scope, aml_operation_region( + "PRST", AML_SYSTEM_IO, pm->cpu_hp_io_base, pm->cpu_hp_io_len)); + field = aml_field("PRST", AML_BYTE_ACC, AML_NOLOCK, AML_PRESERVE); + aml_append(field, aml_named_field("PRS", 256)); + aml_append(sb_scope, field); + + /* build Processor object for each processor */ + for (i = 0; i < acpi_cpus; i++) { + dev = aml_processor(i, 0, 0, "CP%.02X", i); + + method = aml_method("_MAT", 0, AML_NOTSERIALIZED); + aml_append(method, + aml_return(aml_call1(CPU_MAT_METHOD, aml_int(i)))); + aml_append(dev, method); + + method = aml_method("_STA", 0, AML_NOTSERIALIZED); + aml_append(method, + aml_return(aml_call1(CPU_STATUS_METHOD, aml_int(i)))); + aml_append(dev, method); + + method = aml_method("_EJ0", 1, AML_NOTSERIALIZED); + aml_append(method, + aml_return(aml_call2(CPU_EJECT_METHOD, aml_int(i), aml_arg(0))) + ); + aml_append(dev, method); + + aml_append(sb_scope, dev); + } + + /* build this code: + * Method(NTFY, 2) {If (LEqual(Arg0, 0x00)) {Notify(CP00, Arg1)} ...} + */ + /* Arg0 = Processor ID = APIC ID */ + method = aml_method(AML_NOTIFY_METHOD, 2, AML_NOTSERIALIZED); + for (i = 0; i < acpi_cpus; i++) { + ifctx = aml_if(aml_equal(aml_arg(0), aml_int(i))); + aml_append(ifctx, + aml_notify(aml_name("CP%.02X", i), aml_arg(1)) + ); + aml_append(method, ifctx); + } + aml_append(sb_scope, method); + + /* build "Name(CPON, Package() { One, One, ..., Zero, Zero, ... })" + * + * Note: The ability to create variable-sized packages was first + * introduced in ACPI 2.0. ACPI 1.0 only allowed fixed-size packages + * ith up to 255 elements. Windows guests up to win2k8 fail when + * VarPackageOp is used. + */ + pkg = acpi_cpus <= 255 ? aml_package(acpi_cpus) : + aml_varpackage(acpi_cpus); + + for (i = 0; i < acpi_cpus; i++) { + uint8_t b = test_bit(i, cpu->found_cpus) ? 0x01 : 0x00; + aml_append(pkg, aml_int(b)); + } + aml_append(sb_scope, aml_name_decl(CPU_ON_BITMAP, pkg)); +} + static void build_memory_devices(Aml *sb_scope, int nr_mem, uint16_t io_base, uint16_t io_len) { @@ -1060,8 +1152,7 @@ build_ssdt(GArray *table_data, GArray *linker, { MachineState *machine = MACHINE(qdev_get_machine()); uint32_t nr_mem = machine->ram_slots; - unsigned acpi_cpus = guest_info->apic_id_limit; - Aml *ssdt, *sb_scope, *scope, *pkg, *dev, *method, *crs, *field, *ifctx; + Aml *ssdt, *sb_scope, *scope, *pkg, *dev, *method, *crs, *field; PCIBus *bus = NULL; GPtrArray *io_ranges = g_ptr_array_new_with_free_func(crs_range_free); GPtrArray *mem_ranges = g_ptr_array_new_with_free_func(crs_range_free); @@ -1070,10 +1161,6 @@ build_ssdt(GArray *table_data, GArray *linker, int i; ssdt = init_aml_allocator(); - /* The current AML generator can cover the APIC ID range [0..255], - * inclusive, for VCPU hotplug. */ - QEMU_BUILD_BUG_ON(ACPI_CPU_HOTPLUG_ID_LIMIT > 256); - g_assert(acpi_cpus <= ACPI_CPU_HOTPLUG_ID_LIMIT); /* Reserve space for header */ acpi_data_push(ssdt->buf, sizeof(AcpiTableHeader)); @@ -1295,80 +1382,7 @@ build_ssdt(GArray *table_data, GArray *linker, sb_scope = aml_scope("\\_SB"); { - /* create PCI0.PRES device and its _CRS to reserve CPU hotplug MMIO */ - dev = aml_device("PCI0." stringify(CPU_HOTPLUG_RESOURCE_DEVICE)); - aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A06"))); - aml_append(dev, - aml_name_decl("_UID", aml_string("CPU Hotplug resources")) - ); - /* device present, functioning, decoding, not shown in UI */ - aml_append(dev, aml_name_decl("_STA", aml_int(0xB))); - crs = aml_resource_template(); - aml_append(crs, - aml_io(AML_DECODE16, pm->cpu_hp_io_base, pm->cpu_hp_io_base, 1, - pm->cpu_hp_io_len) - ); - aml_append(dev, aml_name_decl("_CRS", crs)); - aml_append(sb_scope, dev); - /* declare CPU hotplug MMIO region and PRS field to access it */ - aml_append(sb_scope, aml_operation_region( - "PRST", AML_SYSTEM_IO, pm->cpu_hp_io_base, pm->cpu_hp_io_len)); - field = aml_field("PRST", AML_BYTE_ACC, AML_NOLOCK, AML_PRESERVE); - aml_append(field, aml_named_field("PRS", 256)); - aml_append(sb_scope, field); - - /* build Processor object for each processor */ - for (i = 0; i < acpi_cpus; i++) { - dev = aml_processor(i, 0, 0, "CP%.02X", i); - - method = aml_method("_MAT", 0, AML_NOTSERIALIZED); - aml_append(method, - aml_return(aml_call1(CPU_MAT_METHOD, aml_int(i)))); - aml_append(dev, method); - - method = aml_method("_STA", 0, AML_NOTSERIALIZED); - aml_append(method, - aml_return(aml_call1(CPU_STATUS_METHOD, aml_int(i)))); - aml_append(dev, method); - - method = aml_method("_EJ0", 1, AML_NOTSERIALIZED); - aml_append(method, - aml_return(aml_call2(CPU_EJECT_METHOD, aml_int(i), aml_arg(0))) - ); - aml_append(dev, method); - - aml_append(sb_scope, dev); - } - - /* build this code: - * Method(NTFY, 2) {If (LEqual(Arg0, 0x00)) {Notify(CP00, Arg1)} ...} - */ - /* Arg0 = Processor ID = APIC ID */ - method = aml_method(AML_NOTIFY_METHOD, 2, AML_NOTSERIALIZED); - for (i = 0; i < acpi_cpus; i++) { - ifctx = aml_if(aml_equal(aml_arg(0), aml_int(i))); - aml_append(ifctx, - aml_notify(aml_name("CP%.02X", i), aml_arg(1)) - ); - aml_append(method, ifctx); - } - aml_append(sb_scope, method); - - /* build "Name(CPON, Package() { One, One, ..., Zero, Zero, ... })" - * - * Note: The ability to create variable-sized packages was first - * introduced in ACPI 2.0. ACPI 1.0 only allowed fixed-size packages - * ith up to 255 elements. Windows guests up to win2k8 fail when - * VarPackageOp is used. - */ - pkg = acpi_cpus <= 255 ? aml_package(acpi_cpus) : - aml_varpackage(acpi_cpus); - - for (i = 0; i < acpi_cpus; i++) { - uint8_t b = test_bit(i, cpu->found_cpus) ? 0x01 : 0x00; - aml_append(pkg, aml_int(b)); - } - aml_append(sb_scope, aml_name_decl(CPU_ON_BITMAP, pkg)); + build_processor_devices(sb_scope, guest_info->apic_id_limit, cpu, pm); build_memory_devices(sb_scope, nr_mem, pm->mem_hp_io_base, pm->mem_hp_io_len); -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 22/51] pc: acpi: move HPET from DSDT to SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (20 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 21/51] pc: acpi: factor out cpu hotplug code from build_ssdt() into separate function Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 23/51] pc: acpi: move DBUG() " Igor Mammedov ` (28 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++ hw/i386/acpi-dsdt-hpet.dsl | 48 ----------------------------------------- hw/i386/acpi-dsdt.dsl | 2 -- hw/i386/q35-acpi-dsdt.dsl | 3 --- hw/timer/hpet.c | 2 +- include/hw/timer/hpet.h | 1 + 6 files changed, 55 insertions(+), 54 deletions(-) delete mode 100644 hw/i386/acpi-dsdt-hpet.dsl diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 26655db..a099244 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -51,6 +51,7 @@ #include "hw/pci/pci_bus.h" #include "hw/pci-host/q35.h" #include "hw/i386/intel_iommu.h" +#include "hw/timer/hpet.h" #include "hw/i386/q35-acpi-dsdt.hex" #include "hw/i386/acpi-dsdt.hex" @@ -1145,6 +1146,57 @@ static void build_memory_devices(Aml *sb_scope, int nr_mem, aml_append(sb_scope, method); } +static void build_hpet_aml(Aml *table) +{ + Aml *crs; + Aml *field; + Aml *method; + Aml *if_ctx; + Aml *scope = aml_scope("_SB"); + Aml *dev = aml_device("HPET"); + Aml *zero = aml_int(0); + Aml *id = aml_local(0); + Aml *period = aml_local(1); + + aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0103"))); + aml_append(dev, aml_name_decl("_UID", zero)); + + aml_append(dev, + aml_operation_region("HPTM", AML_SYSTEM_MEMORY, HPET_BASE, HPET_LEN)); + field = aml_field("HPTM", AML_DWORD_ACC, AML_LOCK, AML_PRESERVE); + aml_append(field, aml_named_field("VEND", 32)); + aml_append(field, aml_named_field("PRD", 32)); + aml_append(dev, field); + + method = aml_method("_STA", 0, AML_NOTSERIALIZED); + aml_append(method, aml_store(aml_name("VEND"), id)); + aml_append(method, aml_store(aml_name("PRD"), period)); + aml_append(method, aml_shiftright(id, aml_int(16), id)); + if_ctx = aml_if(aml_lor(aml_equal(id, zero), + aml_equal(id, aml_int(0xffff)))); + { + aml_append(if_ctx, aml_return(zero)); + } + aml_append(method, if_ctx); + + if_ctx = aml_if(aml_lor(aml_equal(period, zero), + aml_lgreater(period, aml_int(100000000)))); + { + aml_append(if_ctx, aml_return(zero)); + } + aml_append(method, if_ctx); + + aml_append(method, aml_return(aml_int(0x0F))); + aml_append(dev, method); + + crs = aml_resource_template(); + aml_append(crs, aml_memory32_fixed(HPET_BASE, HPET_LEN, AML_READ_ONLY)); + aml_append(dev, aml_name_decl("_CRS", crs)); + + aml_append(scope, dev); + aml_append(table, scope); +} + static void build_ssdt(GArray *table_data, GArray *linker, AcpiCpuInfo *cpu, AcpiPmInfo *pm, AcpiMiscInfo *misc, @@ -1165,6 +1217,7 @@ build_ssdt(GArray *table_data, GArray *linker, /* Reserve space for header */ acpi_data_push(ssdt->buf, sizeof(AcpiTableHeader)); + build_hpet_aml(ssdt); build_cpu_hotplug_aml(ssdt); build_memory_hotplug_aml(ssdt, nr_mem, pm->mem_hp_io_base, pm->mem_hp_io_len); diff --git a/hw/i386/acpi-dsdt-hpet.dsl b/hw/i386/acpi-dsdt-hpet.dsl deleted file mode 100644 index 44961b8..0000000 --- a/hw/i386/acpi-dsdt-hpet.dsl +++ /dev/null @@ -1,48 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License along - * with this program; if not, see <http://www.gnu.org/licenses/>. - */ - -/**************************************************************** - * HPET - ****************************************************************/ - -Scope(\_SB) { - Device(HPET) { - Name(_HID, EISAID("PNP0103")) - Name(_UID, 0) - OperationRegion(HPTM, SystemMemory, 0xFED00000, 0x400) - Field(HPTM, DWordAcc, Lock, Preserve) { - VEND, 32, - PRD, 32, - } - Method(_STA, 0, NotSerialized) { - Store(VEND, Local0) - Store(PRD, Local1) - ShiftRight(Local0, 16, Local0) - If (LOr(LEqual(Local0, 0), LEqual(Local0, 0xffff))) { - Return (0x0) - } - If (LOr(LEqual(Local1, 0), LGreater(Local1, 100000000))) { - Return (0x0) - } - Return (0x0F) - } - Name(_CRS, ResourceTemplate() { - Memory32Fixed(ReadOnly, - 0xFED00000, // Address Base - 0x00000400, // Address Length - ) - }) - } -} diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl index 007d3c9..aa7f549 100644 --- a/hw/i386/acpi-dsdt.dsl +++ b/hw/i386/acpi-dsdt.dsl @@ -41,8 +41,6 @@ DefinitionBlock ( } } -#include "acpi-dsdt-hpet.dsl" - /**************************************************************** * PIIX4 PM ****************************************************************/ diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl index 0511e26..e57adb8 100644 --- a/hw/i386/q35-acpi-dsdt.dsl +++ b/hw/i386/q35-acpi-dsdt.dsl @@ -115,9 +115,6 @@ DefinitionBlock ( } } -#include "acpi-dsdt-hpet.dsl" - - /**************************************************************** * LPC ISA bridge ****************************************************************/ diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c index 7f0391c..d9d039b 100644 --- a/hw/timer/hpet.c +++ b/hw/timer/hpet.c @@ -713,7 +713,7 @@ static void hpet_init(Object *obj) HPETState *s = HPET(obj); /* HPET Area */ - memory_region_init_io(&s->iomem, obj, &hpet_ram_ops, s, "hpet", 0x400); + memory_region_init_io(&s->iomem, obj, &hpet_ram_ops, s, "hpet", HPET_LEN); sysbus_init_mmio(sbd, &s->iomem); } diff --git a/include/hw/timer/hpet.h b/include/hw/timer/hpet.h index d872909..f38bcfe 100644 --- a/include/hw/timer/hpet.h +++ b/include/hw/timer/hpet.h @@ -16,6 +16,7 @@ #include "qom/object.h" #define HPET_BASE 0xfed00000 +#define HPET_LEN 0x400 #define HPET_CLK_PERIOD 10 /* 10 ns*/ #define FS_PER_NS 1000000 /* 1000000 femtoseconds == 1 ns */ -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 23/51] pc: acpi: move DBUG() from DSDT to SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (21 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 22/51] pc: acpi: move HPET from DSDT to SSDT Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 24/51] pc: acpi: move RTC device " Igor Mammedov ` (27 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 36 ++++++++++++++++++++++++++++++++++++ hw/i386/acpi-dsdt-dbug.dsl | 41 ----------------------------------------- hw/i386/acpi-dsdt.dsl | 2 -- hw/i386/q35-acpi-dsdt.dsl | 2 -- 4 files changed, 36 insertions(+), 45 deletions(-) delete mode 100644 hw/i386/acpi-dsdt-dbug.dsl diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index a099244..c5b9ca2 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1197,6 +1197,41 @@ static void build_hpet_aml(Aml *table) aml_append(table, scope); } +static void build_dbg_aml(Aml *table) +{ + Aml *field; + Aml *method; + Aml *while_ctx; + Aml *scope = aml_scope("\\"); + Aml *buf = aml_local(0); + Aml *len = aml_local(1); + Aml *idx = aml_local(2); + + aml_append(scope, + aml_operation_region("DBG", AML_SYSTEM_IO, 0x0402, 0x01)); + field = aml_field("DBG", AML_BYTE_ACC, AML_NOLOCK, AML_PRESERVE); + aml_append(field, aml_named_field("DBGB", 8)); + aml_append(scope, field); + + method = aml_method("DBUG", 1, AML_NOTSERIALIZED); + + aml_append(method, aml_to_hexstring(aml_arg(0), buf)); + aml_append(method, aml_to_buffer(buf, buf)); + aml_append(method, aml_subtract(aml_sizeof(buf), aml_int(1), len)); + aml_append(method, aml_store(aml_int(0), idx)); + + while_ctx = aml_while(aml_lless(idx, len)); + aml_append(while_ctx, + aml_store(aml_derefof(aml_index(buf, idx)), aml_name("DBGB"))); + aml_append(while_ctx, aml_increment(idx)); + aml_append(method, while_ctx); + + aml_append(method, aml_store(aml_int(0x0A), aml_name("DBGB"))); + aml_append(scope, method); + + aml_append(table, scope); +} + static void build_ssdt(GArray *table_data, GArray *linker, AcpiCpuInfo *cpu, AcpiPmInfo *pm, AcpiMiscInfo *misc, @@ -1217,6 +1252,7 @@ build_ssdt(GArray *table_data, GArray *linker, /* Reserve space for header */ acpi_data_push(ssdt->buf, sizeof(AcpiTableHeader)); + build_dbg_aml(ssdt); build_hpet_aml(ssdt); build_cpu_hotplug_aml(ssdt); build_memory_hotplug_aml(ssdt, nr_mem, pm->mem_hp_io_base, diff --git a/hw/i386/acpi-dsdt-dbug.dsl b/hw/i386/acpi-dsdt-dbug.dsl deleted file mode 100644 index 86230f7..0000000 --- a/hw/i386/acpi-dsdt-dbug.dsl +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License along - * with this program; if not, see <http://www.gnu.org/licenses/>. - */ - -/**************************************************************** - * Debugging - ****************************************************************/ - -Scope(\) { - /* Debug Output */ - OperationRegion(DBG, SystemIO, 0x0402, 0x01) - Field(DBG, ByteAcc, NoLock, Preserve) { - DBGB, 8, - } - - /* Debug method - use this method to send output to the QEMU - * BIOS debug port. This method handles strings, integers, - * and buffers. For example: DBUG("abc") DBUG(0x123) */ - Method(DBUG, 1) { - ToHexString(Arg0, Local0) - ToBuffer(Local0, Local0) - Subtract(SizeOf(Local0), 1, Local1) - Store(Zero, Local2) - While (LLess(Local2, Local1)) { - Store(DerefOf(Index(Local0, Local2)), DBGB) - Increment(Local2) - } - Store(0x0A, DBGB) - } -} diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl index aa7f549..55c2220 100644 --- a/hw/i386/acpi-dsdt.dsl +++ b/hw/i386/acpi-dsdt.dsl @@ -29,8 +29,6 @@ DefinitionBlock ( ) { -#include "acpi-dsdt-dbug.dsl" - Scope(\_SB) { Device(PCI0) { Name(_HID, EisaId("PNP0A03")) diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl index e57adb8..bf3f974 100644 --- a/hw/i386/q35-acpi-dsdt.dsl +++ b/hw/i386/q35-acpi-dsdt.dsl @@ -35,8 +35,6 @@ DefinitionBlock ( ) { -#include "acpi-dsdt-dbug.dsl" - Scope(\_SB) { OperationRegion(PCST, SystemIO, 0xae00, 0x0c) OperationRegion(PCSB, SystemIO, 0xae0c, 0x01) -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 24/51] pc: acpi: move RTC device from DSDT to SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (22 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 23/51] pc: acpi: move DBUG() " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 25/51] pc: acpi: move KBD " Igor Mammedov ` (26 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 26 ++++++++++++++++++++++++++ hw/i386/acpi-dsdt-isa.dsl | 9 --------- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index c5b9ca2..aa40132 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1197,6 +1197,31 @@ static void build_hpet_aml(Aml *table) aml_append(table, scope); } +static Aml *build_rtc_device_aml(void) +{ + Aml *dev; + Aml *crs; + + dev = aml_device("RTC"); + aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0B00"))); + crs = aml_resource_template(); + aml_append(crs, aml_io(AML_DECODE16, 0x0070, 0x0070, 0x10, 0x02)); + aml_append(crs, aml_irq_no_flags(8)); + aml_append(crs, aml_io(AML_DECODE16, 0x0072, 0x0072, 0x02, 0x06)); + aml_append(dev, aml_name_decl("_CRS", crs)); + + return dev; +} + +static void build_isa_devices_aml(Aml *table) +{ + Aml *scope = aml_scope("_SB.PCI0.ISA"); + + aml_append(scope, build_rtc_device_aml()); + + aml_append(table, scope); +} + static void build_dbg_aml(Aml *table) { Aml *field; @@ -1254,6 +1279,7 @@ build_ssdt(GArray *table_data, GArray *linker, build_dbg_aml(ssdt); build_hpet_aml(ssdt); + build_isa_devices_aml(ssdt); build_cpu_hotplug_aml(ssdt); build_memory_hotplug_aml(ssdt, nr_mem, pm->mem_hp_io_base, pm->mem_hp_io_len); diff --git a/hw/i386/acpi-dsdt-isa.dsl b/hw/i386/acpi-dsdt-isa.dsl index 89caa16..f2cbbea 100644 --- a/hw/i386/acpi-dsdt-isa.dsl +++ b/hw/i386/acpi-dsdt-isa.dsl @@ -16,15 +16,6 @@ /* Common legacy ISA style devices. */ Scope(\_SB.PCI0.ISA) { - Device(RTC) { - Name(_HID, EisaId("PNP0B00")) - Name(_CRS, ResourceTemplate() { - IO(Decode16, 0x0070, 0x0070, 0x10, 0x02) - IRQNoFlags() { 8 } - IO(Decode16, 0x0072, 0x0072, 0x02, 0x06) - }) - } - Device(KBD) { Name(_HID, EisaId("PNP0303")) Method(_STA, 0, NotSerialized) { -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 25/51] pc: acpi: move KBD device from DSDT to SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (23 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 24/51] pc: acpi: move RTC device " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 26/51] pc: acpi: move MOU " Igor Mammedov ` (25 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 22 ++++++++++++++++++++++ hw/i386/acpi-dsdt-isa.dsl | 12 ------------ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index aa40132..8c4c003 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1208,6 +1208,27 @@ static Aml *build_rtc_device_aml(void) aml_append(crs, aml_io(AML_DECODE16, 0x0070, 0x0070, 0x10, 0x02)); aml_append(crs, aml_irq_no_flags(8)); aml_append(crs, aml_io(AML_DECODE16, 0x0072, 0x0072, 0x02, 0x06)); + + return dev; +} + +static Aml *build_kbd_device_aml(void) +{ + Aml *dev; + Aml *crs; + Aml *method; + + dev = aml_device("KBD"); + aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0303"))); + + method = aml_method("_STA", 0, AML_NOTSERIALIZED); + aml_append(method, aml_return(aml_int(0x0f))); + aml_append(dev, method); + + crs = aml_resource_template(); + aml_append(crs, aml_io(AML_DECODE16, 0x0060, 0x0060, 0x01, 0x01)); + aml_append(crs, aml_io(AML_DECODE16, 0x0064, 0x0064, 0x01, 0x01)); + aml_append(crs, aml_irq_no_flags(1)); aml_append(dev, aml_name_decl("_CRS", crs)); return dev; @@ -1218,6 +1239,7 @@ static void build_isa_devices_aml(Aml *table) Aml *scope = aml_scope("_SB.PCI0.ISA"); aml_append(scope, build_rtc_device_aml()); + aml_append(scope, build_kbd_device_aml()); aml_append(table, scope); } diff --git a/hw/i386/acpi-dsdt-isa.dsl b/hw/i386/acpi-dsdt-isa.dsl index f2cbbea..f7a3c0a 100644 --- a/hw/i386/acpi-dsdt-isa.dsl +++ b/hw/i386/acpi-dsdt-isa.dsl @@ -16,18 +16,6 @@ /* Common legacy ISA style devices. */ Scope(\_SB.PCI0.ISA) { - Device(KBD) { - Name(_HID, EisaId("PNP0303")) - Method(_STA, 0, NotSerialized) { - Return (0x0f) - } - Name(_CRS, ResourceTemplate() { - IO(Decode16, 0x0060, 0x0060, 0x01, 0x01) - IO(Decode16, 0x0064, 0x0064, 0x01, 0x01) - IRQNoFlags() { 1 } - }) - } - Device(MOU) { Name(_HID, EisaId("PNP0F13")) Method(_STA, 0, NotSerialized) { -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 26/51] pc: acpi: move MOU device from DSDT to SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (24 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 25/51] pc: acpi: move KBD " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 27/51] pc: acpi: move FDC0 " Igor Mammedov ` (24 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 21 +++++++++++++++++++++ hw/i386/acpi-dsdt-isa.dsl | 10 ---------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 8c4c003..207dfb9 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1234,12 +1234,33 @@ static Aml *build_kbd_device_aml(void) return dev; } +static Aml *build_mouse_device_aml(void) +{ + Aml *dev; + Aml *crs; + Aml *method; + + dev = aml_device("MOU"); + aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0F13"))); + + method = aml_method("_STA", 0, AML_NOTSERIALIZED); + aml_append(method, aml_return(aml_int(0x0f))); + aml_append(dev, method); + + crs = aml_resource_template(); + aml_append(crs, aml_irq_no_flags(12)); + aml_append(dev, aml_name_decl("_CRS", crs)); + + return dev; +} + static void build_isa_devices_aml(Aml *table) { Aml *scope = aml_scope("_SB.PCI0.ISA"); aml_append(scope, build_rtc_device_aml()); aml_append(scope, build_kbd_device_aml()); + aml_append(scope, build_mouse_device_aml()); aml_append(table, scope); } diff --git a/hw/i386/acpi-dsdt-isa.dsl b/hw/i386/acpi-dsdt-isa.dsl index f7a3c0a..8936271 100644 --- a/hw/i386/acpi-dsdt-isa.dsl +++ b/hw/i386/acpi-dsdt-isa.dsl @@ -16,16 +16,6 @@ /* Common legacy ISA style devices. */ Scope(\_SB.PCI0.ISA) { - Device(MOU) { - Name(_HID, EisaId("PNP0F13")) - Method(_STA, 0, NotSerialized) { - Return (0x0f) - } - Name(_CRS, ResourceTemplate() { - IRQNoFlags() { 12 } - }) - } - Device(FDC0) { Name(_HID, EisaId("PNP0700")) Method(_STA, 0, NotSerialized) { -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 27/51] pc: acpi: move FDC0 device from DSDT to SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (25 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 26/51] pc: acpi: move MOU " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 28/51] pc: acpi: move LPT " Igor Mammedov ` (23 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 40 ++++++++++++++++++++++++++++++++++++++++ hw/i386/acpi-dsdt-isa.dsl | 18 ------------------ 2 files changed, 40 insertions(+), 18 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 207dfb9..9ca428a 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1197,6 +1197,44 @@ static void build_hpet_aml(Aml *table) aml_append(table, scope); } +static Aml *build_fdc_device_aml(void) +{ + Aml *dev; + Aml *crs; + Aml *method; + Aml *if_ctx; + Aml *else_ctx; + Aml *zero = aml_int(0); + Aml *is_present = aml_local(0); + + dev = aml_device("FDC0"); + aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0700"))); + + method = aml_method("_STA", 0, AML_NOTSERIALIZED); + aml_append(method, aml_store(aml_name("FDEN"), is_present)); + if_ctx = aml_if(aml_equal(is_present, zero)); + { + aml_append(if_ctx, aml_return(aml_int(0x00))); + } + aml_append(method, if_ctx); + else_ctx = aml_else(); + { + aml_append(else_ctx, aml_return(aml_int(0x0f))); + } + aml_append(method, else_ctx); + aml_append(dev, method); + + crs = aml_resource_template(); + aml_append(crs, aml_io(AML_DECODE16, 0x03F2, 0x03F2, 0x00, 0x04)); + aml_append(crs, aml_io(AML_DECODE16, 0x03F7, 0x03F7, 0x00, 0x01)); + aml_append(crs, aml_irq_no_flags(6)); + aml_append(crs, + aml_dma(AML_COMPATIBILITY, AML_NOTBUSMASTER, AML_TRANSFER8, 2)); + aml_append(dev, aml_name_decl("_CRS", crs)); + + return dev; +} + static Aml *build_rtc_device_aml(void) { Aml *dev; @@ -1208,6 +1246,7 @@ static Aml *build_rtc_device_aml(void) aml_append(crs, aml_io(AML_DECODE16, 0x0070, 0x0070, 0x10, 0x02)); aml_append(crs, aml_irq_no_flags(8)); aml_append(crs, aml_io(AML_DECODE16, 0x0072, 0x0072, 0x02, 0x06)); + aml_append(dev, aml_name_decl("_CRS", crs)); return dev; } @@ -1261,6 +1300,7 @@ static void build_isa_devices_aml(Aml *table) aml_append(scope, build_rtc_device_aml()); aml_append(scope, build_kbd_device_aml()); aml_append(scope, build_mouse_device_aml()); + aml_append(scope, build_fdc_device_aml()); aml_append(table, scope); } diff --git a/hw/i386/acpi-dsdt-isa.dsl b/hw/i386/acpi-dsdt-isa.dsl index 8936271..64dd4ac 100644 --- a/hw/i386/acpi-dsdt-isa.dsl +++ b/hw/i386/acpi-dsdt-isa.dsl @@ -16,24 +16,6 @@ /* Common legacy ISA style devices. */ Scope(\_SB.PCI0.ISA) { - Device(FDC0) { - Name(_HID, EisaId("PNP0700")) - Method(_STA, 0, NotSerialized) { - Store(FDEN, Local0) - If (LEqual(Local0, 0)) { - Return (0x00) - } Else { - Return (0x0F) - } - } - Name(_CRS, ResourceTemplate() { - IO(Decode16, 0x03F2, 0x03F2, 0x00, 0x04) - IO(Decode16, 0x03F7, 0x03F7, 0x00, 0x01) - IRQNoFlags() { 6 } - DMA(Compatibility, NotBusMaster, Transfer8) { 2 } - }) - } - Device(LPT) { Name(_HID, EisaId("PNP0400")) Method(_STA, 0, NotSerialized) { -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 28/51] pc: acpi: move LPT device from DSDT to SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (26 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 27/51] pc: acpi: move FDC0 " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 29/51] pc: acpi: move COM devices " Igor Mammedov ` (22 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 36 ++++++++++++++++++++++++++++++++++++ hw/i386/acpi-dsdt-isa.dsl | 16 ---------------- 2 files changed, 36 insertions(+), 16 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 9ca428a..3585849 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1293,6 +1293,41 @@ static Aml *build_mouse_device_aml(void) return dev; } +static Aml *build_lpt_device_aml(void) +{ + Aml *dev; + Aml *crs; + Aml *method; + Aml *if_ctx; + Aml *else_ctx; + Aml *zero = aml_int(0); + Aml *is_present = aml_local(0); + + dev = aml_device("LPT"); + aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0400"))); + + method = aml_method("_STA", 0, AML_NOTSERIALIZED); + aml_append(method, aml_store(aml_name("LPEN"), is_present)); + if_ctx = aml_if(aml_equal(is_present, zero)); + { + aml_append(if_ctx, aml_return(aml_int(0x00))); + } + aml_append(method, if_ctx); + else_ctx = aml_else(); + { + aml_append(else_ctx, aml_return(aml_int(0x0f))); + } + aml_append(method, else_ctx); + aml_append(dev, method); + + crs = aml_resource_template(); + aml_append(crs, aml_io(AML_DECODE16, 0x0378, 0x0378, 0x08, 0x08)); + aml_append(crs, aml_irq_no_flags(7)); + aml_append(dev, aml_name_decl("_CRS", crs)); + + return dev; +} + static void build_isa_devices_aml(Aml *table) { Aml *scope = aml_scope("_SB.PCI0.ISA"); @@ -1301,6 +1336,7 @@ static void build_isa_devices_aml(Aml *table) aml_append(scope, build_kbd_device_aml()); aml_append(scope, build_mouse_device_aml()); aml_append(scope, build_fdc_device_aml()); + aml_append(scope, build_lpt_device_aml()); aml_append(table, scope); } diff --git a/hw/i386/acpi-dsdt-isa.dsl b/hw/i386/acpi-dsdt-isa.dsl index 64dd4ac..cc5e8f9 100644 --- a/hw/i386/acpi-dsdt-isa.dsl +++ b/hw/i386/acpi-dsdt-isa.dsl @@ -16,22 +16,6 @@ /* Common legacy ISA style devices. */ Scope(\_SB.PCI0.ISA) { - Device(LPT) { - Name(_HID, EisaId("PNP0400")) - Method(_STA, 0, NotSerialized) { - Store(LPEN, Local0) - If (LEqual(Local0, 0)) { - Return (0x00) - } Else { - Return (0x0F) - } - } - Name(_CRS, ResourceTemplate() { - IO(Decode16, 0x0378, 0x0378, 0x08, 0x08) - IRQNoFlags() { 7 } - }) - } - Device(COM1) { Name(_HID, EisaId("PNP0501")) Name(_UID, 0x01) -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 29/51] pc: acpi: move COM devices from DSDT to SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (27 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 28/51] pc: acpi: move LPT " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 30/51] pc: acpi: move PIIX4 isa-bridge and pm devices into SSDT Igor Mammedov ` (21 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 48 +++++++++++++++++++++++++++++++++++++++++++ hw/i386/acpi-dsdt-isa.dsl | 52 ----------------------------------------------- hw/i386/acpi-dsdt.dsl | 3 --- hw/i386/q35-acpi-dsdt.dsl | 3 --- 4 files changed, 48 insertions(+), 58 deletions(-) delete mode 100644 hw/i386/acpi-dsdt-isa.dsl diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 3585849..44eb068 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1328,6 +1328,52 @@ static Aml *build_lpt_device_aml(void) return dev; } +static Aml *build_com_device_aml(uint8_t uid) +{ + Aml *dev; + Aml *crs; + Aml *method; + Aml *if_ctx; + Aml *else_ctx; + Aml *zero = aml_int(0); + Aml *is_present = aml_local(0); + const char *enabled_field = "CAEN"; + uint8_t irq = 4; + uint16_t io_port = 0x03F8; + + assert(uid == 1 || uid == 2); + if (uid == 2) { + enabled_field = "CBEN"; + irq = 3; + io_port = 0x02F8; + } + + dev = aml_device("COM%d", uid); + aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0501"))); + aml_append(dev, aml_name_decl("_UID", aml_int(uid))); + + method = aml_method("_STA", 0, AML_NOTSERIALIZED); + aml_append(method, aml_store(aml_name("%s", enabled_field), is_present)); + if_ctx = aml_if(aml_equal(is_present, zero)); + { + aml_append(if_ctx, aml_return(aml_int(0x00))); + } + aml_append(method, if_ctx); + else_ctx = aml_else(); + { + aml_append(else_ctx, aml_return(aml_int(0x0f))); + } + aml_append(method, else_ctx); + aml_append(dev, method); + + crs = aml_resource_template(); + aml_append(crs, aml_io(AML_DECODE16, io_port, io_port, 0x00, 0x08)); + aml_append(crs, aml_irq_no_flags(irq)); + aml_append(dev, aml_name_decl("_CRS", crs)); + + return dev; +} + static void build_isa_devices_aml(Aml *table) { Aml *scope = aml_scope("_SB.PCI0.ISA"); @@ -1337,6 +1383,8 @@ static void build_isa_devices_aml(Aml *table) aml_append(scope, build_mouse_device_aml()); aml_append(scope, build_fdc_device_aml()); aml_append(scope, build_lpt_device_aml()); + aml_append(scope, build_com_device_aml(1)); + aml_append(scope, build_com_device_aml(2)); aml_append(table, scope); } diff --git a/hw/i386/acpi-dsdt-isa.dsl b/hw/i386/acpi-dsdt-isa.dsl deleted file mode 100644 index cc5e8f9..0000000 --- a/hw/i386/acpi-dsdt-isa.dsl +++ /dev/null @@ -1,52 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License along - * with this program; if not, see <http://www.gnu.org/licenses/>. - */ - -/* Common legacy ISA style devices. */ -Scope(\_SB.PCI0.ISA) { - - Device(COM1) { - Name(_HID, EisaId("PNP0501")) - Name(_UID, 0x01) - Method(_STA, 0, NotSerialized) { - Store(CAEN, Local0) - If (LEqual(Local0, 0)) { - Return (0x00) - } Else { - Return (0x0F) - } - } - Name(_CRS, ResourceTemplate() { - IO(Decode16, 0x03F8, 0x03F8, 0x00, 0x08) - IRQNoFlags() { 4 } - }) - } - - Device(COM2) { - Name(_HID, EisaId("PNP0501")) - Name(_UID, 0x02) - Method(_STA, 0, NotSerialized) { - Store(CBEN, Local0) - If (LEqual(Local0, 0)) { - Return (0x00) - } Else { - Return (0x0F) - } - } - Name(_CRS, ResourceTemplate() { - IO(Decode16, 0x02F8, 0x02F8, 0x00, 0x08) - IRQNoFlags() { 3 } - }) - } -} diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl index 55c2220..6048cc7 100644 --- a/hw/i386/acpi-dsdt.dsl +++ b/hw/i386/acpi-dsdt.dsl @@ -80,9 +80,6 @@ DefinitionBlock ( } } -#include "acpi-dsdt-isa.dsl" - - /**************************************************************** * PCI hotplug ****************************************************************/ diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl index bf3f974..4862ded 100644 --- a/hw/i386/q35-acpi-dsdt.dsl +++ b/hw/i386/q35-acpi-dsdt.dsl @@ -146,9 +146,6 @@ DefinitionBlock ( } } -#include "acpi-dsdt-isa.dsl" - - /**************************************************************** * PCI IRQs ****************************************************************/ -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 30/51] pc: acpi: move PIIX4 isa-bridge and pm devices into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (28 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 29/51] pc: acpi: move COM devices " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 31/51] pc: acpi: move remaining GPE handlers " Igor Mammedov ` (20 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel and also move PRQx fields declaration as it can't be split out into separate patch since fields use PCI0.ISA.P40C operation region and OperationRegion must be declared in the same table as a Field that uses it. If this condition is not statisfied Windows will BSOD ans IASL (make check) will error out as well. For the same reason pm is moved together with isa-bridge as the later refernces P13C OperationRegion from pm device. Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 77 +++++++++++++++++++++++++++++++++++++++++++-- hw/i386/acpi-dsdt.dsl | 52 +++--------------------------- include/hw/acpi/aml-build.h | 1 + 3 files changed, 81 insertions(+), 49 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 44eb068..88deea5 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -108,6 +108,7 @@ typedef struct AcpiPmInfo { } AcpiPmInfo; typedef struct AcpiMiscInfo { + bool is_piix4; bool has_hpet; TPMVersion tpm_version; const unsigned char *dsdt_code; @@ -130,10 +131,12 @@ static void acpi_get_dsdt(AcpiMiscInfo *info) assert(!!piix != !!lpc); if (piix) { + info->is_piix4 = true; info->dsdt_code = AcpiDsdtAmlCode; info->dsdt_size = sizeof AcpiDsdtAmlCode; } if (lpc) { + info->is_piix4 = false; info->dsdt_code = Q35AcpiDsdtAmlCode; info->dsdt_size = sizeof Q35AcpiDsdtAmlCode; } @@ -1424,6 +1427,68 @@ static void build_dbg_aml(Aml *table) aml_append(table, scope); } +static void build_piix4_pci0_int(Aml *table) +{ + Aml *field; + Aml *sb_scope = aml_scope("_SB"); + + field = aml_field("PCI0.ISA.P40C", AML_BYTE_ACC, AML_NOLOCK, AML_PRESERVE); + aml_append(field, aml_named_field("PRQ0", 8)); + aml_append(field, aml_named_field("PRQ1", 8)); + aml_append(field, aml_named_field("PRQ2", 8)); + aml_append(field, aml_named_field("PRQ3", 8)); + aml_append(sb_scope, field); + + aml_append(table, sb_scope); +} + +static void build_piix4_pm(Aml *table) +{ + Aml *dev; + Aml *scope; + + scope = aml_scope("_SB.PCI0"); + dev = aml_device("PX13"); + aml_append(dev, aml_name_decl("_ADR", aml_int(0x00010003))); + + aml_append(dev, aml_operation_region("P13C", AML_PCI_CONFIG, + 0x00, 0xff)); + aml_append(scope, dev); + aml_append(table, scope); +} + +static void build_piix4_isa_bridge(Aml *table) +{ + Aml *dev; + Aml *scope; + Aml *field; + + scope = aml_scope("_SB.PCI0"); + dev = aml_device("ISA"); + aml_append(dev, aml_name_decl("_ADR", aml_int(0x00010000))); + + /* PIIX PCI to ISA irq remapping */ + aml_append(dev, aml_operation_region("P40C", AML_PCI_CONFIG, + 0x60, 0x04)); + /* enable bits */ + field = aml_field("^PX13.P13C", AML_ANY_ACC, AML_NOLOCK, AML_PRESERVE); + /* Offset(0x5f),, 7, */ + aml_append(field, aml_reserved_field(0x2f8)); + aml_append(field, aml_reserved_field(7)); + aml_append(field, aml_named_field("LPEN", 1)); + /* Offset(0x67),, 3, */ + aml_append(field, aml_reserved_field(0x38)); + aml_append(field, aml_reserved_field(3)); + aml_append(field, aml_named_field("CAEN", 1)); + aml_append(field, aml_reserved_field(3)); + aml_append(field, aml_named_field("CBEN", 1)); + aml_append(dev, field); + aml_append(dev, aml_name_decl("FDEN", aml_int(1))); + + aml_append(scope, dev); + aml_append(table, scope); +} + static void build_ssdt(GArray *table_data, GArray *linker, AcpiCpuInfo *cpu, AcpiPmInfo *pm, AcpiMiscInfo *misc, @@ -1445,8 +1510,16 @@ build_ssdt(GArray *table_data, GArray *linker, acpi_data_push(ssdt->buf, sizeof(AcpiTableHeader)); build_dbg_aml(ssdt); - build_hpet_aml(ssdt); - build_isa_devices_aml(ssdt); + if (misc->is_piix4) { + build_hpet_aml(ssdt); + build_piix4_pm(ssdt); + build_piix4_isa_bridge(ssdt); + build_isa_devices_aml(ssdt); + build_piix4_pci0_int(ssdt); + } else { + build_hpet_aml(ssdt); + build_isa_devices_aml(ssdt); + } build_cpu_hotplug_aml(ssdt); build_memory_hotplug_aml(ssdt, nr_mem, pm->mem_hp_io_base, pm->mem_hp_io_len); diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl index 6048cc7..11e2e61 100644 --- a/hw/i386/acpi-dsdt.dsl +++ b/hw/i386/acpi-dsdt.dsl @@ -40,47 +40,6 @@ DefinitionBlock ( } /**************************************************************** - * PIIX4 PM - ****************************************************************/ - - Scope(\_SB.PCI0) { - Device(PX13) { - Name(_ADR, 0x00010003) - OperationRegion(P13C, PCI_Config, 0x00, 0xff) - } - } - - -/**************************************************************** - * PIIX3 ISA bridge - ****************************************************************/ - - Scope(\_SB.PCI0) { - - External(ISA, DeviceObj) - - Device(ISA) { - Name(_ADR, 0x00010000) - - /* PIIX PCI to ISA irq remapping */ - OperationRegion(P40C, PCI_Config, 0x60, 0x04) - - /* enable bits */ - Field(\_SB.PCI0.PX13.P13C, AnyAcc, NoLock, Preserve) { - Offset(0x5f), - , 7, - LPEN, 1, // LPT - Offset(0x67), - , 3, - CAEN, 1, // COM1 - , 3, - CBEN, 1, // COM2 - } - Name(FDEN, 1) - } - } - -/**************************************************************** * PCI hotplug ****************************************************************/ @@ -168,12 +127,11 @@ DefinitionBlock ( } } - Field(PCI0.ISA.P40C, ByteAcc, NoLock, Preserve) { - PRQ0, 8, - PRQ1, 8, - PRQ2, 8, - PRQ3, 8 - } + + External(PRQ0, FieldUnitObj) + External(PRQ1, FieldUnitObj) + External(PRQ2, FieldUnitObj) + External(PRQ3, FieldUnitObj) Method(IQST, 1, NotSerialized) { // _STA method - get status diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index 83c0102..6d6f705 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -82,6 +82,7 @@ typedef enum { typedef enum { AML_SYSTEM_MEMORY = 0X00, AML_SYSTEM_IO = 0X01, + AML_PCI_CONFIG = 0X02, } AmlRegionSpace; typedef enum { -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 31/51] pc: acpi: move remaining GPE handlers into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (29 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 30/51] pc: acpi: move PIIX4 isa-bridge and pm devices into SSDT Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 32/51] pc: acpi: pci: move link devices " Igor Mammedov ` (19 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- * unflod _L0X methods building loop and opencode it, with intent to remove these (unused) handlers later at refactoring time. --- hw/i386/acpi-build.c | 30 +++++++++++++++++++++++++++++- hw/i386/acpi-dsdt.dsl | 40 ---------------------------------------- hw/i386/q35-acpi-dsdt.dsl | 36 ------------------------------------ 3 files changed, 29 insertions(+), 77 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 88deea5..a28963f 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1524,8 +1524,23 @@ 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"))); + + aml_append(scope, aml_method("_L00", 0, AML_NOTSERIALIZED)); + + 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 { + aml_append(scope, aml_method("_L01", 0, AML_NOTSERIALIZED)); + } + method = aml_method("_E02", 0, AML_NOTSERIALIZED); aml_append(method, aml_call0("\\_SB." CPU_SCAN_METHOD)); aml_append(scope, method); @@ -1533,6 +1548,19 @@ 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); + + aml_append(scope, aml_method("_L04", 0, AML_NOTSERIALIZED)); + aml_append(scope, aml_method("_L05", 0, AML_NOTSERIALIZED)); + aml_append(scope, aml_method("_L06", 0, AML_NOTSERIALIZED)); + aml_append(scope, aml_method("_L07", 0, AML_NOTSERIALIZED)); + aml_append(scope, aml_method("_L08", 0, AML_NOTSERIALIZED)); + aml_append(scope, aml_method("_L09", 0, AML_NOTSERIALIZED)); + aml_append(scope, aml_method("_L0A", 0, AML_NOTSERIALIZED)); + aml_append(scope, aml_method("_L0B", 0, AML_NOTSERIALIZED)); + aml_append(scope, aml_method("_L0C", 0, AML_NOTSERIALIZED)); + aml_append(scope, aml_method("_L0D", 0, AML_NOTSERIALIZED)); + aml_append(scope, aml_method("_L0E", 0, AML_NOTSERIALIZED)); + aml_append(scope, aml_method("_L0F", 0, AML_NOTSERIALIZED)); } 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 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 32/51] pc: acpi: pci: move link devices into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (30 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 31/51] pc: acpi: move remaining GPE handlers " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 33/51] pc: acpi: piix4: move IQCR() " Igor Mammedov ` (18 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++ hw/i386/acpi-dsdt.dsl | 49 ++++---------------------------- 2 files changed, 82 insertions(+), 44 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index a28963f..891a29c 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1427,9 +1427,49 @@ static void build_dbg_aml(Aml *table) aml_append(table, scope); } +static Aml *build_link_dev(const char *name, uint8_t uid, Aml *reg) +{ + Aml *dev; + Aml *crs; + Aml *method; + uint32_t irqs[] = {5, 10, 11}; + + dev = aml_device("%s", name); + aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0C0F"))); + aml_append(dev, aml_name_decl("_UID", aml_int(uid))); + + crs = aml_resource_template(); + aml_append(crs, aml_interrupt(AML_CONSUMER, AML_LEVEL, AML_ACTIVE_HIGH, + AML_SHARED, irqs, ARRAY_SIZE(irqs))); + aml_append(dev, aml_name_decl("_PRS", crs)); + + method = aml_method("_STA", 0, AML_NOTSERIALIZED); + aml_append(method, aml_return(aml_call1("IQST", reg))); + aml_append(dev, method); + + method = aml_method("_DIS", 0, AML_NOTSERIALIZED); + aml_append(method, aml_or(reg, aml_int(0x80), reg)); + aml_append(dev, method); + + method = aml_method("_CRS", 0, AML_NOTSERIALIZED); + aml_append(method, aml_return(aml_call1("IQCR", reg))); + aml_append(dev, method); + + method = aml_method("_SRS", 1, AML_NOTSERIALIZED); + aml_append(method, aml_create_dword_field(aml_arg(0), aml_int(5), "PRRI")); + aml_append(method, aml_store(aml_name("PRRI"), reg)); + aml_append(dev, method); + + return dev; + } + static void build_piix4_pci0_int(Aml *table) { + Aml *dev; + Aml *crs; Aml *field; + Aml *method; + uint32_t irqs; Aml *sb_scope = aml_scope("_SB"); field = aml_field("PCI0.ISA.P40C", AML_BYTE_ACC, AML_NOLOCK, AML_PRESERVE); @@ -1439,6 +1479,43 @@ static void build_piix4_pci0_int(Aml *table) aml_append(field, aml_named_field("PRQ3", 8)); aml_append(sb_scope, field); + aml_append(sb_scope, build_link_dev("LNKA", 0, aml_name("PRQ0"))); + aml_append(sb_scope, build_link_dev("LNKB", 1, aml_name("PRQ1"))); + aml_append(sb_scope, build_link_dev("LNKC", 2, aml_name("PRQ2"))); + aml_append(sb_scope, build_link_dev("LNKD", 3, aml_name("PRQ3"))); + + dev = aml_device("LNKS"); + { + aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0C0F"))); + aml_append(dev, aml_name_decl("_UID", aml_int(4))); + + crs = aml_resource_template(); + irqs = 9; + aml_append(crs, aml_interrupt(AML_CONSUMER, AML_LEVEL, + AML_ACTIVE_HIGH, AML_SHARED, + &irqs, 1)); + aml_append(dev, aml_name_decl("_PRS", crs)); + + /* The SCI cannot be disabled and is always attached to GSI 9, + * so these are no-ops. We only need this link to override the + * polarity to active high and match the content of the MADT. + */ + method = aml_method("_STA", 0, AML_NOTSERIALIZED); + aml_append(method, aml_return(aml_int(0x0b))); + aml_append(dev, method); + + method = aml_method("_DIS", 0, AML_NOTSERIALIZED); + aml_append(dev, method); + + method = aml_method("_CRS", 0, AML_NOTSERIALIZED); + aml_append(method, aml_return(aml_name("_PRS"))); + aml_append(dev, method); + + method = aml_method("_SRS", 1, AML_NOTSERIALIZED); + aml_append(dev, method); + } + aml_append(sb_scope, dev); + aml_append(table, sb_scope); } diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl index c9b2725..b74cffd 100644 --- a/hw/i386/acpi-dsdt.dsl +++ b/hw/i386/acpi-dsdt.dsl @@ -152,49 +152,10 @@ 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, PRQ0) - define_link(LNKB, 1, PRQ1) - define_link(LNKC, 2, PRQ2) - define_link(LNKD, 3, PRQ3) - - Device(LNKS) { - Name(_HID, EISAID("PNP0C0F")) - Name(_UID, 4) - Name(_PRS, ResourceTemplate() { - Interrupt(, Level, ActiveHigh, Shared) { 9 } - }) - - // The SCI cannot be disabled and is always attached to GSI 9, - // so these are no-ops. We only need this link to override the - // polarity to active high and match the content of the MADT. - Method(_STA, 0, NotSerialized) { Return (0x0b) } - Method(_DIS, 0, NotSerialized) { } - Method(_CRS, 0, NotSerialized) { Return (_PRS) } - Method(_SRS, 1, NotSerialized) { } - } + External(LNKA, DeviceObj) + External(LNKB, DeviceObj) + External(LNKC, DeviceObj) + External(LNKD, DeviceObj) + External(LNKS, DeviceObj) } } -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 33/51] pc: acpi: piix4: move IQCR() into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (31 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 32/51] pc: acpi: pci: move link devices " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 34/51] pc: acpi: piix4: move IQST() " Igor Mammedov ` (17 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 20 ++++++++++++++++++++ hw/i386/acpi-dsdt.dsl | 11 ----------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 891a29c..45bc6b1 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1468,6 +1468,7 @@ static void build_piix4_pci0_int(Aml *table) Aml *dev; Aml *crs; Aml *field; + Aml *if_ctx; Aml *method; uint32_t irqs; Aml *sb_scope = aml_scope("_SB"); @@ -1479,6 +1480,25 @@ static void build_piix4_pci0_int(Aml *table) aml_append(field, aml_named_field("PRQ3", 8)); aml_append(sb_scope, field); + /* _CRS method - get current settings */ + method = aml_method("IQCR", 1, AML_SERIALIZED); + { + crs = aml_resource_template(); + irqs = 0; + aml_append(crs, aml_interrupt(AML_CONSUMER, AML_LEVEL, + AML_ACTIVE_HIGH, AML_SHARED, &irqs, 1)); + aml_append(method, aml_name_decl("PRR0", crs)); + + aml_append(method, + aml_create_dword_field(aml_name("PRR0"), aml_int(5), "PRRI")); + + if_ctx = aml_if(aml_lless(aml_arg(0), aml_int(0x80))); + aml_append(if_ctx, aml_store(aml_arg(0), aml_name("PRRI"))); + aml_append(method, if_ctx); + aml_append(method, aml_return(aml_name("PRR0"))); + } + aml_append(sb_scope, method); + aml_append(sb_scope, build_link_dev("LNKA", 0, aml_name("PRQ0"))); aml_append(sb_scope, build_link_dev("LNKB", 1, aml_name("PRQ1"))); aml_append(sb_scope, build_link_dev("LNKC", 2, aml_name("PRQ2"))); diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl index b74cffd..1f58ec4 100644 --- a/hw/i386/acpi-dsdt.dsl +++ b/hw/i386/acpi-dsdt.dsl @@ -140,17 +140,6 @@ DefinitionBlock ( } Return (0x0B) } - Method(IQCR, 1, Serialized) { - // _CRS method - get current settings - Name(PRR0, ResourceTemplate() { - Interrupt(, Level, ActiveHigh, Shared) { 0 } - }) - CreateDWordField(PRR0, 0x05, PRRI) - If (LLess(Arg0, 0x80)) { - Store(Arg0, PRRI) - } - Return (PRR0) - } External(LNKA, DeviceObj) External(LNKB, DeviceObj) -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 34/51] pc: acpi: piix4: move IQST() into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (32 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 33/51] pc: acpi: piix4: move IQCR() " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 35/51] pc: acpi: piix4: move PCI0._PRT() " Igor Mammedov ` (16 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 10 ++++++++++ hw/i386/acpi-dsdt.dsl | 9 --------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 45bc6b1..8b23363 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1480,6 +1480,16 @@ static void build_piix4_pci0_int(Aml *table) aml_append(field, aml_named_field("PRQ3", 8)); aml_append(sb_scope, field); + /* _STA method - get status */ + method = aml_method("IQST", 1, AML_NOTSERIALIZED); + { + if_ctx = aml_if(aml_and(aml_int(0x80), aml_arg(0), NULL)); + aml_append(if_ctx, aml_return(aml_int(0x09))); + aml_append(method, if_ctx); + aml_append(method, aml_return(aml_int(0x0B))); + } + aml_append(sb_scope, method); + /* _CRS method - get current settings */ method = aml_method("IQCR", 1, AML_SERIALIZED); { diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl index 1f58ec4..bc6bd45 100644 --- a/hw/i386/acpi-dsdt.dsl +++ b/hw/i386/acpi-dsdt.dsl @@ -132,15 +132,6 @@ DefinitionBlock ( External(PRQ1, FieldUnitObj) External(PRQ2, FieldUnitObj) External(PRQ3, FieldUnitObj) - - Method(IQST, 1, NotSerialized) { - // _STA method - get status - If (And(0x80, Arg0)) { - Return (0x09) - } - Return (0x0B) - } - External(LNKA, DeviceObj) External(LNKB, DeviceObj) External(LNKC, DeviceObj) -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 35/51] pc: acpi: piix4: move PCI0._PRT() into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (33 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 34/51] pc: acpi: piix4: move IQST() " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 36/51] pc: acpi: piix4: move remaining PCI hotplug bits " Igor Mammedov ` (15 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel PCI routing table for expander buses is build with help of build_prt() using AML API. And it's almost the same as PRT for PCI0 bus except of power-management device. So make existing build_prt() build PRT table for PCI0 bus as well. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com> --- v3: - document build_prt_entry() - use {} scope for if/else AML constructs to make code more readble and clear what code belongs to what if ctx - rename if_ctx to if_device_1 - rename if_ctx2/else_ctx2 to [if|else]_pin_4 v2: - adapt build_prt() for using for PCI0._PRT(), reduces code duplication, Suggested-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> --- hw/i386/acpi-build.c | 55 +++++++++++++++++++++++++++++++++++++++------- hw/i386/acpi-dsdt.dsl | 60 --------------------------------------------------- 2 files changed, 47 insertions(+), 68 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 8b23363..fd81b40 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -621,6 +621,23 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus, qobject_decref(bsel); } +/** + * build_prt_entry: + * @link_name: link name for PCI route entry + * + * build AML package containing a PCI route entry for @link_name + */ +static Aml *build_prt_entry(const char *link_name) +{ + Aml *a_zero = aml_int(0); + Aml *pkg = aml_package(4); + aml_append(pkg, a_zero); + aml_append(pkg, a_zero); + aml_append(pkg, aml_name("%s", link_name)); + aml_append(pkg, a_zero); + return pkg; +} + /* * initialize_route - Initialize the interrupt routing rule * through a specific LINK: @@ -631,12 +648,8 @@ static Aml *initialize_route(Aml *route, const char *link_name, Aml *lnk_idx, int idx) { Aml *if_ctx = aml_if(aml_equal(lnk_idx, aml_int(idx))); - Aml *pkg = aml_package(4); + Aml *pkg = build_prt_entry(link_name); - aml_append(pkg, aml_int(0)); - aml_append(pkg, aml_int(0)); - aml_append(pkg, aml_name("%s", link_name)); - aml_append(pkg, aml_int(0)); aml_append(if_ctx, aml_store(pkg, route)); return if_ctx; @@ -652,7 +665,7 @@ static Aml *initialize_route(Aml *route, const char *link_name, * The hash function is (slot + pin) & 3 -> "LNK[D|A|B|C]". * */ -static Aml *build_prt(void) +static Aml *build_prt(bool is_pci0_prt) { Aml *method, *while_ctx, *pin, *res; @@ -679,7 +692,29 @@ static Aml *build_prt(void) /* route[2] = "LNK[D|A|B|C]", selection based on pin % 3 */ aml_append(while_ctx, initialize_route(route, "LNKD", lnk_idx, 0)); - aml_append(while_ctx, initialize_route(route, "LNKA", lnk_idx, 1)); + if (is_pci0_prt) { + Aml *if_device_1, *if_pin_4, *else_pin_4; + + /* device 1 is the power-management device, needs SCI */ + if_device_1 = aml_if(aml_equal(lnk_idx, aml_int(1))); + { + if_pin_4 = aml_if(aml_equal(pin, aml_int(4))); + { + aml_append(if_pin_4, + aml_store(build_prt_entry("LNKS"), route)); + } + aml_append(if_device_1, if_pin_4); + else_pin_4 = aml_else(); + { + aml_append(else_pin_4, + aml_store(build_prt_entry("LNKA"), route)); + } + aml_append(if_device_1, else_pin_4); + } + aml_append(while_ctx, if_device_1); + } else { + aml_append(while_ctx, initialize_route(route, "LNKA", lnk_idx, 1)); + } aml_append(while_ctx, initialize_route(route, "LNKB", lnk_idx, 2)); aml_append(while_ctx, initialize_route(route, "LNKC", lnk_idx, 3)); @@ -1472,6 +1507,10 @@ static void build_piix4_pci0_int(Aml *table) Aml *method; uint32_t irqs; Aml *sb_scope = aml_scope("_SB"); + Aml *pci0_scope = aml_scope("PCI0"); + + aml_append(pci0_scope, build_prt(true)); + aml_append(sb_scope, pci0_scope); field = aml_field("PCI0.ISA.P40C", AML_BYTE_ACC, AML_NOLOCK, AML_PRESERVE); aml_append(field, aml_named_field("PRQ0", 8)); @@ -1696,7 +1735,7 @@ build_ssdt(GArray *table_data, GArray *linker, aml_append(dev, aml_name_decl("_PXM", aml_int(numa_node))); } - aml_append(dev, build_prt()); + aml_append(dev, build_prt(false)); crs = build_crs(PCI_HOST_BRIDGE(BUS(bus)->parent), io_ranges, mem_ranges); aml_append(dev, aml_name_decl("_CRS", crs)); diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl index bc6bd45..5d741dd 100644 --- a/hw/i386/acpi-dsdt.dsl +++ b/hw/i386/acpi-dsdt.dsl @@ -78,64 +78,4 @@ DefinitionBlock ( /* Hotplug notification method supplied by SSDT */ External(\_SB.PCI0.PCNT, MethodObj) } - - -/**************************************************************** - * PCI IRQs - ****************************************************************/ - - Scope(\_SB) { - Scope(PCI0) { - Method (_PRT, 0) { - Store(Package(128) {}, Local0) - Store(Zero, Local1) - While(LLess(Local1, 128)) { - // slot = pin >> 2 - Store(ShiftRight(Local1, 2), Local2) - - // lnk = (slot + pin) & 3 - Store(And(Add(Local1, Local2), 3), Local3) - If (LEqual(Local3, 0)) { - Store(Package(4) { Zero, Zero, LNKD, Zero }, Local4) - } - If (LEqual(Local3, 1)) { - // device 1 is the power-management device, needs SCI - If (LEqual(Local1, 4)) { - Store(Package(4) { Zero, Zero, LNKS, Zero }, Local4) - } Else { - Store(Package(4) { Zero, Zero, LNKA, Zero }, Local4) - } - } - If (LEqual(Local3, 2)) { - Store(Package(4) { Zero, Zero, LNKB, Zero }, Local4) - } - If (LEqual(Local3, 3)) { - Store(Package(4) { Zero, Zero, LNKC, Zero }, Local4) - } - - // Complete the interrupt routing entry: - // Package(4) { 0x[slot]FFFF, [pin], [link], 0) } - - Store(Or(ShiftLeft(Local2, 16), 0xFFFF), Index(Local4, 0)) - Store(And(Local1, 3), Index(Local4, 1)) - Store(Local4, Index(Local0, Local1)) - - Increment(Local1) - } - - Return(Local0) - } - } - - - External(PRQ0, FieldUnitObj) - External(PRQ1, FieldUnitObj) - External(PRQ2, FieldUnitObj) - External(PRQ3, FieldUnitObj) - External(LNKA, DeviceObj) - External(LNKB, DeviceObj) - External(LNKC, DeviceObj) - External(LNKD, DeviceObj) - External(LNKS, DeviceObj) - } } -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 36/51] pc: acpi: piix4: move remaining PCI hotplug bits into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (34 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 35/51] pc: acpi: piix4: move PCI0._PRT() " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 37/51] pc: acpi: piix4: acpi move PCI0 device to SSDT Igor Mammedov ` (14 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 43 +++++++++++++++++++++++++++++++++++++++++++ hw/i386/acpi-dsdt.dsl | 40 ---------------------------------------- 2 files changed, 43 insertions(+), 40 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index fd81b40..ec6ceda 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1635,6 +1635,48 @@ static void build_piix4_isa_bridge(Aml *table) aml_append(table, scope); } +static void build_piix4_pci_hotplug(Aml *table) +{ + Aml *scope; + Aml *field; + Aml *method; + + scope = aml_scope("_SB.PCI0"); + + aml_append(scope, + aml_operation_region("PCST", AML_SYSTEM_IO, 0xae00, 0x08)); + field = aml_field("PCST", AML_DWORD_ACC, AML_NOLOCK, AML_WRITE_AS_ZEROS); + aml_append(field, aml_named_field("PCIU", 32)); + aml_append(field, aml_named_field("PCID", 32)); + aml_append(scope, field); + + aml_append(scope, + aml_operation_region("SEJ", AML_SYSTEM_IO, 0xae08, 0x04)); + field = aml_field("SEJ", AML_DWORD_ACC, AML_NOLOCK, AML_WRITE_AS_ZEROS); + aml_append(field, aml_named_field("B0EJ", 32)); + aml_append(scope, field); + + aml_append(scope, + aml_operation_region("BNMR", AML_SYSTEM_IO, 0xae10, 0x04)); + field = aml_field("BNMR", AML_DWORD_ACC, AML_NOLOCK, AML_WRITE_AS_ZEROS); + aml_append(field, aml_named_field("BNUM", 32)); + aml_append(scope, field); + + aml_append(scope, aml_mutex("BLCK", 0)); + + method = aml_method("PCEJ", 2, AML_NOTSERIALIZED); + aml_append(method, aml_acquire(aml_name("BLCK"), 0xFFFF)); + aml_append(method, aml_store(aml_arg(0), aml_name("BNUM"))); + aml_append(method, + aml_store(aml_shiftleft(aml_int(1), aml_arg(1)), aml_name("B0EJ"))); + aml_append(method, aml_release(aml_name("BLCK"))); + aml_append(method, aml_return(aml_int(0))); + aml_append(scope, method); + + aml_append(table, scope); +} + + static void build_ssdt(GArray *table_data, GArray *linker, AcpiCpuInfo *cpu, AcpiPmInfo *pm, AcpiMiscInfo *misc, @@ -1661,6 +1703,7 @@ build_ssdt(GArray *table_data, GArray *linker, build_piix4_pm(ssdt); build_piix4_isa_bridge(ssdt); build_isa_devices_aml(ssdt); + build_piix4_pci_hotplug(ssdt); build_piix4_pci0_int(ssdt); } else { build_hpet_aml(ssdt); diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl index 5d741dd..a7769fc 100644 --- a/hw/i386/acpi-dsdt.dsl +++ b/hw/i386/acpi-dsdt.dsl @@ -38,44 +38,4 @@ DefinitionBlock ( // External(PX13, DeviceObj) } } - -/**************************************************************** - * PCI hotplug - ****************************************************************/ - - Scope(\_SB.PCI0) { - OperationRegion(PCST, SystemIO, 0xae00, 0x08) - Field(PCST, DWordAcc, NoLock, WriteAsZeros) { - PCIU, 32, - PCID, 32, - } - - OperationRegion(SEJ, SystemIO, 0xae08, 0x04) - Field(SEJ, DWordAcc, NoLock, WriteAsZeros) { - B0EJ, 32, - } - - OperationRegion(BNMR, SystemIO, 0xae10, 0x04) - Field(BNMR, DWordAcc, NoLock, WriteAsZeros) { - BNUM, 32, - } - - /* Lock to protect access to fields above. */ - Mutex(BLCK, 0) - - /* Methods called by bulk generated PCI devices below */ - - /* Methods called by hotplug devices */ - Method(PCEJ, 2, NotSerialized) { - // _EJ0 method - eject callback - Acquire(BLCK, 0xFFFF) - Store(Arg0, BNUM) - Store(ShiftLeft(1, Arg1), B0EJ) - Release(BLCK) - Return (0x0) - } - - /* Hotplug notification method supplied by SSDT */ - External(\_SB.PCI0.PCNT, MethodObj) - } } -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 37/51] pc: acpi: piix4: acpi move PCI0 device to SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (35 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 36/51] pc: acpi: piix4: move remaining PCI hotplug bits " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 38/51] pc: acpi: q35: move GSI links " Igor Mammedov ` (13 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel leave Scope(\_SB) definition in DSDT so that iasl would be able to compile DSDT since we are still need definition block for table. After Q35 ASL is converted, DSDT templates will be completly replaced by AML API generated tables. Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 8 ++++++++ hw/i386/acpi-dsdt.dsl | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index ec6ceda..df5e835 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1699,6 +1699,14 @@ build_ssdt(GArray *table_data, GArray *linker, build_dbg_aml(ssdt); if (misc->is_piix4) { + sb_scope = aml_scope("_SB"); + dev = aml_device("PCI0"); + aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A03"))); + aml_append(dev, aml_name_decl("_ADR", aml_int(0))); + aml_append(dev, aml_name_decl("_UID", aml_int(1))); + aml_append(sb_scope, dev); + aml_append(ssdt, sb_scope); + build_hpet_aml(ssdt); build_piix4_pm(ssdt); build_piix4_isa_bridge(ssdt); diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl index a7769fc..82e4470 100644 --- a/hw/i386/acpi-dsdt.dsl +++ b/hw/i386/acpi-dsdt.dsl @@ -28,14 +28,6 @@ DefinitionBlock ( 0x1 // OEM Revision ) { - Scope(\_SB) { - Device(PCI0) { - Name(_HID, EisaId("PNP0A03")) - Name(_ADR, 0x00) - Name(_UID, 1) -//#define PX13 S0B_ -// External(PX13, DeviceObj) - } } } -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 38/51] pc: acpi: q35: move GSI links to SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (36 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 37/51] pc: acpi: piix4: acpi move PCI0 device to SSDT Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 39/51] pc: acpi: q35: move link devices " Igor Mammedov ` (12 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ hw/i386/q35-acpi-dsdt.dsl | 34 ++++++++-------------------------- 2 files changed, 55 insertions(+), 26 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index df5e835..4edd989 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1498,6 +1498,31 @@ static Aml *build_link_dev(const char *name, uint8_t uid, Aml *reg) return dev; } +static Aml *build_gsi_link_dev(const char *name, uint8_t uid, uint8_t gsi) +{ + Aml *dev; + Aml *crs; + Aml *method; + uint32_t irqs; + + dev = aml_device("%s", name); + aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0C0F"))); + aml_append(dev, aml_name_decl("_UID", aml_int(uid))); + + crs = aml_resource_template(); + irqs = gsi; + aml_append(crs, aml_interrupt(AML_CONSUMER, AML_LEVEL, AML_ACTIVE_HIGH, + AML_SHARED, &irqs, 1)); + aml_append(dev, aml_name_decl("_PRS", crs)); + + aml_append(dev, aml_name_decl("_CRS", crs)); + + method = aml_method("_SRS", 1, AML_NOTSERIALIZED); + aml_append(dev, method); + + return dev; +} + static void build_piix4_pci0_int(Aml *table) { Aml *dev; @@ -1588,6 +1613,26 @@ static void build_piix4_pci0_int(Aml *table) aml_append(table, sb_scope); } +static void build_q35_pci0_int(Aml *table) +{ + Aml *sb_scope = aml_scope("_SB"); + + /* + * 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 + */ + aml_append(sb_scope, build_gsi_link_dev("GSIA", 0, 0x10)); + aml_append(sb_scope, build_gsi_link_dev("GSIB", 0, 0x11)); + aml_append(sb_scope, build_gsi_link_dev("GSIC", 0, 0x12)); + aml_append(sb_scope, build_gsi_link_dev("GSID", 0, 0x13)); + aml_append(sb_scope, build_gsi_link_dev("GSIE", 0, 0x14)); + aml_append(sb_scope, build_gsi_link_dev("GSIF", 0, 0x15)); + aml_append(sb_scope, build_gsi_link_dev("GSIG", 0, 0x16)); + aml_append(sb_scope, build_gsi_link_dev("GSIH", 0, 0x17)); + + aml_append(table, sb_scope); +} + static void build_piix4_pm(Aml *table) { Aml *dev; @@ -1716,7 +1761,9 @@ build_ssdt(GArray *table_data, GArray *linker, } else { build_hpet_aml(ssdt); build_isa_devices_aml(ssdt); + build_q35_pci0_int(ssdt); } + build_cpu_hotplug_aml(ssdt); build_memory_hotplug_aml(ssdt, nr_mem, pm->mem_hp_io_base, pm->mem_hp_io_len); diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl index e157615..f2c154a 100644 --- a/hw/i386/q35-acpi-dsdt.dsl +++ b/hw/i386/q35-acpi-dsdt.dsl @@ -348,31 +348,13 @@ DefinitionBlock ( define_link(LNKG, 6, PRQG) define_link(LNKH, 7, PRQH) -#define define_gsi_link(link, uid, gsi) \ - Device(link) { \ - Name(_HID, EISAID("PNP0C0F")) \ - Name(_UID, uid) \ - Name(_PRS, ResourceTemplate() { \ - Interrupt(, Level, ActiveHigh, Shared) { \ - gsi \ - } \ - }) \ - Name(_CRS, ResourceTemplate() { \ - Interrupt(, Level, ActiveHigh, Shared) { \ - gsi \ - } \ - }) \ - Method(_SRS, 1, NotSerialized) { \ - } \ - } - - define_gsi_link(GSIA, 0, 0x10) - define_gsi_link(GSIB, 0, 0x11) - define_gsi_link(GSIC, 0, 0x12) - define_gsi_link(GSID, 0, 0x13) - define_gsi_link(GSIE, 0, 0x14) - define_gsi_link(GSIF, 0, 0x15) - define_gsi_link(GSIG, 0, 0x16) - define_gsi_link(GSIH, 0, 0x17) + External(GSIA, DeviceObj) + External(GSIB, DeviceObj) + External(GSIC, DeviceObj) + External(GSID, DeviceObj) + External(GSIE, DeviceObj) + External(GSIF, DeviceObj) + External(GSIG, DeviceObj) + External(GSIH, DeviceObj) } } -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 39/51] pc: acpi: q35: move link devices to SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (37 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 38/51] pc: acpi: q35: move GSI links " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 40/51] pc: acpi: q35: move IQCR() into SSDT Igor Mammedov ` (11 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 9 +++++++++ hw/i386/q35-acpi-dsdt.dsl | 40 ++++++++-------------------------------- 2 files changed, 17 insertions(+), 32 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 4edd989..9736da3 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1617,6 +1617,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 diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl index f2c154a..2da3515 100644 --- a/hw/i386/q35-acpi-dsdt.dsl +++ b/hw/i386/q35-acpi-dsdt.dsl @@ -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) -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 40/51] pc: acpi: q35: move IQCR() into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (38 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 39/51] pc: acpi: q35: move link devices " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 41/51] pc: acpi: q35: move IQST() " Igor Mammedov ` (10 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 51 ++++++++++++++++++++++++++++++----------------- hw/i386/q35-acpi-dsdt.dsl | 9 --------- 2 files changed, 33 insertions(+), 27 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 9736da3..94f18ea 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1523,6 +1523,36 @@ static Aml *build_gsi_link_dev(const char *name, uint8_t uid, uint8_t gsi) return dev; } +/* _CRS method - get current settings */ +static Aml *build_iqcr_method(bool is_piix4) +{ + Aml *if_ctx; + uint32_t irqs; + Aml *method = aml_method("IQCR", 1, AML_SERIALIZED); + Aml *crs = aml_resource_template(); + + irqs = 0; + aml_append(crs, aml_interrupt(AML_CONSUMER, AML_LEVEL, + AML_ACTIVE_HIGH, AML_SHARED, &irqs, 1)); + aml_append(method, aml_name_decl("PRR0", crs)); + + aml_append(method, + aml_create_dword_field(aml_name("PRR0"), aml_int(5), "PRRI")); + + if (is_piix4) { + if_ctx = aml_if(aml_lless(aml_arg(0), aml_int(0x80))); + aml_append(if_ctx, aml_store(aml_arg(0), aml_name("PRRI"))); + aml_append(method, if_ctx); + } else { + aml_append(method, + aml_store(aml_and(aml_arg(0), aml_int(0xF), NULL), + aml_name("PRRI"))); + } + + aml_append(method, aml_return(aml_name("PRR0"))); + return method; +} + static void build_piix4_pci0_int(Aml *table) { Aml *dev; @@ -1554,24 +1584,7 @@ static void build_piix4_pci0_int(Aml *table) } aml_append(sb_scope, method); - /* _CRS method - get current settings */ - method = aml_method("IQCR", 1, AML_SERIALIZED); - { - crs = aml_resource_template(); - irqs = 0; - aml_append(crs, aml_interrupt(AML_CONSUMER, AML_LEVEL, - AML_ACTIVE_HIGH, AML_SHARED, &irqs, 1)); - aml_append(method, aml_name_decl("PRR0", crs)); - - aml_append(method, - aml_create_dword_field(aml_name("PRR0"), aml_int(5), "PRRI")); - - if_ctx = aml_if(aml_lless(aml_arg(0), aml_int(0x80))); - aml_append(if_ctx, aml_store(aml_arg(0), aml_name("PRRI"))); - aml_append(method, if_ctx); - aml_append(method, aml_return(aml_name("PRR0"))); - } - aml_append(sb_scope, method); + aml_append(sb_scope, build_iqcr_method(true)); aml_append(sb_scope, build_link_dev("LNKA", 0, aml_name("PRQ0"))); aml_append(sb_scope, build_link_dev("LNKB", 1, aml_name("PRQ1"))); @@ -1617,6 +1630,8 @@ static void build_q35_pci0_int(Aml *table) { Aml *sb_scope = aml_scope("_SB"); + aml_append(sb_scope, build_iqcr_method(false)); + 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"))); diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl index 2da3515..85b0a2c 100644 --- a/hw/i386/q35-acpi-dsdt.dsl +++ b/hw/i386/q35-acpi-dsdt.dsl @@ -305,15 +305,6 @@ DefinitionBlock ( } Return (0x0B) } - Method(IQCR, 1, Serialized) { - // _CRS method - get current settings - Name(PRR0, ResourceTemplate() { - Interrupt(, Level, ActiveHigh, Shared) { 0 } - }) - CreateDWordField(PRR0, 0x05, PRRI) - Store(And(Arg0, 0x0F), PRRI) - Return (PRR0) - } External(LNKA, DeviceObj) External(LNKB, DeviceObj) -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 41/51] pc: acpi: q35: move IQST() into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (39 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 40/51] pc: acpi: q35: move IQCR() into SSDT Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 42/51] pc: acpi: q35: move ISA bridge " Igor Mammedov ` (9 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 26 +++++++++++++++----------- hw/i386/q35-acpi-dsdt.dsl | 8 -------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 94f18ea..4b36364 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1553,12 +1553,24 @@ static Aml *build_iqcr_method(bool is_piix4) return method; } +/* _STA method - get status */ +static Aml *build_irq_status_method(void) +{ + Aml *if_ctx; + Aml *method = aml_method("IQST", 1, AML_NOTSERIALIZED); + + if_ctx = aml_if(aml_and(aml_int(0x80), aml_arg(0), NULL)); + aml_append(if_ctx, aml_return(aml_int(0x09))); + aml_append(method, if_ctx); + aml_append(method, aml_return(aml_int(0x0B))); + return method; +} + static void build_piix4_pci0_int(Aml *table) { Aml *dev; Aml *crs; Aml *field; - Aml *if_ctx; Aml *method; uint32_t irqs; Aml *sb_scope = aml_scope("_SB"); @@ -1574,16 +1586,7 @@ static void build_piix4_pci0_int(Aml *table) aml_append(field, aml_named_field("PRQ3", 8)); aml_append(sb_scope, field); - /* _STA method - get status */ - method = aml_method("IQST", 1, AML_NOTSERIALIZED); - { - if_ctx = aml_if(aml_and(aml_int(0x80), aml_arg(0), NULL)); - aml_append(if_ctx, aml_return(aml_int(0x09))); - aml_append(method, if_ctx); - aml_append(method, aml_return(aml_int(0x0B))); - } - aml_append(sb_scope, method); - + aml_append(sb_scope, build_irq_status_method()); aml_append(sb_scope, build_iqcr_method(true)); aml_append(sb_scope, build_link_dev("LNKA", 0, aml_name("PRQ0"))); @@ -1630,6 +1633,7 @@ static void build_q35_pci0_int(Aml *table) { Aml *sb_scope = aml_scope("_SB"); + aml_append(sb_scope, build_irq_status_method()); aml_append(sb_scope, build_iqcr_method(false)); aml_append(sb_scope, build_link_dev("LNKA", 0, aml_name("PRQA"))); diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl index 85b0a2c..ec8a48c 100644 --- a/hw/i386/q35-acpi-dsdt.dsl +++ b/hw/i386/q35-acpi-dsdt.dsl @@ -298,14 +298,6 @@ DefinitionBlock ( PRQH, 8 } - Method(IQST, 1, NotSerialized) { - // _STA method - get status - If (And(0x80, Arg0)) { - Return (0x09) - } - Return (0x0B) - } - External(LNKA, DeviceObj) External(LNKB, DeviceObj) External(LNKC, DeviceObj) -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 42/51] pc: acpi: q35: move ISA bridge into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (40 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 41/51] pc: acpi: q35: move IQST() " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 43/51] pc: acpi: q35: move _PRT() " Igor Mammedov ` (8 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++ hw/i386/q35-acpi-dsdt.dsl | 46 ---------------------------------------- 2 files changed, 54 insertions(+), 46 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 4b36364..4fdab96 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1631,8 +1631,21 @@ static void build_piix4_pci0_int(Aml *table) static void build_q35_pci0_int(Aml *table) { + Aml *field; Aml *sb_scope = aml_scope("_SB"); + field = aml_field("PCI0.ISA.PIRQ", AML_BYTE_ACC, AML_NOLOCK, AML_PRESERVE); + aml_append(field, aml_named_field("PRQA", 8)); + aml_append(field, aml_named_field("PRQB", 8)); + aml_append(field, aml_named_field("PRQC", 8)); + aml_append(field, aml_named_field("PRQD", 8)); + aml_append(field, aml_reserved_field(0x20)); + aml_append(field, aml_named_field("PRQE", 8)); + aml_append(field, aml_named_field("PRQF", 8)); + aml_append(field, aml_named_field("PRQG", 8)); + aml_append(field, aml_named_field("PRQH", 8)); + aml_append(sb_scope, field); + aml_append(sb_scope, build_irq_status_method()); aml_append(sb_scope, build_iqcr_method(false)); @@ -1661,6 +1674,46 @@ static void build_q35_pci0_int(Aml *table) aml_append(table, sb_scope); } +static void build_q35_isa_bridge(Aml *table) +{ + Aml *dev; + Aml *scope; + Aml *field; + + scope = aml_scope("_SB.PCI0"); + dev = aml_device("ISA"); + aml_append(dev, aml_name_decl("_ADR", aml_int(0x001F0000))); + + /* ICH9 PCI to ISA irq remapping */ + aml_append(dev, aml_operation_region("PIRQ", AML_PCI_CONFIG, + 0x60, 0x0C)); + + aml_append(dev, aml_operation_region("LPCD", AML_PCI_CONFIG, + 0x80, 0x02)); + field = aml_field("LPCD", AML_ANY_ACC, AML_NOLOCK, AML_PRESERVE); + aml_append(field, aml_named_field("COMA", 3)); + aml_append(field, aml_reserved_field(1)); + aml_append(field, aml_named_field("COMB", 3)); + aml_append(field, aml_reserved_field(1)); + aml_append(field, aml_named_field("LPTD", 2)); + aml_append(field, aml_reserved_field(2)); + aml_append(field, aml_named_field("FDCD", 2)); + aml_append(dev, field); + + aml_append(dev, aml_operation_region("LPCE", AML_PCI_CONFIG, + 0x82, 0x02)); + /* enable bits */ + field = aml_field("LPCE", AML_ANY_ACC, AML_NOLOCK, AML_PRESERVE); + aml_append(field, aml_named_field("CAEN", 1)); + aml_append(field, aml_named_field("CBEN", 1)); + aml_append(field, aml_named_field("LPEN", 1)); + aml_append(field, aml_named_field("FDEN", 1)); + aml_append(dev, field); + + aml_append(scope, dev); + aml_append(table, scope); +} + static void build_piix4_pm(Aml *table) { Aml *dev; @@ -1788,6 +1841,7 @@ build_ssdt(GArray *table_data, GArray *linker, build_piix4_pci0_int(ssdt); } else { build_hpet_aml(ssdt); + build_q35_isa_bridge(ssdt); build_isa_devices_aml(ssdt); build_q35_pci0_int(ssdt); } diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl index ec8a48c..b01d4de 100644 --- a/hw/i386/q35-acpi-dsdt.dsl +++ b/hw/i386/q35-acpi-dsdt.dsl @@ -114,39 +114,6 @@ DefinitionBlock ( } /**************************************************************** - * LPC ISA bridge - ****************************************************************/ - - Scope(\_SB.PCI0) { - /* PCI D31:f0 LPC ISA bridge */ - Device(ISA) { - Name (_ADR, 0x001F0000) // _ADR: Address - - /* ICH9 PCI to ISA irq remapping */ - OperationRegion(PIRQ, PCI_Config, 0x60, 0x0C) - - OperationRegion(LPCD, PCI_Config, 0x80, 0x2) - Field(LPCD, AnyAcc, NoLock, Preserve) { - COMA, 3, - , 1, - COMB, 3, - - Offset(0x01), - LPTD, 2, - , 2, - FDCD, 2 - } - OperationRegion(LPCE, PCI_Config, 0x82, 0x2) - Field(LPCE, AnyAcc, NoLock, Preserve) { - CAEN, 1, - CBEN, 1, - LPEN, 1, - FDEN, 1 - } - } - } - -/**************************************************************** * PCI IRQs ****************************************************************/ @@ -285,19 +252,6 @@ DefinitionBlock ( } } - Field(PCI0.ISA.PIRQ, ByteAcc, NoLock, Preserve) { - PRQA, 8, - PRQB, 8, - PRQC, 8, - PRQD, 8, - - Offset(0x08), - PRQE, 8, - PRQF, 8, - PRQG, 8, - PRQH, 8 - } - External(LNKA, DeviceObj) External(LNKB, DeviceObj) External(LNKC, DeviceObj) -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 43/51] pc: acpi: q35: move _PRT() into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (41 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 42/51] pc: acpi: q35: move ISA bridge " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 44/51] pc: acpi: q35: move PRTA routing table " Igor Mammedov ` (7 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- 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 4fdab96..0174e80 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1632,7 +1632,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 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 44/51] pc: acpi: q35: move PRTA routing table into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (42 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 43/51] pc: acpi: q35: move _PRT() " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 45/51] pc: acpi: q35: move PRTP " Igor Mammedov ` (6 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++ hw/i386/q35-acpi-dsdt.dsl | 57 ------------------------------------------- 2 files changed, 61 insertions(+), 57 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 0174e80..1e12696 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1629,6 +1629,64 @@ static void build_piix4_pci0_int(Aml *table) aml_append(table, sb_scope); } +static void append_q35_prt_entry(Aml *ctx, uint32_t nr, const char *name) +{ + int i; + int head; + Aml *pkg; + char base = name[3] < 'E' ? 'A' : 'E'; + char *s = g_strdup(name); + Aml *a_nr = aml_int((nr << 16) | 0xffff); + + assert(strlen(s) == 4); + + head = name[3] - base; + for (i = 0; i < 4; i++) { + if (head + i > 3) { + head = i * -1; + } + s[3] = base + head + i; + pkg = aml_package(4); + aml_append(pkg, a_nr); + aml_append(pkg, aml_int(i)); + aml_append(pkg, aml_name("%s", s)); + aml_append(pkg, aml_int(0)); + aml_append(ctx, pkg); + } + g_free(s); +} + +static Aml *build_q35_routing_table(const char *str) +{ + int i; + Aml *pkg; + char *name = g_strdup_printf("%s ", str); + + pkg = aml_package(128); + for (i = 0; i < 0x18; i++) { + name[3] = 'E' + (i & 0x3); + append_q35_prt_entry(pkg, i, name); + } + + name[3] = 'E'; + append_q35_prt_entry(pkg, 0x18, name); + + /* INTA -> PIRQA for slot 25 - 31, see the default value of D<N>IR */ + for (i = 0x0019; i < 0x1e; i++) { + name[3] = 'A'; + append_q35_prt_entry(pkg, i, name); + } + + /* PCIe->PCI bridge. use PIRQ[E-H] */ + name[3] = 'E'; + append_q35_prt_entry(pkg, 0x1e, name); + name[3] = 'A'; + append_q35_prt_entry(pkg, 0x1f, name); + + g_free(name); + return pkg; +} + static void build_q35_pci0_int(Aml *table) { Aml *field; @@ -1636,6 +1694,9 @@ static void build_q35_pci0_int(Aml *table) Aml *sb_scope = aml_scope("_SB"); Aml *pci0_scope = aml_scope("PCI0"); + aml_append(pci0_scope, + aml_name_decl("PRTA", build_q35_routing_table("GSI"))); + method = aml_method("_PRT", 0, AML_NOTSERIALIZED); { Aml *if_ctx; diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl index f265583..a3073ad 100644 --- a/hw/i386/q35-acpi-dsdt.dsl +++ b/hw/i386/q35-acpi-dsdt.dsl @@ -181,63 +181,6 @@ DefinitionBlock ( prt_slot_lnkA(0x001f) }) - -#define prt_slot_gsi(nr, gsi0, gsi1, gsi2, gsi3) \ - Package() { nr##ffff, 0, gsi0, 0 }, \ - Package() { nr##ffff, 1, gsi1, 0 }, \ - Package() { nr##ffff, 2, gsi2, 0 }, \ - Package() { nr##ffff, 3, gsi3, 0 } - -#define prt_slot_gsiA(nr) prt_slot_gsi(nr, GSIA, GSIB, GSIC, GSID) -#define prt_slot_gsiB(nr) prt_slot_gsi(nr, GSIB, GSIC, GSID, GSIA) -#define prt_slot_gsiC(nr) prt_slot_gsi(nr, GSIC, GSID, GSIA, GSIB) -#define prt_slot_gsiD(nr) prt_slot_gsi(nr, GSID, GSIA, GSIB, GSIC) - -#define prt_slot_gsiE(nr) prt_slot_gsi(nr, GSIE, GSIF, GSIG, GSIH) -#define prt_slot_gsiF(nr) prt_slot_gsi(nr, GSIF, GSIG, GSIH, GSIE) -#define prt_slot_gsiG(nr) prt_slot_gsi(nr, GSIG, GSIH, GSIE, GSIF) -#define prt_slot_gsiH(nr) prt_slot_gsi(nr, GSIH, GSIE, GSIF, GSIG) - - Name(PRTA, package() { - prt_slot_gsiE(0x0000), - prt_slot_gsiF(0x0001), - prt_slot_gsiG(0x0002), - prt_slot_gsiH(0x0003), - prt_slot_gsiE(0x0004), - prt_slot_gsiF(0x0005), - prt_slot_gsiG(0x0006), - prt_slot_gsiH(0x0007), - prt_slot_gsiE(0x0008), - prt_slot_gsiF(0x0009), - prt_slot_gsiG(0x000a), - prt_slot_gsiH(0x000b), - prt_slot_gsiE(0x000c), - prt_slot_gsiF(0x000d), - prt_slot_gsiG(0x000e), - prt_slot_gsiH(0x000f), - prt_slot_gsiE(0x0010), - prt_slot_gsiF(0x0011), - prt_slot_gsiG(0x0012), - prt_slot_gsiH(0x0013), - prt_slot_gsiE(0x0014), - prt_slot_gsiF(0x0015), - prt_slot_gsiG(0x0016), - prt_slot_gsiH(0x0017), - prt_slot_gsiE(0x0018), - - /* INTA -> PIRQA for slot 25 - 31, but 30 - see the default value of D<N>IR */ - prt_slot_gsiA(0x0019), - prt_slot_gsiA(0x001a), - prt_slot_gsiA(0x001b), - prt_slot_gsiA(0x001c), - prt_slot_gsiA(0x001d), - - /* PCIe->PCI bridge. use PIRQ[E-H] */ - prt_slot_gsiE(0x001e), - - prt_slot_gsiA(0x001f) - }) } External(LNKA, DeviceObj) -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 45/51] pc: acpi: q35: move PRTP routing table into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (43 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 44/51] pc: acpi: q35: move PRTA routing table " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 46/51] pc: acpi: q35: move _PIC() method " Igor Mammedov ` (5 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 2 ++ hw/i386/q35-acpi-dsdt.dsl | 79 ----------------------------------------------- 2 files changed, 2 insertions(+), 79 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 1e12696..5948366 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1695,6 +1695,8 @@ static void build_q35_pci0_int(Aml *table) Aml *pci0_scope = aml_scope("PCI0"); aml_append(pci0_scope, + aml_name_decl("PRTP", build_q35_routing_table("LNK"))); + aml_append(pci0_scope, aml_name_decl("PRTA", build_q35_routing_table("GSI"))); method = aml_method("_PRT", 0, AML_NOTSERIALIZED); diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl index a3073ad..34485e7 100644 --- a/hw/i386/q35-acpi-dsdt.dsl +++ b/hw/i386/q35-acpi-dsdt.dsl @@ -122,83 +122,4 @@ DefinitionBlock ( Method(\_PIC, 1, NotSerialized) { Store(Arg0, \PICF) } - - Scope(\_SB) { - Scope(PCI0) { -#define prt_slot_lnk(nr, lnk0, lnk1, lnk2, lnk3) \ - Package() { nr##ffff, 0, lnk0, 0 }, \ - Package() { nr##ffff, 1, lnk1, 0 }, \ - Package() { nr##ffff, 2, lnk2, 0 }, \ - Package() { nr##ffff, 3, lnk3, 0 } - -#define prt_slot_lnkA(nr) prt_slot_lnk(nr, LNKA, LNKB, LNKC, LNKD) -#define prt_slot_lnkB(nr) prt_slot_lnk(nr, LNKB, LNKC, LNKD, LNKA) -#define prt_slot_lnkC(nr) prt_slot_lnk(nr, LNKC, LNKD, LNKA, LNKB) -#define prt_slot_lnkD(nr) prt_slot_lnk(nr, LNKD, LNKA, LNKB, LNKC) - -#define prt_slot_lnkE(nr) prt_slot_lnk(nr, LNKE, LNKF, LNKG, LNKH) -#define prt_slot_lnkF(nr) prt_slot_lnk(nr, LNKF, LNKG, LNKH, LNKE) -#define prt_slot_lnkG(nr) prt_slot_lnk(nr, LNKG, LNKH, LNKE, LNKF) -#define prt_slot_lnkH(nr) prt_slot_lnk(nr, LNKH, LNKE, LNKF, LNKG) - - Name(PRTP, package() { - prt_slot_lnkE(0x0000), - prt_slot_lnkF(0x0001), - prt_slot_lnkG(0x0002), - prt_slot_lnkH(0x0003), - prt_slot_lnkE(0x0004), - prt_slot_lnkF(0x0005), - prt_slot_lnkG(0x0006), - prt_slot_lnkH(0x0007), - prt_slot_lnkE(0x0008), - prt_slot_lnkF(0x0009), - prt_slot_lnkG(0x000a), - prt_slot_lnkH(0x000b), - prt_slot_lnkE(0x000c), - prt_slot_lnkF(0x000d), - prt_slot_lnkG(0x000e), - prt_slot_lnkH(0x000f), - prt_slot_lnkE(0x0010), - prt_slot_lnkF(0x0011), - prt_slot_lnkG(0x0012), - prt_slot_lnkH(0x0013), - prt_slot_lnkE(0x0014), - prt_slot_lnkF(0x0015), - prt_slot_lnkG(0x0016), - prt_slot_lnkH(0x0017), - prt_slot_lnkE(0x0018), - - /* INTA -> PIRQA for slot 25 - 31 - see the default value of D<N>IR */ - prt_slot_lnkA(0x0019), - prt_slot_lnkA(0x001a), - prt_slot_lnkA(0x001b), - prt_slot_lnkA(0x001c), - prt_slot_lnkA(0x001d), - - /* PCIe->PCI bridge. use PIRQ[E-H] */ - prt_slot_lnkE(0x001e), - - prt_slot_lnkA(0x001f) - }) - } - - 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) - External(GSIC, DeviceObj) - External(GSID, DeviceObj) - External(GSIE, DeviceObj) - External(GSIF, DeviceObj) - External(GSIG, DeviceObj) - External(GSIH, DeviceObj) - } } -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 46/51] pc: acpi: q35: move _PIC() method into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (44 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 45/51] pc: acpi: q35: move PRTP " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 47/51] pc: acpi: q35: move PCI0._OSC() " Igor Mammedov ` (4 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 8 ++++++++ hw/i386/q35-acpi-dsdt.dsl | 10 ---------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 5948366..4176f15 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1694,6 +1694,14 @@ static void build_q35_pci0_int(Aml *table) Aml *sb_scope = aml_scope("_SB"); Aml *pci0_scope = aml_scope("PCI0"); + /* Zero => PIC mode, One => APIC Mode */ + aml_append(table, aml_name_decl("PICF", aml_int(0))); + method = aml_method("_PIC", 1, AML_NOTSERIALIZED); + { + aml_append(method, aml_store(aml_arg(0), aml_name("PICF"))); + } + aml_append(table, method); + aml_append(pci0_scope, aml_name_decl("PRTP", build_q35_routing_table("LNK"))); aml_append(pci0_scope, diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl index 34485e7..7c7aef7 100644 --- a/hw/i386/q35-acpi-dsdt.dsl +++ b/hw/i386/q35-acpi-dsdt.dsl @@ -112,14 +112,4 @@ DefinitionBlock ( } } } - -/**************************************************************** - * PCI IRQs - ****************************************************************/ - - /* Zero => PIC mode, One => APIC Mode */ - Name(\PICF, Zero) - Method(\_PIC, 1, NotSerialized) { - Store(Arg0, \PICF) - } } -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 47/51] pc: acpi: q35: move PCI0._OSC() method into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (45 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 46/51] pc: acpi: q35: move _PIC() method " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 48/51] pc: acpi: q35: move PCI0 device definition " Igor Mammedov ` (3 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++ hw/i386/q35-acpi-dsdt.dsl | 57 ----------------------------------------------- 2 files changed, 56 insertions(+), 57 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 4176f15..4effa32 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1894,6 +1894,54 @@ static void build_piix4_pci_hotplug(Aml *table) aml_append(table, scope); } +static Aml *build_q35_osc_method(void) +{ + Aml *if_ctx; + Aml *if_ctx2; + Aml *else_ctx; + Aml *method; + Aml *a_cwd1 = aml_name("CDW1"); + Aml *a_ctrl = aml_name("CTRL"); + + method = aml_method("_OSC", 4, AML_NOTSERIALIZED); + aml_append(method, aml_create_dword_field(aml_arg(3), aml_int(0), "CDW1")); + + if_ctx = aml_if(aml_equal( + aml_arg(0), aml_touuid("33DB4D5B-1FF7-401C-9657-7441C03DD766"))); + aml_append(if_ctx, aml_create_dword_field(aml_arg(3), aml_int(4), "CDW2")); + aml_append(if_ctx, aml_create_dword_field(aml_arg(3), aml_int(8), "CDW3")); + + aml_append(if_ctx, aml_store(aml_name("CDW2"), aml_name("SUPP"))); + aml_append(if_ctx, aml_store(aml_name("CDW3"), a_ctrl)); + + /* + * Always allow native PME, AER (no dependencies) + * Never allow SHPC (no SHPC controller in this system) + */ + aml_append(if_ctx, aml_and(a_ctrl, aml_int(0x1D), a_ctrl)); + + if_ctx2 = aml_if(aml_lnot(aml_equal(aml_arg(1), aml_int(1)))); + /* Unknown revision */ + aml_append(if_ctx2, aml_or(a_cwd1, aml_int(0x08), a_cwd1)); + aml_append(if_ctx, if_ctx2); + + if_ctx2 = aml_if(aml_lnot(aml_equal(aml_name("CDW3"), a_ctrl))); + /* Capabilities bits were masked */ + aml_append(if_ctx2, aml_or(a_cwd1, aml_int(0x10), a_cwd1)); + aml_append(if_ctx, if_ctx2); + + /* Update DWORD3 in the buffer */ + aml_append(if_ctx, aml_store(a_ctrl, aml_name("CDW3"))); + aml_append(method, if_ctx); + + else_ctx = aml_else(); + /* Unrecognized UUID */ + aml_append(else_ctx, aml_or(a_cwd1, aml_int(4), a_cwd1)); + aml_append(method, else_ctx); + + aml_append(method, aml_return(aml_arg(3))); + return method; +} static void build_ssdt(GArray *table_data, GArray *linker, @@ -1932,6 +1980,14 @@ build_ssdt(GArray *table_data, GArray *linker, build_piix4_pci_hotplug(ssdt); build_piix4_pci0_int(ssdt); } else { + sb_scope = aml_scope("_SB"); + scope = aml_scope("PCI0"); + aml_append(scope, aml_name_decl("SUPP", aml_int(0))); + aml_append(scope, aml_name_decl("CTRL", aml_int(0))); + aml_append(scope, build_q35_osc_method()); + aml_append(sb_scope, scope); + aml_append(ssdt, sb_scope); + build_hpet_aml(ssdt); build_q35_isa_bridge(ssdt); build_isa_devices_aml(ssdt); diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl index 7c7aef7..b53663c 100644 --- a/hw/i386/q35-acpi-dsdt.dsl +++ b/hw/i386/q35-acpi-dsdt.dsl @@ -53,63 +53,6 @@ DefinitionBlock ( Name(_CID, EisaId("PNP0A03")) Name(_ADR, 0x00) Name(_UID, 1) - - External(ISA, DeviceObj) - - // _OSC: based on sample of ACPI3.0b spec - Name(SUPP, 0) // PCI _OSC Support Field value - Name(CTRL, 0) // PCI _OSC Control Field value - Method(_OSC, 4) { - // Create DWORD-addressable fields from the Capabilities Buffer - CreateDWordField(Arg3, 0, CDW1) - - // Check for proper UUID - If (LEqual(Arg0, ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { - // Create DWORD-addressable fields from the Capabilities Buffer - CreateDWordField(Arg3, 4, CDW2) - CreateDWordField(Arg3, 8, CDW3) - - // Save Capabilities DWORD2 & 3 - Store(CDW2, SUPP) - Store(CDW3, CTRL) - - // Always allow native PME, AER (no dependencies) - // Never allow SHPC (no SHPC controller in this system) - And(CTRL, 0x1D, CTRL) - -#if 0 // For now, nothing to do - If (Not(And(CDW1, 1))) { // Query flag clear? - // Disable GPEs for features granted native control. - If (And(CTRL, 0x01)) { // Hot plug control granted? - Store(0, HPCE) // clear the hot plug SCI enable bit - Store(1, HPCS) // clear the hot plug SCI status bit - } - If (And(CTRL, 0x04)) { // PME control granted? - Store(0, PMCE) // clear the PME SCI enable bit - Store(1, PMCS) // clear the PME SCI status bit - } - If (And(CTRL, 0x10)) { // OS restoring PCI Express cap structure? - // Set status to not restore PCI Express cap structure - // upon resume from S3 - Store(1, S3CR) - } - } -#endif - If (LNotEqual(Arg1, One)) { - // Unknown revision - Or(CDW1, 0x08, CDW1) - } - If (LNotEqual(CDW3, CTRL)) { - // Capabilities bits were masked - Or(CDW1, 0x10, CDW1) - } - // Update DWORD3 in the buffer - Store(CTRL, CDW3) - } Else { - Or(CDW1, 4, CDW1) // Unrecognized UUID - } - Return (Arg3) - } } } } -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 48/51] pc: acpi: q35: move PCI0 device definition into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (46 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 47/51] pc: acpi: q35: move PCI0._OSC() " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 49/51] pc: acpi: q35: PCST, PCSB opregions and PCIB field " Igor Mammedov ` (2 subsequent siblings) 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 14 +++++++++----- hw/i386/q35-acpi-dsdt.dsl | 13 ------------- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 4effa32..d9925cd 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1981,11 +1981,15 @@ build_ssdt(GArray *table_data, GArray *linker, build_piix4_pci0_int(ssdt); } else { sb_scope = aml_scope("_SB"); - scope = aml_scope("PCI0"); - aml_append(scope, aml_name_decl("SUPP", aml_int(0))); - aml_append(scope, aml_name_decl("CTRL", aml_int(0))); - aml_append(scope, build_q35_osc_method()); - aml_append(sb_scope, scope); + dev = aml_device("PCI0"); + aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A08"))); + aml_append(dev, aml_name_decl("_CID", aml_eisaid("PNP0A03"))); + aml_append(dev, aml_name_decl("_ADR", aml_int(0))); + aml_append(dev, aml_name_decl("_UID", aml_int(1))); + aml_append(dev, aml_name_decl("SUPP", aml_int(0))); + aml_append(dev, aml_name_decl("CTRL", aml_int(0))); + aml_append(dev, build_q35_osc_method()); + aml_append(sb_scope, dev); aml_append(ssdt, sb_scope); build_hpet_aml(ssdt); diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl index b53663c..f234f5c 100644 --- a/hw/i386/q35-acpi-dsdt.dsl +++ b/hw/i386/q35-acpi-dsdt.dsl @@ -42,17 +42,4 @@ DefinitionBlock ( PCIB, 8, } } - - -/**************************************************************** - * PCI Bus definition - ****************************************************************/ - Scope(\_SB) { - Device(PCI0) { - Name(_HID, EisaId("PNP0A08")) - Name(_CID, EisaId("PNP0A03")) - Name(_ADR, 0x00) - Name(_UID, 1) - } - } } -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 49/51] pc: acpi: q35: PCST, PCSB opregions and PCIB field into SSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (47 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 48/51] pc: acpi: q35: move PCI0 device definition " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 50/51] pc: acpi: switch to AML API composed DSDT Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 51/51] pc: acpi: remove unused ASL templates and related blobs/utils Igor Mammedov 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 10 ++++++++++ hw/i386/q35-acpi-dsdt.dsl | 5 ----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index d9925cd..ebeab17 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1981,6 +1981,16 @@ build_ssdt(GArray *table_data, GArray *linker, build_piix4_pci0_int(ssdt); } else { sb_scope = aml_scope("_SB"); + aml_append(sb_scope, + aml_operation_region("PCST", AML_SYSTEM_IO, 0xae00, 0x0c)); + aml_append(sb_scope, + aml_operation_region("PCSB", AML_SYSTEM_IO, 0xae0c, 0x01)); + field = aml_field("PCSB", AML_ANY_ACC, AML_NOLOCK, AML_WRITE_AS_ZEROS); + aml_append(field, aml_named_field("PCIB", 8)); + aml_append(sb_scope, field); + aml_append(ssdt, sb_scope); + + sb_scope = aml_scope("_SB"); dev = aml_device("PCI0"); aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A08"))); aml_append(dev, aml_name_decl("_CID", aml_eisaid("PNP0A03"))); diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl index f234f5c..3ecdb50 100644 --- a/hw/i386/q35-acpi-dsdt.dsl +++ b/hw/i386/q35-acpi-dsdt.dsl @@ -36,10 +36,5 @@ DefinitionBlock ( { Scope(\_SB) { - OperationRegion(PCST, SystemIO, 0xae00, 0x0c) - OperationRegion(PCSB, SystemIO, 0xae0c, 0x01) - Field(PCSB, AnyAcc, NoLock, WriteAsZeros) { - PCIB, 8, - } } } -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 50/51] pc: acpi: switch to AML API composed DSDT 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (48 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 49/51] pc: acpi: q35: PCST, PCSB opregions and PCIB field " Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 51/51] pc: acpi: remove unused ASL templates and related blobs/utils Igor Mammedov 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/acpi-build.c | 235 +++++++++++++++++++++++++-------------------------- 1 file changed, 115 insertions(+), 120 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index ebeab17..ce27051 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -53,9 +53,6 @@ #include "hw/i386/intel_iommu.h" #include "hw/timer/hpet.h" -#include "hw/i386/q35-acpi-dsdt.hex" -#include "hw/i386/acpi-dsdt.hex" - #include "hw/acpi/aml-build.h" #include "qapi/qmp/qint.h" @@ -124,24 +121,6 @@ typedef struct AcpiBuildPciBusHotplugState { bool pcihp_bridge_en; } AcpiBuildPciBusHotplugState; -static void acpi_get_dsdt(AcpiMiscInfo *info) -{ - Object *piix = piix4_pm_find(); - Object *lpc = ich9_lpc_find(); - assert(!!piix != !!lpc); - - if (piix) { - info->is_piix4 = true; - info->dsdt_code = AcpiDsdtAmlCode; - info->dsdt_size = sizeof AcpiDsdtAmlCode; - } - if (lpc) { - info->is_piix4 = false; - info->dsdt_code = Q35AcpiDsdtAmlCode; - info->dsdt_size = sizeof Q35AcpiDsdtAmlCode; - } -} - static int acpi_add_cpu_info(Object *o, void *opaque) { @@ -240,6 +219,17 @@ static void acpi_get_pm_info(AcpiPmInfo *pm) static void acpi_get_misc_info(AcpiMiscInfo *info) { + Object *piix = piix4_pm_find(); + Object *lpc = ich9_lpc_find(); + assert(!!piix != !!lpc); + + if (piix) { + info->is_piix4 = true; + } + if (lpc) { + info->is_piix4 = false; + } + info->has_hpet = hpet_find(); info->tpm_version = tpm_get_version(); info->pvpanic_port = pvpanic_port(); @@ -1963,95 +1953,6 @@ build_ssdt(GArray *table_data, GArray *linker, /* Reserve space for header */ acpi_data_push(ssdt->buf, sizeof(AcpiTableHeader)); - build_dbg_aml(ssdt); - if (misc->is_piix4) { - sb_scope = aml_scope("_SB"); - dev = aml_device("PCI0"); - aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A03"))); - aml_append(dev, aml_name_decl("_ADR", aml_int(0))); - aml_append(dev, aml_name_decl("_UID", aml_int(1))); - aml_append(sb_scope, dev); - aml_append(ssdt, sb_scope); - - build_hpet_aml(ssdt); - build_piix4_pm(ssdt); - build_piix4_isa_bridge(ssdt); - build_isa_devices_aml(ssdt); - build_piix4_pci_hotplug(ssdt); - build_piix4_pci0_int(ssdt); - } else { - sb_scope = aml_scope("_SB"); - aml_append(sb_scope, - aml_operation_region("PCST", AML_SYSTEM_IO, 0xae00, 0x0c)); - aml_append(sb_scope, - aml_operation_region("PCSB", AML_SYSTEM_IO, 0xae0c, 0x01)); - field = aml_field("PCSB", AML_ANY_ACC, AML_NOLOCK, AML_WRITE_AS_ZEROS); - aml_append(field, aml_named_field("PCIB", 8)); - aml_append(sb_scope, field); - aml_append(ssdt, sb_scope); - - sb_scope = aml_scope("_SB"); - dev = aml_device("PCI0"); - aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A08"))); - aml_append(dev, aml_name_decl("_CID", aml_eisaid("PNP0A03"))); - aml_append(dev, aml_name_decl("_ADR", aml_int(0))); - aml_append(dev, aml_name_decl("_UID", aml_int(1))); - aml_append(dev, aml_name_decl("SUPP", aml_int(0))); - aml_append(dev, aml_name_decl("CTRL", aml_int(0))); - aml_append(dev, build_q35_osc_method()); - aml_append(sb_scope, dev); - aml_append(ssdt, sb_scope); - - build_hpet_aml(ssdt); - build_q35_isa_bridge(ssdt); - build_isa_devices_aml(ssdt); - build_q35_pci0_int(ssdt); - } - - build_cpu_hotplug_aml(ssdt); - build_memory_hotplug_aml(ssdt, nr_mem, pm->mem_hp_io_base, - pm->mem_hp_io_len); - - scope = aml_scope("_GPE"); - { - aml_append(scope, aml_name_decl("_HID", aml_string("ACPI0006"))); - - aml_append(scope, aml_method("_L00", 0, AML_NOTSERIALIZED)); - - 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 { - aml_append(scope, aml_method("_L01", 0, AML_NOTSERIALIZED)); - } - - method = aml_method("_E02", 0, AML_NOTSERIALIZED); - aml_append(method, aml_call0("\\_SB." CPU_SCAN_METHOD)); - aml_append(scope, method); - - method = aml_method("_E03", 0, AML_NOTSERIALIZED); - aml_append(method, aml_call0(MEMORY_HOTPLUG_HANDLER_PATH)); - aml_append(scope, method); - - aml_append(scope, aml_method("_L04", 0, AML_NOTSERIALIZED)); - aml_append(scope, aml_method("_L05", 0, AML_NOTSERIALIZED)); - aml_append(scope, aml_method("_L06", 0, AML_NOTSERIALIZED)); - aml_append(scope, aml_method("_L07", 0, AML_NOTSERIALIZED)); - aml_append(scope, aml_method("_L08", 0, AML_NOTSERIALIZED)); - aml_append(scope, aml_method("_L09", 0, AML_NOTSERIALIZED)); - aml_append(scope, aml_method("_L0A", 0, AML_NOTSERIALIZED)); - aml_append(scope, aml_method("_L0B", 0, AML_NOTSERIALIZED)); - aml_append(scope, aml_method("_L0C", 0, AML_NOTSERIALIZED)); - aml_append(scope, aml_method("_L0D", 0, AML_NOTSERIALIZED)); - aml_append(scope, aml_method("_L0E", 0, AML_NOTSERIALIZED)); - aml_append(scope, aml_method("_L0F", 0, AML_NOTSERIALIZED)); - } - aml_append(ssdt, scope); - bus = PC_MACHINE(machine)->bus; if (bus) { QLIST_FOREACH(bus, &bus->child, sibling) { @@ -2521,18 +2422,113 @@ build_dmar_q35(GArray *table_data, GArray *linker) } static void -build_dsdt(GArray *table_data, GArray *linker, AcpiMiscInfo *misc) +build_dsdt(GArray *table_data, GArray *linker, + AcpiPmInfo *pm, AcpiMiscInfo *misc) { - AcpiTableHeader *dsdt; + Aml *dsdt, *sb_scope, *scope, *dev, *method, *field; + MachineState *machine = MACHINE(qdev_get_machine()); + uint32_t nr_mem = machine->ram_slots; + + dsdt = init_aml_allocator(); - assert(misc->dsdt_code && misc->dsdt_size); + /* Reserve space for header */ + acpi_data_push(dsdt->buf, sizeof(AcpiTableHeader)); - dsdt = acpi_data_push(table_data, misc->dsdt_size); - memcpy(dsdt, misc->dsdt_code, misc->dsdt_size); + build_dbg_aml(dsdt); + if (misc->is_piix4) { + sb_scope = aml_scope("_SB"); + dev = aml_device("PCI0"); + aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A03"))); + aml_append(dev, aml_name_decl("_ADR", aml_int(0))); + aml_append(dev, aml_name_decl("_UID", aml_int(1))); + aml_append(sb_scope, dev); + aml_append(dsdt, sb_scope); + + build_hpet_aml(dsdt); + build_piix4_pm(dsdt); + build_piix4_isa_bridge(dsdt); + build_isa_devices_aml(dsdt); + build_piix4_pci_hotplug(dsdt); + build_piix4_pci0_int(dsdt); + } else { + sb_scope = aml_scope("_SB"); + aml_append(sb_scope, + aml_operation_region("PCST", AML_SYSTEM_IO, 0xae00, 0x0c)); + aml_append(sb_scope, + aml_operation_region("PCSB", AML_SYSTEM_IO, 0xae0c, 0x01)); + field = aml_field("PCSB", AML_ANY_ACC, AML_NOLOCK, AML_WRITE_AS_ZEROS); + aml_append(field, aml_named_field("PCIB", 8)); + aml_append(sb_scope, field); + aml_append(dsdt, sb_scope); + + sb_scope = aml_scope("_SB"); + dev = aml_device("PCI0"); + aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A08"))); + aml_append(dev, aml_name_decl("_CID", aml_eisaid("PNP0A03"))); + aml_append(dev, aml_name_decl("_ADR", aml_int(0))); + aml_append(dev, aml_name_decl("_UID", aml_int(1))); + aml_append(dev, aml_name_decl("SUPP", aml_int(0))); + aml_append(dev, aml_name_decl("CTRL", aml_int(0))); + aml_append(dev, build_q35_osc_method()); + aml_append(sb_scope, dev); + aml_append(dsdt, sb_scope); + + build_hpet_aml(dsdt); + build_q35_isa_bridge(dsdt); + build_isa_devices_aml(dsdt); + build_q35_pci0_int(dsdt); + } - memset(dsdt, 0, sizeof *dsdt); - build_header(linker, table_data, dsdt, "DSDT", - misc->dsdt_size, 1, NULL); + build_cpu_hotplug_aml(dsdt); + build_memory_hotplug_aml(dsdt, nr_mem, pm->mem_hp_io_base, + pm->mem_hp_io_len); + + scope = aml_scope("_GPE"); + { + aml_append(scope, aml_name_decl("_HID", aml_string("ACPI0006"))); + + aml_append(scope, aml_method("_L00", 0, AML_NOTSERIALIZED)); + + 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 { + aml_append(scope, aml_method("_L01", 0, AML_NOTSERIALIZED)); + } + + method = aml_method("_E02", 0, AML_NOTSERIALIZED); + aml_append(method, aml_call0("\\_SB." CPU_SCAN_METHOD)); + aml_append(scope, method); + + method = aml_method("_E03", 0, AML_NOTSERIALIZED); + aml_append(method, aml_call0(MEMORY_HOTPLUG_HANDLER_PATH)); + aml_append(scope, method); + + aml_append(scope, aml_method("_L04", 0, AML_NOTSERIALIZED)); + aml_append(scope, aml_method("_L05", 0, AML_NOTSERIALIZED)); + aml_append(scope, aml_method("_L06", 0, AML_NOTSERIALIZED)); + aml_append(scope, aml_method("_L07", 0, AML_NOTSERIALIZED)); + aml_append(scope, aml_method("_L08", 0, AML_NOTSERIALIZED)); + aml_append(scope, aml_method("_L09", 0, AML_NOTSERIALIZED)); + aml_append(scope, aml_method("_L0A", 0, AML_NOTSERIALIZED)); + aml_append(scope, aml_method("_L0B", 0, AML_NOTSERIALIZED)); + aml_append(scope, aml_method("_L0C", 0, AML_NOTSERIALIZED)); + aml_append(scope, aml_method("_L0D", 0, AML_NOTSERIALIZED)); + aml_append(scope, aml_method("_L0E", 0, AML_NOTSERIALIZED)); + aml_append(scope, aml_method("_L0F", 0, AML_NOTSERIALIZED)); + } + aml_append(dsdt, scope); + + /* copy AML table into ACPI tables blob and patch header there */ + g_array_append_vals(table_data, dsdt->buf->data, dsdt->buf->len); + build_header(linker, table_data, + (void *)(table_data->data + table_data->len - dsdt->buf->len), + "DSDT", dsdt->buf->len, 1, NULL); + free_aml_allocator(); } static GArray * @@ -2626,7 +2622,6 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables) acpi_get_cpu_info(&cpu); acpi_get_pm_info(&pm); - acpi_get_dsdt(&misc); acpi_get_misc_info(&misc); acpi_get_pci_info(&pci); @@ -2648,7 +2643,7 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables) /* DSDT is pointed to by FADT */ dsdt = tables_blob->len; - build_dsdt(tables_blob, tables->linker, &misc); + build_dsdt(tables_blob, tables->linker, &pm, &misc); /* Count the size of the DSDT and SSDT, we will need it for legacy * sizing of ACPI tables. -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
* [Qemu-devel] [PATCH v2 51/51] pc: acpi: remove unused ASL templates and related blobs/utils 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov ` (49 preceding siblings ...) 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 50/51] pc: acpi: switch to AML API composed DSDT Igor Mammedov @ 2015-12-28 17:02 ` Igor Mammedov 50 siblings, 0 replies; 52+ messages in thread From: Igor Mammedov @ 2015-12-28 17:02 UTC (permalink / raw) To: qemu-devel QEMU now uses internally composed DSDT so drop now empty *.dsl templates and related *.generated binary blobs. Also since templates are not used anymore/obolete remove utility scripts used for extracting/patching AML blobs compiled by IASL and for updating them in git tree. Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/i386/Makefile.objs | 30 - hw/i386/acpi-dsdt.dsl | 33 - hw/i386/acpi-dsdt.hex.generated | 2972 -------------- hw/i386/q35-acpi-dsdt.dsl | 40 - hw/i386/q35-acpi-dsdt.hex.generated | 7610 ----------------------------------- scripts/acpi_extract.py | 367 -- scripts/acpi_extract_preprocess.py | 51 - scripts/update-acpi.sh | 4 - 8 files changed, 11107 deletions(-) delete mode 100644 hw/i386/acpi-dsdt.dsl delete mode 100644 hw/i386/acpi-dsdt.hex.generated delete mode 100644 hw/i386/q35-acpi-dsdt.dsl delete mode 100644 hw/i386/q35-acpi-dsdt.hex.generated delete mode 100755 scripts/acpi_extract.py delete mode 100755 scripts/acpi_extract_preprocess.py delete mode 100644 scripts/update-acpi.sh diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs index c250deb..b52d5b8 100644 --- a/hw/i386/Makefile.objs +++ b/hw/i386/Makefile.objs @@ -8,33 +8,3 @@ obj-$(CONFIG_XEN) += ../xenpv/ xen/ obj-y += kvmvapic.o obj-y += acpi-build.o obj-y += pci-assign-load-rom.o - -gen-hex-y += hw/i386/acpi-dsdt.hex -gen-hex-y += hw/i386/q35-acpi-dsdt.hex - -hw/i386/acpi-build.o: hw/i386/acpi-build.c \ - $(gen-hex-y) - --include $(gen-hex-y:.hex=.d) - -iasl-option=$(shell if test -z "`$(1) $(2) 2>&1 > /dev/null`" \ - ; then echo "$(2)"; else echo "$(3)"; fi ;) - -ifdef IASL -#IASL Present. Generate hex files from .dsl -hw/i386/%.hex: $(SRC_PATH)/hw/i386/%.dsl $(SRC_PATH)/scripts/acpi_extract_preprocess.py $(SRC_PATH)/scripts/acpi_extract.py - $(call quiet-command, $(CPP) -x c -P $(QEMU_DGFLAGS) $(QEMU_INCLUDES) $< -o $*.dsl.i.orig, " CPP $(TARGET_DIR)$*.dsl.i.orig") - $(call quiet-command, $(PYTHON) $(SRC_PATH)/scripts/acpi_extract_preprocess.py $*.dsl.i.orig > $*.dsl.i, " ACPI_PREPROCESS $(TARGET_DIR)$*.dsl.i") - $(call quiet-command, $(IASL) $(call iasl-option,$(IASL),-Pn,) -vs -l -tc -p $* $*.dsl.i $(if $(V), , > /dev/null) 2>&1 ," IASL $(TARGET_DIR)$*.dsl.i") - $(call quiet-command, $(PYTHON) $(SRC_PATH)/scripts/acpi_extract.py $*.lst > $*.off, " ACPI_EXTRACT $(TARGET_DIR)$*.off") - $(call quiet-command, cat $*.off > $@, " CAT $(TARGET_DIR)$@") -else -#IASL Not present. Restore pre-generated hex files. -hw/i386/%.hex: $(SRC_PATH)/hw/i386/%.hex.generated - $(call quiet-command, cp -f $< $@, " CP $(TARGET_DIR)$@") -endif - -.PHONY: cleanhex -cleanhex: - rm -f hw/i386/*hex -clean: cleanhex diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl deleted file mode 100644 index 82e4470..0000000 --- a/hw/i386/acpi-dsdt.dsl +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Bochs/QEMU ACPI DSDT ASL definition - * - * Copyright (c) 2006 Fabrice Bellard - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License version 2 as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -ACPI_EXTRACT_ALL_CODE AcpiDsdtAmlCode - -DefinitionBlock ( - "acpi-dsdt.aml", // Output Filename - "DSDT", // Signature - 0x01, // DSDT Compliance Revision - "BXPC", // OEMID - "BXDSDT", // TABLE ID - 0x1 // OEM Revision - ) -{ - Scope(\_SB) { - } -} diff --git a/hw/i386/acpi-dsdt.hex.generated b/hw/i386/acpi-dsdt.hex.generated deleted file mode 100644 index ecaa4a5..0000000 --- a/hw/i386/acpi-dsdt.hex.generated +++ /dev/null @@ -1,2972 +0,0 @@ -static unsigned char AcpiDsdtAmlCode[] = { -0x44, -0x53, -0x44, -0x54, -0x9a, -0xb, -0x0, -0x0, -0x1, -0xf8, -0x42, -0x58, -0x50, -0x43, -0x0, -0x0, -0x42, -0x58, -0x44, -0x53, -0x44, -0x54, -0x0, -0x0, -0x1, -0x0, -0x0, -0x0, -0x49, -0x4e, -0x54, -0x4c, -0x7, -0x11, -0x14, -0x20, -0x10, -0x49, -0x4, -0x5c, -0x0, -0x5b, -0x80, -0x44, -0x42, -0x47, -0x5f, -0x1, -0xb, -0x2, -0x4, -0x1, -0x5b, -0x81, -0xb, -0x44, -0x42, -0x47, -0x5f, -0x1, -0x44, -0x42, -0x47, -0x42, -0x8, -0x14, -0x2c, -0x44, -0x42, -0x55, -0x47, -0x1, -0x98, -0x68, -0x60, -0x96, -0x60, -0x60, -0x74, -0x87, -0x60, -0x1, -0x61, -0x70, -0x0, -0x62, -0xa2, -0x10, -0x95, -0x62, -0x61, -0x70, -0x83, -0x88, -0x60, -0x62, -0x0, -0x44, -0x42, -0x47, -0x42, -0x75, -0x62, -0x70, -0xa, -0xa, -0x44, -0x42, -0x47, -0x42, -0x10, -0x22, -0x5f, -0x53, -0x42, -0x5f, -0x5b, -0x82, -0x1b, -0x50, -0x43, -0x49, -0x30, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xa, -0x3, -0x8, -0x5f, -0x41, -0x44, -0x52, -0x0, -0x8, -0x5f, -0x55, -0x49, -0x44, -0x1, -0x10, -0x4d, -0x8, -0x5f, -0x53, -0x42, -0x5f, -0x5b, -0x82, -0x45, -0x8, -0x48, -0x50, -0x45, -0x54, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0x1, -0x3, -0x8, -0x5f, -0x55, -0x49, -0x44, -0x0, -0x5b, -0x80, -0x48, -0x50, -0x54, -0x4d, -0x0, -0xc, -0x0, -0x0, -0xd0, -0xfe, -0xb, -0x0, -0x4, -0x5b, -0x81, -0x10, -0x48, -0x50, -0x54, -0x4d, -0x13, -0x56, -0x45, -0x4e, -0x44, -0x20, -0x50, -0x52, -0x44, -0x5f, -0x20, -0x14, -0x36, -0x5f, -0x53, -0x54, -0x41, -0x0, -0x70, -0x56, -0x45, -0x4e, -0x44, -0x60, -0x70, -0x50, -0x52, -0x44, -0x5f, -0x61, -0x7a, -0x60, -0xa, -0x10, -0x60, -0xa0, -0xc, -0x91, -0x93, -0x60, -0x0, -0x93, -0x60, -0xb, -0xff, -0xff, -0xa4, -0x0, -0xa0, -0xe, -0x91, -0x93, -0x61, -0x0, -0x94, -0x61, -0xc, -0x0, -0xe1, -0xf5, -0x5, -0xa4, -0x0, -0xa4, -0xa, -0xf, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0x11, -0xa, -0xe, -0x86, -0x9, -0x0, -0x0, -0x0, -0x0, -0xd0, -0xfe, -0x0, -0x4, -0x0, -0x0, -0x79, -0x0, -0x10, -0x25, -0x2e, -0x5f, -0x53, -0x42, -0x5f, -0x50, -0x43, -0x49, -0x30, -0x5b, -0x82, -0x19, -0x50, -0x58, -0x31, -0x33, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x3, -0x0, -0x1, -0x0, -0x5b, -0x80, -0x50, -0x31, -0x33, -0x43, -0x2, -0x0, -0xa, -0xff, -0x10, -0x46, -0x5, -0x2e, -0x5f, -0x53, -0x42, -0x5f, -0x50, -0x43, -0x49, -0x30, -0x5b, -0x82, -0x49, -0x4, -0x49, -0x53, -0x41, -0x5f, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x1, -0x0, -0x5b, -0x80, -0x50, -0x34, -0x30, -0x43, -0x2, -0xa, -0x60, -0xa, -0x4, -0x5b, -0x81, -0x26, -0x5e, -0x2e, -0x50, -0x58, -0x31, -0x33, -0x50, -0x31, -0x33, -0x43, -0x0, -0x0, -0x48, -0x2f, -0x0, -0x7, -0x4c, -0x50, -0x45, -0x4e, -0x1, -0x0, -0x38, -0x0, -0x3, -0x43, -0x41, -0x45, -0x4e, -0x1, -0x0, -0x3, -0x43, -0x42, -0x45, -0x4e, -0x1, -0x8, -0x46, -0x44, -0x45, -0x4e, -0x1, -0x10, -0x4c, -0x1b, -0x2f, -0x3, -0x5f, -0x53, -0x42, -0x5f, -0x50, -0x43, -0x49, -0x30, -0x49, -0x53, -0x41, -0x5f, -0x5b, -0x82, -0x2d, -0x52, -0x54, -0x43, -0x5f, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xb, -0x0, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0x18, -0xa, -0x15, -0x47, -0x1, -0x70, -0x0, -0x70, -0x0, -0x10, -0x2, -0x22, -0x0, -0x1, -0x47, -0x1, -0x72, -0x0, -0x72, -0x0, -0x2, -0x6, -0x79, -0x0, -0x5b, -0x82, -0x37, -0x4b, -0x42, -0x44, -0x5f, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0x3, -0x3, -0x14, -0x9, -0x5f, -0x53, -0x54, -0x41, -0x0, -0xa4, -0xa, -0xf, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0x18, -0xa, -0x15, -0x47, -0x1, -0x60, -0x0, -0x60, -0x0, -0x1, -0x1, -0x47, -0x1, -0x64, -0x0, -0x64, -0x0, -0x1, -0x1, -0x22, -0x2, -0x0, -0x79, -0x0, -0x5b, -0x82, -0x27, -0x4d, -0x4f, -0x55, -0x5f, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xf, -0x13, -0x14, -0x9, -0x5f, -0x53, -0x54, -0x41, -0x0, -0xa4, -0xa, -0xf, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0x8, -0xa, -0x5, -0x22, -0x0, -0x10, -0x79, -0x0, -0x5b, -0x82, -0x4a, -0x4, -0x46, -0x44, -0x43, -0x30, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0x7, -0x0, -0x14, -0x18, -0x5f, -0x53, -0x54, -0x41, -0x0, -0x70, -0x46, -0x44, -0x45, -0x4e, -0x60, -0xa0, -0x6, -0x93, -0x60, -0x0, -0xa4, -0x0, -0xa1, -0x4, -0xa4, -0xa, -0xf, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0x1b, -0xa, -0x18, -0x47, -0x1, -0xf2, -0x3, -0xf2, -0x3, -0x0, -0x4, -0x47, -0x1, -0xf7, -0x3, -0xf7, -0x3, -0x0, -0x1, -0x22, -0x40, -0x0, -0x2a, -0x4, -0x0, -0x79, -0x0, -0x5b, -0x82, -0x3e, -0x4c, -0x50, -0x54, -0x5f, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0x4, -0x0, -0x14, -0x18, -0x5f, -0x53, -0x54, -0x41, -0x0, -0x70, -0x4c, -0x50, -0x45, -0x4e, -0x60, -0xa0, -0x6, -0x93, -0x60, -0x0, -0xa4, -0x0, -0xa1, -0x4, -0xa4, -0xa, -0xf, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0x10, -0xa, -0xd, -0x47, -0x1, -0x78, -0x3, -0x78, -0x3, -0x8, -0x8, -0x22, -0x80, -0x0, -0x79, -0x0, -0x5b, -0x82, -0x45, -0x4, -0x43, -0x4f, -0x4d, -0x31, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0x5, -0x1, -0x8, -0x5f, -0x55, -0x49, -0x44, -0x1, -0x14, -0x18, -0x5f, -0x53, -0x54, -0x41, -0x0, -0x70, -0x43, -0x41, -0x45, -0x4e, -0x60, -0xa0, -0x6, -0x93, -0x60, -0x0, -0xa4, -0x0, -0xa1, -0x4, -0xa4, -0xa, -0xf, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0x10, -0xa, -0xd, -0x47, -0x1, -0xf8, -0x3, -0xf8, -0x3, -0x0, -0x8, -0x22, -0x10, -0x0, -0x79, -0x0, -0x5b, -0x82, -0x46, -0x4, -0x43, -0x4f, -0x4d, -0x32, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0x5, -0x1, -0x8, -0x5f, -0x55, -0x49, -0x44, -0xa, -0x2, -0x14, -0x18, -0x5f, -0x53, -0x54, -0x41, -0x0, -0x70, -0x43, -0x42, -0x45, -0x4e, -0x60, -0xa0, -0x6, -0x93, -0x60, -0x0, -0xa4, -0x0, -0xa1, -0x4, -0xa4, -0xa, -0xf, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0x10, -0xa, -0xd, -0x47, -0x1, -0xf8, -0x2, -0xf8, -0x2, -0x0, -0x8, -0x22, -0x8, -0x0, -0x79, -0x0, -0x10, -0x48, -0x8, -0x2e, -0x5f, -0x53, -0x42, -0x5f, -0x50, -0x43, -0x49, -0x30, -0x5b, -0x80, -0x50, -0x43, -0x53, -0x54, -0x1, -0xb, -0x0, -0xae, -0xa, -0x8, -0x5b, -0x81, -0x10, -0x50, -0x43, -0x53, -0x54, -0x43, -0x50, -0x43, -0x49, -0x55, -0x20, -0x50, -0x43, -0x49, -0x44, -0x20, -0x5b, -0x80, -0x53, -0x45, -0x4a, -0x5f, -0x1, -0xb, -0x8, -0xae, -0xa, -0x4, -0x5b, -0x81, -0xb, -0x53, -0x45, -0x4a, -0x5f, -0x43, -0x42, -0x30, -0x45, -0x4a, -0x20, -0x5b, -0x80, -0x42, -0x4e, -0x4d, -0x52, -0x1, -0xb, -0x10, -0xae, -0xa, -0x4, -0x5b, -0x81, -0xb, -0x42, -0x4e, -0x4d, -0x52, -0x43, -0x42, -0x4e, -0x55, -0x4d, -0x20, -0x5b, -0x1, -0x42, -0x4c, -0x43, -0x4b, -0x0, -0x14, -0x25, -0x50, -0x43, -0x45, -0x4a, -0x2, -0x5b, -0x23, -0x42, -0x4c, -0x43, -0x4b, -0xff, -0xff, -0x70, -0x68, -0x42, -0x4e, -0x55, -0x4d, -0x70, -0x79, -0x1, -0x69, -0x0, -0x42, -0x30, -0x45, -0x4a, -0x5b, -0x27, -0x42, -0x4c, -0x43, -0x4b, -0xa4, -0x0, -0x10, -0x4e, -0x36, -0x5f, -0x53, -0x42, -0x5f, -0x10, -0x4b, -0xa, -0x50, -0x43, -0x49, -0x30, -0x14, -0x44, -0xa, -0x5f, -0x50, -0x52, -0x54, -0x0, -0x70, -0x12, -0x2, -0x80, -0x60, -0x70, -0x0, -0x61, -0xa2, -0x42, -0x9, -0x95, -0x61, -0xa, -0x80, -0x70, -0x7a, -0x61, -0xa, -0x2, -0x0, -0x62, -0x70, -0x7b, -0x72, -0x61, -0x62, -0x0, -0xa, -0x3, -0x0, -0x63, -0xa0, -0x10, -0x93, -0x63, -0x0, -0x70, -0x12, -0x9, -0x4, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x44, -0x0, -0x64, -0xa0, -0x24, -0x93, -0x63, -0x1, -0xa0, -0x11, -0x93, -0x61, -0xa, -0x4, -0x70, -0x12, -0x9, -0x4, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x53, -0x0, -0x64, -0xa1, -0xd, -0x70, -0x12, -0x9, -0x4, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x41, -0x0, -0x64, -0xa0, -0x11, -0x93, -0x63, -0xa, -0x2, -0x70, -0x12, -0x9, -0x4, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x42, -0x0, -0x64, -0xa0, -0x11, -0x93, -0x63, -0xa, -0x3, -0x70, -0x12, -0x9, -0x4, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x43, -0x0, -0x64, -0x70, -0x7d, -0x79, -0x62, -0xa, -0x10, -0x0, -0xb, -0xff, -0xff, -0x0, -0x88, -0x64, -0x0, -0x0, -0x70, -0x7b, -0x61, -0xa, -0x3, -0x0, -0x88, -0x64, -0x1, -0x0, -0x70, -0x64, -0x88, -0x60, -0x61, -0x0, -0x75, -0x61, -0xa4, -0x60, -0x5b, -0x81, -0x24, -0x2f, -0x3, -0x50, -0x43, -0x49, -0x30, -0x49, -0x53, -0x41, -0x5f, -0x50, -0x34, -0x30, -0x43, -0x1, -0x50, -0x52, -0x51, -0x30, -0x8, -0x50, -0x52, -0x51, -0x31, -0x8, -0x50, -0x52, -0x51, -0x32, -0x8, -0x50, -0x52, -0x51, -0x33, -0x8, -0x14, -0x13, -0x49, -0x51, -0x53, -0x54, -0x1, -0xa0, -0x9, -0x7b, -0xa, -0x80, -0x68, -0x0, -0xa4, -0xa, -0x9, -0xa4, -0xa, -0xb, -0x14, -0x36, -0x49, -0x51, -0x43, -0x52, -0x9, -0x8, -0x50, -0x52, -0x52, -0x30, -0x11, -0xe, -0xa, -0xb, -0x89, -0x6, -0x0, -0x9, -0x1, -0x0, -0x0, -0x0, -0x0, -0x79, -0x0, -0x8a, -0x50, -0x52, -0x52, -0x30, -0xa, -0x5, -0x50, -0x52, -0x52, -0x49, -0xa0, -0xb, -0x95, -0x68, -0xa, -0x80, -0x70, -0x68, -0x50, -0x52, -0x52, -0x49, -0xa4, -0x50, -0x52, -0x52, -0x30, -0x5b, -0x82, -0x4c, -0x7, -0x4c, -0x4e, -0x4b, -0x41, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xc, -0xf, -0x8, -0x5f, -0x55, -0x49, -0x44, -0x0, -0x8, -0x5f, -0x50, -0x52, -0x53, -0x11, -0x16, -0xa, -0x13, -0x89, -0xe, -0x0, -0x9, -0x3, -0x5, -0x0, -0x0, -0x0, -0xa, -0x0, -0x0, -0x0, -0xb, -0x0, -0x0, -0x0, -0x79, -0x0, -0x14, -0xf, -0x5f, -0x53, -0x54, -0x41, -0x0, -0xa4, -0x49, -0x51, -0x53, -0x54, -0x50, -0x52, -0x51, -0x30, -0x14, -0x11, -0x5f, -0x44, -0x49, -0x53, -0x0, -0x7d, -0x50, -0x52, -0x51, -0x30, -0xa, -0x80, -0x50, -0x52, -0x51, -0x30, -0x14, -0xf, -0x5f, -0x43, -0x52, -0x53, -0x0, -0xa4, -0x49, -0x51, -0x43, -0x52, -0x50, -0x52, -0x51, -0x30, -0x14, -0x17, -0x5f, -0x53, -0x52, -0x53, -0x1, -0x8a, -0x68, -0xa, -0x5, -0x50, -0x52, -0x52, -0x49, -0x70, -0x50, -0x52, -0x52, -0x49, -0x50, -0x52, -0x51, -0x30, -0x5b, -0x82, -0x4c, -0x7, -0x4c, -0x4e, -0x4b, -0x42, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xc, -0xf, -0x8, -0x5f, -0x55, -0x49, -0x44, -0x1, -0x8, -0x5f, -0x50, -0x52, -0x53, -0x11, -0x16, -0xa, -0x13, -0x89, -0xe, -0x0, -0x9, -0x3, -0x5, -0x0, -0x0, -0x0, -0xa, -0x0, -0x0, -0x0, -0xb, -0x0, -0x0, -0x0, -0x79, -0x0, -0x14, -0xf, -0x5f, -0x53, -0x54, -0x41, -0x0, -0xa4, -0x49, -0x51, -0x53, -0x54, -0x50, -0x52, -0x51, -0x31, -0x14, -0x11, -0x5f, -0x44, -0x49, -0x53, -0x0, -0x7d, -0x50, -0x52, -0x51, -0x31, -0xa, -0x80, -0x50, -0x52, -0x51, -0x31, -0x14, -0xf, -0x5f, -0x43, -0x52, -0x53, -0x0, -0xa4, -0x49, -0x51, -0x43, -0x52, -0x50, -0x52, -0x51, -0x31, -0x14, -0x17, -0x5f, -0x53, -0x52, -0x53, -0x1, -0x8a, -0x68, -0xa, -0x5, -0x50, -0x52, -0x52, -0x49, -0x70, -0x50, -0x52, -0x52, -0x49, -0x50, -0x52, -0x51, -0x31, -0x5b, -0x82, -0x4d, -0x7, -0x4c, -0x4e, -0x4b, -0x43, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xc, -0xf, -0x8, -0x5f, -0x55, -0x49, -0x44, -0xa, -0x2, -0x8, -0x5f, -0x50, -0x52, -0x53, -0x11, -0x16, -0xa, -0x13, -0x89, -0xe, -0x0, -0x9, -0x3, -0x5, -0x0, -0x0, -0x0, -0xa, -0x0, -0x0, -0x0, -0xb, -0x0, -0x0, -0x0, -0x79, -0x0, -0x14, -0xf, -0x5f, -0x53, -0x54, -0x41, -0x0, -0xa4, -0x49, -0x51, -0x53, -0x54, -0x50, -0x52, -0x51, -0x32, -0x14, -0x11, -0x5f, -0x44, -0x49, -0x53, -0x0, -0x7d, -0x50, -0x52, -0x51, -0x32, -0xa, -0x80, -0x50, -0x52, -0x51, -0x32, -0x14, -0xf, -0x5f, -0x43, -0x52, -0x53, -0x0, -0xa4, -0x49, -0x51, -0x43, -0x52, -0x50, -0x52, -0x51, -0x32, -0x14, -0x17, -0x5f, -0x53, -0x52, -0x53, -0x1, -0x8a, -0x68, -0xa, -0x5, -0x50, -0x52, -0x52, -0x49, -0x70, -0x50, -0x52, -0x52, -0x49, -0x50, -0x52, -0x51, -0x32, -0x5b, -0x82, -0x4d, -0x7, -0x4c, -0x4e, -0x4b, -0x44, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xc, -0xf, -0x8, -0x5f, -0x55, -0x49, -0x44, -0xa, -0x3, -0x8, -0x5f, -0x50, -0x52, -0x53, -0x11, -0x16, -0xa, -0x13, -0x89, -0xe, -0x0, -0x9, -0x3, -0x5, -0x0, -0x0, -0x0, -0xa, -0x0, -0x0, -0x0, -0xb, -0x0, -0x0, -0x0, -0x79, -0x0, -0x14, -0xf, -0x5f, -0x53, -0x54, -0x41, -0x0, -0xa4, -0x49, -0x51, -0x53, -0x54, -0x50, -0x52, -0x51, -0x33, -0x14, -0x11, -0x5f, -0x44, -0x49, -0x53, -0x0, -0x7d, -0x50, -0x52, -0x51, -0x33, -0xa, -0x80, -0x50, -0x52, -0x51, -0x33, -0x14, -0xf, -0x5f, -0x43, -0x52, -0x53, -0x0, -0xa4, -0x49, -0x51, -0x43, -0x52, -0x50, -0x52, -0x51, -0x33, -0x14, -0x17, -0x5f, -0x53, -0x52, -0x53, -0x1, -0x8a, -0x68, -0xa, -0x5, -0x50, -0x52, -0x52, -0x49, -0x70, -0x50, -0x52, -0x52, -0x49, -0x50, -0x52, -0x51, -0x33, -0x5b, -0x82, -0x4f, -0x4, -0x4c, -0x4e, -0x4b, -0x53, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xc, -0xf, -0x8, -0x5f, -0x55, -0x49, -0x44, -0xa, -0x4, -0x8, -0x5f, -0x50, -0x52, -0x53, -0x11, -0xe, -0xa, -0xb, -0x89, -0x6, -0x0, -0x9, -0x1, -0x9, -0x0, -0x0, -0x0, -0x79, -0x0, -0x14, -0x9, -0x5f, -0x53, -0x54, -0x41, -0x0, -0xa4, -0xa, -0xb, -0x14, -0x6, -0x5f, -0x44, -0x49, -0x53, -0x0, -0x14, -0xb, -0x5f, -0x43, -0x52, -0x53, -0x0, -0xa4, -0x5f, -0x50, -0x52, -0x53, -0x14, -0x6, -0x5f, -0x53, -0x52, -0x53, -0x1, -0x10, -0x4d, -0xc, -0x5f, -0x53, -0x42, -0x5f, -0x14, -0x35, -0x43, -0x50, -0x4d, -0x41, -0x1, -0x70, -0x83, -0x88, -0x43, -0x50, -0x4f, -0x4e, -0x68, -0x0, -0x60, -0x70, -0x11, -0xb, -0xa, -0x8, -0x0, -0x8, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x61, -0x70, -0x68, -0x88, -0x61, -0xa, -0x2, -0x0, -0x70, -0x68, -0x88, -0x61, -0xa, -0x3, -0x0, -0x70, -0x60, -0x88, -0x61, -0xa, -0x4, -0x0, -0xa4, -0x61, -0x14, -0x1a, -0x43, -0x50, -0x53, -0x54, -0x1, -0x70, -0x83, -0x88, -0x43, -0x50, -0x4f, -0x4e, -0x68, -0x0, -0x60, -0xa0, -0x5, -0x60, -0xa4, -0xa, -0xf, -0xa1, -0x3, -0xa4, -0x0, -0x14, -0xa, -0x43, -0x50, -0x45, -0x4a, -0x2, -0x5b, -0x22, -0xa, -0xc8, -0x14, -0x4a, -0x6, -0x50, -0x52, -0x53, -0x43, -0x0, -0x70, -0x50, -0x52, -0x53, -0x5f, -0x65, -0x70, -0x0, -0x62, -0x70, -0x0, -0x60, -0xa2, -0x46, -0x5, -0x95, -0x60, -0x87, -0x43, -0x50, -0x4f, -0x4e, -0x70, -0x83, -0x88, -0x43, -0x50, -0x4f, -0x4e, -0x60, -0x0, -0x61, -0xa0, -0xa, -0x7b, -0x60, -0xa, -0x7, -0x0, -0x7a, -0x62, -0x1, -0x62, -0xa1, -0xc, -0x70, -0x83, -0x88, -0x65, -0x7a, -0x60, -0xa, -0x3, -0x0, -0x0, -0x62, -0x70, -0x7b, -0x62, -0x1, -0x0, -0x63, -0xa0, -0x22, -0x92, -0x93, -0x61, -0x63, -0x70, -0x63, -0x88, -0x43, -0x50, -0x4f, -0x4e, -0x60, -0x0, -0xa0, -0xa, -0x93, -0x63, -0x1, -0x4e, -0x54, -0x46, -0x59, -0x60, -0x1, -0xa1, -0x8, -0x4e, -0x54, -0x46, -0x59, -0x60, -0xa, -0x3, -0x75, -0x60, -0x10, -0x44, -0x2a, -0x2e, -0x5f, -0x53, -0x42, -0x5f, -0x50, -0x43, -0x49, -0x30, -0x5b, -0x82, -0x47, -0x29, -0x4d, -0x48, -0x50, -0x44, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xd, -0x50, -0x4e, -0x50, -0x30, -0x41, -0x30, -0x36, -0x0, -0x8, -0x5f, -0x55, -0x49, -0x44, -0xd, -0x4d, -0x65, -0x6d, -0x6f, -0x72, -0x79, -0x20, -0x68, -0x6f, -0x74, -0x70, -0x6c, -0x75, -0x67, -0x20, -0x72, -0x65, -0x73, -0x6f, -0x75, -0x72, -0x63, -0x65, -0x73, -0x0, -0x14, -0x13, -0x5f, -0x53, -0x54, -0x41, -0x0, -0xa0, -0x9, -0x93, -0x4d, -0x44, -0x4e, -0x52, -0x0, -0xa4, -0x0, -0xa4, -0xa, -0xb, -0x5b, -0x1, -0x4d, -0x4c, -0x43, -0x4b, -0x0, -0x14, -0x4a, -0x4, -0x4d, -0x53, -0x43, -0x4e, -0x0, -0xa0, -0x9, -0x93, -0x4d, -0x44, -0x4e, -0x52, -0x0, -0xa4, -0x0, -0x70, -0x0, -0x60, -0x5b, -0x23, -0x4d, -0x4c, -0x43, -0x4b, -0xff, -0xff, -0xa2, -0x25, -0x95, -0x60, -0x4d, -0x44, -0x4e, -0x52, -0x70, -0x60, -0x4d, -0x53, -0x45, -0x4c, -0xa0, -0x13, -0x93, -0x4d, -0x49, -0x4e, -0x53, -0x1, -0x4d, -0x54, -0x46, -0x59, -0x60, -0x1, -0x70, -0x1, -0x4d, -0x49, -0x4e, -0x53, -0x72, -0x60, -0x1, -0x60, -0x5b, -0x27, -0x4d, -0x4c, -0x43, -0x4b, -0xa4, -0x1, -0x14, -0x2d, -0x4d, -0x52, -0x53, -0x54, -0x1, -0x70, -0x0, -0x60, -0x5b, -0x23, -0x4d, -0x4c, -0x43, -0x4b, -0xff, -0xff, -0x70, -0x99, -0x68, -0x0, -0x4d, -0x53, -0x45, -0x4c, -0xa0, -0xb, -0x93, -0x4d, -0x45, -0x53, -0x5f, -0x1, -0x70, -0xa, -0xf, -0x60, -0x5b, -0x27, -0x4d, -0x4c, -0x43, -0x4b, -0xa4, -0x60, -0x14, -0x41, -0x18, -0x4d, -0x43, -0x52, -0x53, -0x9, -0x5b, -0x23, -0x4d, -0x4c, -0x43, -0x4b, -0xff, -0xff, -0x70, -0x99, -0x68, -0x0, -0x4d, -0x53, -0x45, -0x4c, -0x8, -0x4d, -0x52, -0x36, -0x34, -0x11, -0x33, -0xa, -0x30, -0x8a, -0x2b, -0x0, -0x0, -0xc, -0x3, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0xfe, -0xff, -0xff, -0xff, -0xff, -0xff, -0xff, -0xff, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0xff, -0xff, -0xff, -0xff, -0xff, -0xff, -0xff, -0xff, -0x79, -0x0, -0x8a, -0x4d, -0x52, -0x36, -0x34, -0xa, -0xe, -0x4d, -0x49, -0x4e, -0x4c, -0x8a, -0x4d, -0x52, -0x36, -0x34, -0xa, -0x12, -0x4d, -0x49, -0x4e, -0x48, -0x8a, -0x4d, -0x52, -0x36, -0x34, -0xa, -0x26, -0x4c, -0x45, -0x4e, -0x4c, -0x8a, -0x4d, -0x52, -0x36, -0x34, -0xa, -0x2a, -0x4c, -0x45, -0x4e, -0x48, -0x8a, -0x4d, -0x52, -0x36, -0x34, -0xa, -0x16, -0x4d, -0x41, -0x58, -0x4c, -0x8a, -0x4d, -0x52, -0x36, -0x34, -0xa, -0x1a, -0x4d, -0x41, -0x58, -0x48, -0x70, -0x4d, -0x52, -0x42, -0x48, -0x4d, -0x49, -0x4e, -0x48, -0x70, -0x4d, -0x52, -0x42, -0x4c, -0x4d, -0x49, -0x4e, -0x4c, -0x70, -0x4d, -0x52, -0x4c, -0x48, -0x4c, -0x45, -0x4e, -0x48, -0x70, -0x4d, -0x52, -0x4c, -0x4c, -0x4c, -0x45, -0x4e, -0x4c, -0x72, -0x4d, -0x49, -0x4e, -0x4c, -0x4c, -0x45, -0x4e, -0x4c, -0x4d, -0x41, -0x58, -0x4c, -0x72, -0x4d, -0x49, -0x4e, -0x48, -0x4c, -0x45, -0x4e, -0x48, -0x4d, -0x41, -0x58, -0x48, -0xa0, -0x14, -0x95, -0x4d, -0x41, -0x58, -0x4c, -0x4d, -0x49, -0x4e, -0x4c, -0x72, -0x4d, -0x41, -0x58, -0x48, -0x1, -0x4d, -0x41, -0x58, -0x48, -0xa0, -0x11, -0x95, -0x4d, -0x41, -0x58, -0x4c, -0x1, -0x74, -0x4d, -0x41, -0x58, -0x48, -0x1, -0x4d, -0x41, -0x58, -0x48, -0x74, -0x4d, -0x41, -0x58, -0x4c, -0x1, -0x4d, -0x41, -0x58, -0x4c, -0xa0, -0x44, -0x7, -0x93, -0x4d, -0x41, -0x58, -0x48, -0x0, -0x8, -0x4d, -0x52, -0x33, -0x32, -0x11, -0x1f, -0xa, -0x1c, -0x87, -0x17, -0x0, -0x0, -0xc, -0x3, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0xfe, -0xff, -0xff, -0xff, -0x0, -0x0, -0x0, -0x0, -0xff, -0xff, -0xff, -0xff, -0x79, -0x0, -0x8a, -0x4d, -0x52, -0x33, -0x32, -0xa, -0xa, -0x4d, -0x49, -0x4e, -0x5f, -0x8a, -0x4d, -0x52, -0x33, -0x32, -0xa, -0xe, -0x4d, -0x41, -0x58, -0x5f, -0x8a, -0x4d, -0x52, -0x33, -0x32, -0xa, -0x16, -0x4c, -0x45, -0x4e, -0x5f, -0x70, -0x4d, -0x49, -0x4e, -0x4c, -0x4d, -0x49, -0x4e, -0x5f, -0x70, -0x4d, -0x41, -0x58, -0x4c, -0x4d, -0x41, -0x58, -0x5f, -0x70, -0x4c, -0x45, -0x4e, -0x4c, -0x4c, -0x45, -0x4e, -0x5f, -0x5b, -0x27, -0x4d, -0x4c, -0x43, -0x4b, -0xa4, -0x4d, -0x52, -0x33, -0x32, -0x5b, -0x27, -0x4d, -0x4c, -0x43, -0x4b, -0xa4, -0x4d, -0x52, -0x36, -0x34, -0x14, -0x24, -0x4d, -0x50, -0x58, -0x4d, -0x1, -0x5b, -0x23, -0x4d, -0x4c, -0x43, -0x4b, -0xff, -0xff, -0x70, -0x99, -0x68, -0x0, -0x4d, -0x53, -0x45, -0x4c, -0x70, -0x4d, -0x50, -0x58, -0x5f, -0x60, -0x5b, -0x27, -0x4d, -0x4c, -0x43, -0x4b, -0xa4, -0x60, -0x14, -0x28, -0x4d, -0x4f, -0x53, -0x54, -0x4, -0x5b, -0x23, -0x4d, -0x4c, -0x43, -0x4b, -0xff, -0xff, -0x70, -0x99, -0x68, -0x0, -0x4d, -0x53, -0x45, -0x4c, -0x70, -0x69, -0x4d, -0x4f, -0x45, -0x56, -0x70, -0x6a, -0x4d, -0x4f, -0x53, -0x43, -0x5b, -0x27, -0x4d, -0x4c, -0x43, -0x4b, -0x10, -0x45, -0xd, -0x5f, -0x47, -0x50, -0x45, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xd, -0x41, -0x43, -0x50, -0x49, -0x30, -0x30, -0x30, -0x36, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x30, -0x0, -0x14, -0x39, -0x5f, -0x45, -0x30, -0x31, -0x0, -0x5b, -0x23, -0x5c, -0x2f, -0x3, -0x5f, -0x53, -0x42, -0x5f, -0x50, -0x43, -0x49, -0x30, -0x42, -0x4c, -0x43, -0x4b, -0xff, -0xff, -0x5c, -0x2f, -0x3, -0x5f, -0x53, -0x42, -0x5f, -0x50, -0x43, -0x49, -0x30, -0x50, -0x43, -0x4e, -0x54, -0x5b, -0x27, -0x5c, -0x2f, -0x3, -0x5f, -0x53, -0x42, -0x5f, -0x50, -0x43, -0x49, -0x30, -0x42, -0x4c, -0x43, -0x4b, -0x14, -0x10, -0x5f, -0x45, -0x30, -0x32, -0x0, -0x5c, -0x2e, -0x5f, -0x53, -0x42, -0x5f, -0x50, -0x52, -0x53, -0x43, -0x14, -0x19, -0x5f, -0x45, -0x30, -0x33, -0x0, -0x5c, -0x2f, -0x4, -0x5f, -0x53, -0x42, -0x5f, -0x50, -0x43, -0x49, -0x30, -0x4d, -0x48, -0x50, -0x44, -0x4d, -0x53, -0x43, -0x4e, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x34, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x35, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x36, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x37, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x38, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x39, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x41, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x42, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x43, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x44, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x45, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x46, -0x0 -}; diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl deleted file mode 100644 index 3ecdb50..0000000 --- a/hw/i386/q35-acpi-dsdt.dsl +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Bochs/QEMU ACPI DSDT ASL definition - * - * Copyright (c) 2006 Fabrice Bellard - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License version 2 as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -/* - * Copyright (c) 2010 Isaku Yamahata - * yamahata at valinux co jp - * Based on acpi-dsdt.dsl, but heavily modified for q35 chipset. - */ - - -ACPI_EXTRACT_ALL_CODE Q35AcpiDsdtAmlCode - -DefinitionBlock ( - "q35-acpi-dsdt.aml",// Output Filename - "DSDT", // Signature - 0x01, // DSDT Compliance Revision - "BXPC", // OEMID - "BXDSDT", // TABLE ID - 0x2 // OEM Revision - ) -{ - - Scope(\_SB) { - } -} diff --git a/hw/i386/q35-acpi-dsdt.hex.generated b/hw/i386/q35-acpi-dsdt.hex.generated deleted file mode 100644 index ed9a2cc..0000000 --- a/hw/i386/q35-acpi-dsdt.hex.generated +++ /dev/null @@ -1,7610 +0,0 @@ -static unsigned char Q35AcpiDsdtAmlCode[] = { -0x44, -0x53, -0x44, -0x54, -0xb8, -0x1d, -0x0, -0x0, -0x1, -0x35, -0x42, -0x58, -0x50, -0x43, -0x0, -0x0, -0x42, -0x58, -0x44, -0x53, -0x44, -0x54, -0x0, -0x0, -0x2, -0x0, -0x0, -0x0, -0x49, -0x4e, -0x54, -0x4c, -0x7, -0x11, -0x14, -0x20, -0x10, -0x49, -0x4, -0x5c, -0x0, -0x5b, -0x80, -0x44, -0x42, -0x47, -0x5f, -0x1, -0xb, -0x2, -0x4, -0x1, -0x5b, -0x81, -0xb, -0x44, -0x42, -0x47, -0x5f, -0x1, -0x44, -0x42, -0x47, -0x42, -0x8, -0x14, -0x2c, -0x44, -0x42, -0x55, -0x47, -0x1, -0x98, -0x68, -0x60, -0x96, -0x60, -0x60, -0x74, -0x87, -0x60, -0x1, -0x61, -0x70, -0x0, -0x62, -0xa2, -0x10, -0x95, -0x62, -0x61, -0x70, -0x83, -0x88, -0x60, -0x62, -0x0, -0x44, -0x42, -0x47, -0x42, -0x75, -0x62, -0x70, -0xa, -0xa, -0x44, -0x42, -0x47, -0x42, -0x10, -0x29, -0x5f, -0x53, -0x42, -0x5f, -0x5b, -0x80, -0x50, -0x43, -0x53, -0x54, -0x1, -0xb, -0x0, -0xae, -0xa, -0xc, -0x5b, -0x80, -0x50, -0x43, -0x53, -0x42, -0x1, -0xb, -0xc, -0xae, -0x1, -0x5b, -0x81, -0xb, -0x50, -0x43, -0x53, -0x42, -0x40, -0x50, -0x43, -0x49, -0x42, -0x8, -0x10, -0x4f, -0xc, -0x5f, -0x53, -0x42, -0x5f, -0x5b, -0x82, -0x47, -0xc, -0x50, -0x43, -0x49, -0x30, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xa, -0x8, -0x8, -0x5f, -0x43, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xa, -0x3, -0x8, -0x5f, -0x41, -0x44, -0x52, -0x0, -0x8, -0x5f, -0x55, -0x49, -0x44, -0x1, -0x8, -0x53, -0x55, -0x50, -0x50, -0x0, -0x8, -0x43, -0x54, -0x52, -0x4c, -0x0, -0x14, -0x44, -0x9, -0x5f, -0x4f, -0x53, -0x43, -0x4, -0x8a, -0x6b, -0x0, -0x43, -0x44, -0x57, -0x31, -0xa0, -0x46, -0x7, -0x93, -0x68, -0x11, -0x13, -0xa, -0x10, -0x5b, -0x4d, -0xdb, -0x33, -0xf7, -0x1f, -0x1c, -0x40, -0x96, -0x57, -0x74, -0x41, -0xc0, -0x3d, -0xd7, -0x66, -0x8a, -0x6b, -0xa, -0x4, -0x43, -0x44, -0x57, -0x32, -0x8a, -0x6b, -0xa, -0x8, -0x43, -0x44, -0x57, -0x33, -0x70, -0x43, -0x44, -0x57, -0x32, -0x53, -0x55, -0x50, -0x50, -0x70, -0x43, -0x44, -0x57, -0x33, -0x43, -0x54, -0x52, -0x4c, -0x7b, -0x43, -0x54, -0x52, -0x4c, -0xa, -0x1d, -0x43, -0x54, -0x52, -0x4c, -0xa0, -0x10, -0x92, -0x93, -0x69, -0x1, -0x7d, -0x43, -0x44, -0x57, -0x31, -0xa, -0x8, -0x43, -0x44, -0x57, -0x31, -0xa0, -0x16, -0x92, -0x93, -0x43, -0x44, -0x57, -0x33, -0x43, -0x54, -0x52, -0x4c, -0x7d, -0x43, -0x44, -0x57, -0x31, -0xa, -0x10, -0x43, -0x44, -0x57, -0x31, -0x70, -0x43, -0x54, -0x52, -0x4c, -0x43, -0x44, -0x57, -0x33, -0xa1, -0xc, -0x7d, -0x43, -0x44, -0x57, -0x31, -0xa, -0x4, -0x43, -0x44, -0x57, -0x31, -0xa4, -0x6b, -0x10, -0x4d, -0x8, -0x5f, -0x53, -0x42, -0x5f, -0x5b, -0x82, -0x45, -0x8, -0x48, -0x50, -0x45, -0x54, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0x1, -0x3, -0x8, -0x5f, -0x55, -0x49, -0x44, -0x0, -0x5b, -0x80, -0x48, -0x50, -0x54, -0x4d, -0x0, -0xc, -0x0, -0x0, -0xd0, -0xfe, -0xb, -0x0, -0x4, -0x5b, -0x81, -0x10, -0x48, -0x50, -0x54, -0x4d, -0x13, -0x56, -0x45, -0x4e, -0x44, -0x20, -0x50, -0x52, -0x44, -0x5f, -0x20, -0x14, -0x36, -0x5f, -0x53, -0x54, -0x41, -0x0, -0x70, -0x56, -0x45, -0x4e, -0x44, -0x60, -0x70, -0x50, -0x52, -0x44, -0x5f, -0x61, -0x7a, -0x60, -0xa, -0x10, -0x60, -0xa0, -0xc, -0x91, -0x93, -0x60, -0x0, -0x93, -0x60, -0xb, -0xff, -0xff, -0xa4, -0x0, -0xa0, -0xe, -0x91, -0x93, -0x61, -0x0, -0x94, -0x61, -0xc, -0x0, -0xe1, -0xf5, -0x5, -0xa4, -0x0, -0xa4, -0xa, -0xf, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0x11, -0xa, -0xe, -0x86, -0x9, -0x0, -0x0, -0x0, -0x0, -0xd0, -0xfe, -0x0, -0x4, -0x0, -0x0, -0x79, -0x0, -0x10, -0x4c, -0x7, -0x2e, -0x5f, -0x53, -0x42, -0x5f, -0x50, -0x43, -0x49, -0x30, -0x5b, -0x82, -0x4f, -0x6, -0x49, -0x53, -0x41, -0x5f, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x1f, -0x0, -0x5b, -0x80, -0x50, -0x49, -0x52, -0x51, -0x2, -0xa, -0x60, -0xa, -0xc, -0x5b, -0x80, -0x4c, -0x50, -0x43, -0x44, -0x2, -0xa, -0x80, -0xa, -0x2, -0x5b, -0x81, -0x20, -0x4c, -0x50, -0x43, -0x44, -0x0, -0x43, -0x4f, -0x4d, -0x41, -0x3, -0x0, -0x1, -0x43, -0x4f, -0x4d, -0x42, -0x3, -0x0, -0x1, -0x4c, -0x50, -0x54, -0x44, -0x2, -0x0, -0x2, -0x46, -0x44, -0x43, -0x44, -0x2, -0x5b, -0x80, -0x4c, -0x50, -0x43, -0x45, -0x2, -0xa, -0x82, -0xa, -0x2, -0x5b, -0x81, -0x1a, -0x4c, -0x50, -0x43, -0x45, -0x0, -0x43, -0x41, -0x45, -0x4e, -0x1, -0x43, -0x42, -0x45, -0x4e, -0x1, -0x4c, -0x50, -0x45, -0x4e, -0x1, -0x46, -0x44, -0x45, -0x4e, -0x1, -0x10, -0x4c, -0x1b, -0x2f, -0x3, -0x5f, -0x53, -0x42, -0x5f, -0x50, -0x43, -0x49, -0x30, -0x49, -0x53, -0x41, -0x5f, -0x5b, -0x82, -0x2d, -0x52, -0x54, -0x43, -0x5f, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xb, -0x0, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0x18, -0xa, -0x15, -0x47, -0x1, -0x70, -0x0, -0x70, -0x0, -0x10, -0x2, -0x22, -0x0, -0x1, -0x47, -0x1, -0x72, -0x0, -0x72, -0x0, -0x2, -0x6, -0x79, -0x0, -0x5b, -0x82, -0x37, -0x4b, -0x42, -0x44, -0x5f, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0x3, -0x3, -0x14, -0x9, -0x5f, -0x53, -0x54, -0x41, -0x0, -0xa4, -0xa, -0xf, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0x18, -0xa, -0x15, -0x47, -0x1, -0x60, -0x0, -0x60, -0x0, -0x1, -0x1, -0x47, -0x1, -0x64, -0x0, -0x64, -0x0, -0x1, -0x1, -0x22, -0x2, -0x0, -0x79, -0x0, -0x5b, -0x82, -0x27, -0x4d, -0x4f, -0x55, -0x5f, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xf, -0x13, -0x14, -0x9, -0x5f, -0x53, -0x54, -0x41, -0x0, -0xa4, -0xa, -0xf, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0x8, -0xa, -0x5, -0x22, -0x0, -0x10, -0x79, -0x0, -0x5b, -0x82, -0x4a, -0x4, -0x46, -0x44, -0x43, -0x30, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0x7, -0x0, -0x14, -0x18, -0x5f, -0x53, -0x54, -0x41, -0x0, -0x70, -0x46, -0x44, -0x45, -0x4e, -0x60, -0xa0, -0x6, -0x93, -0x60, -0x0, -0xa4, -0x0, -0xa1, -0x4, -0xa4, -0xa, -0xf, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0x1b, -0xa, -0x18, -0x47, -0x1, -0xf2, -0x3, -0xf2, -0x3, -0x0, -0x4, -0x47, -0x1, -0xf7, -0x3, -0xf7, -0x3, -0x0, -0x1, -0x22, -0x40, -0x0, -0x2a, -0x4, -0x0, -0x79, -0x0, -0x5b, -0x82, -0x3e, -0x4c, -0x50, -0x54, -0x5f, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0x4, -0x0, -0x14, -0x18, -0x5f, -0x53, -0x54, -0x41, -0x0, -0x70, -0x4c, -0x50, -0x45, -0x4e, -0x60, -0xa0, -0x6, -0x93, -0x60, -0x0, -0xa4, -0x0, -0xa1, -0x4, -0xa4, -0xa, -0xf, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0x10, -0xa, -0xd, -0x47, -0x1, -0x78, -0x3, -0x78, -0x3, -0x8, -0x8, -0x22, -0x80, -0x0, -0x79, -0x0, -0x5b, -0x82, -0x45, -0x4, -0x43, -0x4f, -0x4d, -0x31, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0x5, -0x1, -0x8, -0x5f, -0x55, -0x49, -0x44, -0x1, -0x14, -0x18, -0x5f, -0x53, -0x54, -0x41, -0x0, -0x70, -0x43, -0x41, -0x45, -0x4e, -0x60, -0xa0, -0x6, -0x93, -0x60, -0x0, -0xa4, -0x0, -0xa1, -0x4, -0xa4, -0xa, -0xf, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0x10, -0xa, -0xd, -0x47, -0x1, -0xf8, -0x3, -0xf8, -0x3, -0x0, -0x8, -0x22, -0x10, -0x0, -0x79, -0x0, -0x5b, -0x82, -0x46, -0x4, -0x43, -0x4f, -0x4d, -0x32, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0x5, -0x1, -0x8, -0x5f, -0x55, -0x49, -0x44, -0xa, -0x2, -0x14, -0x18, -0x5f, -0x53, -0x54, -0x41, -0x0, -0x70, -0x43, -0x42, -0x45, -0x4e, -0x60, -0xa0, -0x6, -0x93, -0x60, -0x0, -0xa4, -0x0, -0xa1, -0x4, -0xa4, -0xa, -0xf, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0x10, -0xa, -0xd, -0x47, -0x1, -0xf8, -0x2, -0xf8, -0x2, -0x0, -0x8, -0x22, -0x8, -0x0, -0x79, -0x0, -0x8, -0x50, -0x49, -0x43, -0x46, -0x0, -0x14, -0xc, -0x5f, -0x50, -0x49, -0x43, -0x1, -0x70, -0x68, -0x50, -0x49, -0x43, -0x46, -0x10, -0x8e, -0x55, -0x1, -0x5f, -0x53, -0x42, -0x5f, -0x10, -0x43, -0xea, -0x50, -0x43, -0x49, -0x30, -0x8, -0x50, -0x52, -0x54, -0x50, -0x12, -0x4b, -0x73, -0x80, -0x12, -0xb, -0x4, -0xb, -0xff, -0xff, -0x0, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xb, -0x4, -0xb, -0xff, -0xff, -0x1, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xc, -0x4, -0xb, -0xff, -0xff, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xc, -0x4, -0xb, -0xff, -0xff, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x2, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x2, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x2, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x2, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x3, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x3, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x3, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x3, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x4, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x4, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x4, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x4, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x5, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x5, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x5, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x5, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x6, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x6, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x6, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x6, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x7, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x7, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x7, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x7, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x8, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x8, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x8, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x8, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x9, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x9, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x9, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x9, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xa, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xa, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xa, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xa, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xb, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xb, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xb, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xb, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xc, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xc, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xc, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xc, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xd, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xd, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xd, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xd, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xe, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xe, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xe, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xe, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xf, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xf, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xf, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xf, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x10, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x10, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x10, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x10, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x11, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x11, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x11, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x11, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x12, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x12, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x12, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x12, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x13, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x13, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x13, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x13, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x14, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x14, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x14, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x14, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x15, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x15, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x15, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x15, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x16, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x16, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x16, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x16, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x17, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x17, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x17, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x17, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x18, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x18, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x18, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x18, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x19, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x41, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x19, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x42, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x19, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x43, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x19, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x44, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1a, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x41, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1a, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x42, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1a, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x43, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1a, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x44, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1b, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x41, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1b, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x42, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1b, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x43, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1b, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x44, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1c, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x41, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1c, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x42, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1c, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x43, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1c, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x44, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1d, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x41, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1d, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x42, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1d, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x43, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1d, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x44, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1e, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1e, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1e, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1e, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1f, -0x0, -0x0, -0x4c, -0x4e, -0x4b, -0x41, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1f, -0x0, -0x1, -0x4c, -0x4e, -0x4b, -0x42, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1f, -0x0, -0xa, -0x2, -0x4c, -0x4e, -0x4b, -0x43, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1f, -0x0, -0xa, -0x3, -0x4c, -0x4e, -0x4b, -0x44, -0x0, -0x8, -0x50, -0x52, -0x54, -0x41, -0x12, -0x4b, -0x73, -0x80, -0x12, -0xb, -0x4, -0xb, -0xff, -0xff, -0x0, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xb, -0x4, -0xb, -0xff, -0xff, -0x1, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xc, -0x4, -0xb, -0xff, -0xff, -0xa, -0x2, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xc, -0x4, -0xb, -0xff, -0xff, -0xa, -0x3, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1, -0x0, -0x0, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1, -0x0, -0x1, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x2, -0x0, -0x0, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x2, -0x0, -0x1, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x2, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x2, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x3, -0x0, -0x0, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x3, -0x0, -0x1, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x3, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x3, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x4, -0x0, -0x0, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x4, -0x0, -0x1, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x4, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x4, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x5, -0x0, -0x0, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x5, -0x0, -0x1, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x5, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x5, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x6, -0x0, -0x0, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x6, -0x0, -0x1, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x6, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x6, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x7, -0x0, -0x0, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x7, -0x0, -0x1, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x7, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x7, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x8, -0x0, -0x0, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x8, -0x0, -0x1, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x8, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x8, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x9, -0x0, -0x0, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x9, -0x0, -0x1, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x9, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x9, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xa, -0x0, -0x0, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xa, -0x0, -0x1, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xa, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xa, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xb, -0x0, -0x0, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xb, -0x0, -0x1, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xb, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xb, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xc, -0x0, -0x0, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xc, -0x0, -0x1, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xc, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xc, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xd, -0x0, -0x0, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xd, -0x0, -0x1, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xd, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xd, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xe, -0x0, -0x0, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xe, -0x0, -0x1, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xe, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xe, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xf, -0x0, -0x0, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0xf, -0x0, -0x1, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xf, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0xf, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x10, -0x0, -0x0, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x10, -0x0, -0x1, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x10, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x10, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x11, -0x0, -0x0, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x11, -0x0, -0x1, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x11, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x11, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x12, -0x0, -0x0, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x12, -0x0, -0x1, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x12, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x12, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x13, -0x0, -0x0, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x13, -0x0, -0x1, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x13, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x13, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x14, -0x0, -0x0, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x14, -0x0, -0x1, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x14, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x14, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x15, -0x0, -0x0, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x15, -0x0, -0x1, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x15, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x15, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x16, -0x0, -0x0, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x16, -0x0, -0x1, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x16, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x16, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x17, -0x0, -0x0, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x17, -0x0, -0x1, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x17, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x17, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x18, -0x0, -0x0, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x18, -0x0, -0x1, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x18, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x18, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x19, -0x0, -0x0, -0x47, -0x53, -0x49, -0x41, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x19, -0x0, -0x1, -0x47, -0x53, -0x49, -0x42, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x19, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x43, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x19, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x44, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1a, -0x0, -0x0, -0x47, -0x53, -0x49, -0x41, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1a, -0x0, -0x1, -0x47, -0x53, -0x49, -0x42, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1a, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x43, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1a, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x44, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1b, -0x0, -0x0, -0x47, -0x53, -0x49, -0x41, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1b, -0x0, -0x1, -0x47, -0x53, -0x49, -0x42, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1b, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x43, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1b, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x44, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1c, -0x0, -0x0, -0x47, -0x53, -0x49, -0x41, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1c, -0x0, -0x1, -0x47, -0x53, -0x49, -0x42, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1c, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x43, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1c, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x44, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1d, -0x0, -0x0, -0x47, -0x53, -0x49, -0x41, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1d, -0x0, -0x1, -0x47, -0x53, -0x49, -0x42, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1d, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x43, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1d, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x44, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1e, -0x0, -0x0, -0x47, -0x53, -0x49, -0x45, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1e, -0x0, -0x1, -0x47, -0x53, -0x49, -0x46, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1e, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x47, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1e, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x48, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1f, -0x0, -0x0, -0x47, -0x53, -0x49, -0x41, -0x0, -0x12, -0xd, -0x4, -0xc, -0xff, -0xff, -0x1f, -0x0, -0x1, -0x47, -0x53, -0x49, -0x42, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1f, -0x0, -0xa, -0x2, -0x47, -0x53, -0x49, -0x43, -0x0, -0x12, -0xe, -0x4, -0xc, -0xff, -0xff, -0x1f, -0x0, -0xa, -0x3, -0x47, -0x53, -0x49, -0x44, -0x0, -0x14, -0x1a, -0x5f, -0x50, -0x52, -0x54, -0x0, -0xa0, -0xc, -0x93, -0x50, -0x49, -0x43, -0x46, -0x0, -0xa4, -0x50, -0x52, -0x54, -0x50, -0xa1, -0x6, -0xa4, -0x50, -0x52, -0x54, -0x41, -0x5b, -0x81, -0x3a, -0x2f, -0x3, -0x50, -0x43, -0x49, -0x30, -0x49, -0x53, -0x41, -0x5f, -0x50, -0x49, -0x52, -0x51, -0x1, -0x50, -0x52, -0x51, -0x41, -0x8, -0x50, -0x52, -0x51, -0x42, -0x8, -0x50, -0x52, -0x51, -0x43, -0x8, -0x50, -0x52, -0x51, -0x44, -0x8, -0x0, -0x20, -0x50, -0x52, -0x51, -0x45, -0x8, -0x50, -0x52, -0x51, -0x46, -0x8, -0x50, -0x52, -0x51, -0x47, -0x8, -0x50, -0x52, -0x51, -0x48, -0x8, -0x14, -0x13, -0x49, -0x51, -0x53, -0x54, -0x1, -0xa0, -0x9, -0x7b, -0xa, -0x80, -0x68, -0x0, -0xa4, -0xa, -0x9, -0xa4, -0xa, -0xb, -0x14, -0x34, -0x49, -0x51, -0x43, -0x52, -0x9, -0x8, -0x50, -0x52, -0x52, -0x30, -0x11, -0xe, -0xa, -0xb, -0x89, -0x6, -0x0, -0x9, -0x1, -0x0, -0x0, -0x0, -0x0, -0x79, -0x0, -0x8a, -0x50, -0x52, -0x52, -0x30, -0xa, -0x5, -0x50, -0x52, -0x52, -0x49, -0x70, -0x7b, -0x68, -0xa, -0xf, -0x0, -0x50, -0x52, -0x52, -0x49, -0xa4, -0x50, -0x52, -0x52, -0x30, -0x5b, -0x82, -0x4c, -0x7, -0x4c, -0x4e, -0x4b, -0x41, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xc, -0xf, -0x8, -0x5f, -0x55, -0x49, -0x44, -0x0, -0x8, -0x5f, -0x50, -0x52, -0x53, -0x11, -0x16, -0xa, -0x13, -0x89, -0xe, -0x0, -0x9, -0x3, -0x5, -0x0, -0x0, -0x0, -0xa, -0x0, -0x0, -0x0, -0xb, -0x0, -0x0, -0x0, -0x79, -0x0, -0x14, -0xf, -0x5f, -0x53, -0x54, -0x41, -0x0, -0xa4, -0x49, -0x51, -0x53, -0x54, -0x50, -0x52, -0x51, -0x41, -0x14, -0x11, -0x5f, -0x44, -0x49, -0x53, -0x0, -0x7d, -0x50, -0x52, -0x51, -0x41, -0xa, -0x80, -0x50, -0x52, -0x51, -0x41, -0x14, -0xf, -0x5f, -0x43, -0x52, -0x53, -0x0, -0xa4, -0x49, -0x51, -0x43, -0x52, -0x50, -0x52, -0x51, -0x41, -0x14, -0x17, -0x5f, -0x53, -0x52, -0x53, -0x1, -0x8a, -0x68, -0xa, -0x5, -0x50, -0x52, -0x52, -0x49, -0x70, -0x50, -0x52, -0x52, -0x49, -0x50, -0x52, -0x51, -0x41, -0x5b, -0x82, -0x4c, -0x7, -0x4c, -0x4e, -0x4b, -0x42, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xc, -0xf, -0x8, -0x5f, -0x55, -0x49, -0x44, -0x1, -0x8, -0x5f, -0x50, -0x52, -0x53, -0x11, -0x16, -0xa, -0x13, -0x89, -0xe, -0x0, -0x9, -0x3, -0x5, -0x0, -0x0, -0x0, -0xa, -0x0, -0x0, -0x0, -0xb, -0x0, -0x0, -0x0, -0x79, -0x0, -0x14, -0xf, -0x5f, -0x53, -0x54, -0x41, -0x0, -0xa4, -0x49, -0x51, -0x53, -0x54, -0x50, -0x52, -0x51, -0x42, -0x14, -0x11, -0x5f, -0x44, -0x49, -0x53, -0x0, -0x7d, -0x50, -0x52, -0x51, -0x42, -0xa, -0x80, -0x50, -0x52, -0x51, -0x42, -0x14, -0xf, -0x5f, -0x43, -0x52, -0x53, -0x0, -0xa4, -0x49, -0x51, -0x43, -0x52, -0x50, -0x52, -0x51, -0x42, -0x14, -0x17, -0x5f, -0x53, -0x52, -0x53, -0x1, -0x8a, -0x68, -0xa, -0x5, -0x50, -0x52, -0x52, -0x49, -0x70, -0x50, -0x52, -0x52, -0x49, -0x50, -0x52, -0x51, -0x42, -0x5b, -0x82, -0x4d, -0x7, -0x4c, -0x4e, -0x4b, -0x43, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xc, -0xf, -0x8, -0x5f, -0x55, -0x49, -0x44, -0xa, -0x2, -0x8, -0x5f, -0x50, -0x52, -0x53, -0x11, -0x16, -0xa, -0x13, -0x89, -0xe, -0x0, -0x9, -0x3, -0x5, -0x0, -0x0, -0x0, -0xa, -0x0, -0x0, -0x0, -0xb, -0x0, -0x0, -0x0, -0x79, -0x0, -0x14, -0xf, -0x5f, -0x53, -0x54, -0x41, -0x0, -0xa4, -0x49, -0x51, -0x53, -0x54, -0x50, -0x52, -0x51, -0x43, -0x14, -0x11, -0x5f, -0x44, -0x49, -0x53, -0x0, -0x7d, -0x50, -0x52, -0x51, -0x43, -0xa, -0x80, -0x50, -0x52, -0x51, -0x43, -0x14, -0xf, -0x5f, -0x43, -0x52, -0x53, -0x0, -0xa4, -0x49, -0x51, -0x43, -0x52, -0x50, -0x52, -0x51, -0x43, -0x14, -0x17, -0x5f, -0x53, -0x52, -0x53, -0x1, -0x8a, -0x68, -0xa, -0x5, -0x50, -0x52, -0x52, -0x49, -0x70, -0x50, -0x52, -0x52, -0x49, -0x50, -0x52, -0x51, -0x43, -0x5b, -0x82, -0x4d, -0x7, -0x4c, -0x4e, -0x4b, -0x44, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xc, -0xf, -0x8, -0x5f, -0x55, -0x49, -0x44, -0xa, -0x3, -0x8, -0x5f, -0x50, -0x52, -0x53, -0x11, -0x16, -0xa, -0x13, -0x89, -0xe, -0x0, -0x9, -0x3, -0x5, -0x0, -0x0, -0x0, -0xa, -0x0, -0x0, -0x0, -0xb, -0x0, -0x0, -0x0, -0x79, -0x0, -0x14, -0xf, -0x5f, -0x53, -0x54, -0x41, -0x0, -0xa4, -0x49, -0x51, -0x53, -0x54, -0x50, -0x52, -0x51, -0x44, -0x14, -0x11, -0x5f, -0x44, -0x49, -0x53, -0x0, -0x7d, -0x50, -0x52, -0x51, -0x44, -0xa, -0x80, -0x50, -0x52, -0x51, -0x44, -0x14, -0xf, -0x5f, -0x43, -0x52, -0x53, -0x0, -0xa4, -0x49, -0x51, -0x43, -0x52, -0x50, -0x52, -0x51, -0x44, -0x14, -0x17, -0x5f, -0x53, -0x52, -0x53, -0x1, -0x8a, -0x68, -0xa, -0x5, -0x50, -0x52, -0x52, -0x49, -0x70, -0x50, -0x52, -0x52, -0x49, -0x50, -0x52, -0x51, -0x44, -0x5b, -0x82, -0x4d, -0x7, -0x4c, -0x4e, -0x4b, -0x45, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xc, -0xf, -0x8, -0x5f, -0x55, -0x49, -0x44, -0xa, -0x4, -0x8, -0x5f, -0x50, -0x52, -0x53, -0x11, -0x16, -0xa, -0x13, -0x89, -0xe, -0x0, -0x9, -0x3, -0x5, -0x0, -0x0, -0x0, -0xa, -0x0, -0x0, -0x0, -0xb, -0x0, -0x0, -0x0, -0x79, -0x0, -0x14, -0xf, -0x5f, -0x53, -0x54, -0x41, -0x0, -0xa4, -0x49, -0x51, -0x53, -0x54, -0x50, -0x52, -0x51, -0x45, -0x14, -0x11, -0x5f, -0x44, -0x49, -0x53, -0x0, -0x7d, -0x50, -0x52, -0x51, -0x45, -0xa, -0x80, -0x50, -0x52, -0x51, -0x45, -0x14, -0xf, -0x5f, -0x43, -0x52, -0x53, -0x0, -0xa4, -0x49, -0x51, -0x43, -0x52, -0x50, -0x52, -0x51, -0x45, -0x14, -0x17, -0x5f, -0x53, -0x52, -0x53, -0x1, -0x8a, -0x68, -0xa, -0x5, -0x50, -0x52, -0x52, -0x49, -0x70, -0x50, -0x52, -0x52, -0x49, -0x50, -0x52, -0x51, -0x45, -0x5b, -0x82, -0x4d, -0x7, -0x4c, -0x4e, -0x4b, -0x46, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xc, -0xf, -0x8, -0x5f, -0x55, -0x49, -0x44, -0xa, -0x5, -0x8, -0x5f, -0x50, -0x52, -0x53, -0x11, -0x16, -0xa, -0x13, -0x89, -0xe, -0x0, -0x9, -0x3, -0x5, -0x0, -0x0, -0x0, -0xa, -0x0, -0x0, -0x0, -0xb, -0x0, -0x0, -0x0, -0x79, -0x0, -0x14, -0xf, -0x5f, -0x53, -0x54, -0x41, -0x0, -0xa4, -0x49, -0x51, -0x53, -0x54, -0x50, -0x52, -0x51, -0x46, -0x14, -0x11, -0x5f, -0x44, -0x49, -0x53, -0x0, -0x7d, -0x50, -0x52, -0x51, -0x46, -0xa, -0x80, -0x50, -0x52, -0x51, -0x46, -0x14, -0xf, -0x5f, -0x43, -0x52, -0x53, -0x0, -0xa4, -0x49, -0x51, -0x43, -0x52, -0x50, -0x52, -0x51, -0x46, -0x14, -0x17, -0x5f, -0x53, -0x52, -0x53, -0x1, -0x8a, -0x68, -0xa, -0x5, -0x50, -0x52, -0x52, -0x49, -0x70, -0x50, -0x52, -0x52, -0x49, -0x50, -0x52, -0x51, -0x46, -0x5b, -0x82, -0x4d, -0x7, -0x4c, -0x4e, -0x4b, -0x47, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xc, -0xf, -0x8, -0x5f, -0x55, -0x49, -0x44, -0xa, -0x6, -0x8, -0x5f, -0x50, -0x52, -0x53, -0x11, -0x16, -0xa, -0x13, -0x89, -0xe, -0x0, -0x9, -0x3, -0x5, -0x0, -0x0, -0x0, -0xa, -0x0, -0x0, -0x0, -0xb, -0x0, -0x0, -0x0, -0x79, -0x0, -0x14, -0xf, -0x5f, -0x53, -0x54, -0x41, -0x0, -0xa4, -0x49, -0x51, -0x53, -0x54, -0x50, -0x52, -0x51, -0x47, -0x14, -0x11, -0x5f, -0x44, -0x49, -0x53, -0x0, -0x7d, -0x50, -0x52, -0x51, -0x47, -0xa, -0x80, -0x50, -0x52, -0x51, -0x47, -0x14, -0xf, -0x5f, -0x43, -0x52, -0x53, -0x0, -0xa4, -0x49, -0x51, -0x43, -0x52, -0x50, -0x52, -0x51, -0x47, -0x14, -0x17, -0x5f, -0x53, -0x52, -0x53, -0x1, -0x8a, -0x68, -0xa, -0x5, -0x50, -0x52, -0x52, -0x49, -0x70, -0x50, -0x52, -0x52, -0x49, -0x50, -0x52, -0x51, -0x47, -0x5b, -0x82, -0x4d, -0x7, -0x4c, -0x4e, -0x4b, -0x48, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xc, -0xf, -0x8, -0x5f, -0x55, -0x49, -0x44, -0xa, -0x7, -0x8, -0x5f, -0x50, -0x52, -0x53, -0x11, -0x16, -0xa, -0x13, -0x89, -0xe, -0x0, -0x9, -0x3, -0x5, -0x0, -0x0, -0x0, -0xa, -0x0, -0x0, -0x0, -0xb, -0x0, -0x0, -0x0, -0x79, -0x0, -0x14, -0xf, -0x5f, -0x53, -0x54, -0x41, -0x0, -0xa4, -0x49, -0x51, -0x53, -0x54, -0x50, -0x52, -0x51, -0x48, -0x14, -0x11, -0x5f, -0x44, -0x49, -0x53, -0x0, -0x7d, -0x50, -0x52, -0x51, -0x48, -0xa, -0x80, -0x50, -0x52, -0x51, -0x48, -0x14, -0xf, -0x5f, -0x43, -0x52, -0x53, -0x0, -0xa4, -0x49, -0x51, -0x43, -0x52, -0x50, -0x52, -0x51, -0x48, -0x14, -0x17, -0x5f, -0x53, -0x52, -0x53, -0x1, -0x8a, -0x68, -0xa, -0x5, -0x50, -0x52, -0x52, -0x49, -0x70, -0x50, -0x52, -0x52, -0x49, -0x50, -0x52, -0x51, -0x48, -0x5b, -0x82, -0x45, -0x4, -0x47, -0x53, -0x49, -0x41, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xc, -0xf, -0x8, -0x5f, -0x55, -0x49, -0x44, -0x0, -0x8, -0x5f, -0x50, -0x52, -0x53, -0x11, -0xe, -0xa, -0xb, -0x89, -0x6, -0x0, -0x9, -0x1, -0x10, -0x0, -0x0, -0x0, -0x79, -0x0, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0xe, -0xa, -0xb, -0x89, -0x6, -0x0, -0x9, -0x1, -0x10, -0x0, -0x0, -0x0, -0x79, -0x0, -0x14, -0x6, -0x5f, -0x53, -0x52, -0x53, -0x1, -0x5b, -0x82, -0x45, -0x4, -0x47, -0x53, -0x49, -0x42, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xc, -0xf, -0x8, -0x5f, -0x55, -0x49, -0x44, -0x0, -0x8, -0x5f, -0x50, -0x52, -0x53, -0x11, -0xe, -0xa, -0xb, -0x89, -0x6, -0x0, -0x9, -0x1, -0x11, -0x0, -0x0, -0x0, -0x79, -0x0, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0xe, -0xa, -0xb, -0x89, -0x6, -0x0, -0x9, -0x1, -0x11, -0x0, -0x0, -0x0, -0x79, -0x0, -0x14, -0x6, -0x5f, -0x53, -0x52, -0x53, -0x1, -0x5b, -0x82, -0x45, -0x4, -0x47, -0x53, -0x49, -0x43, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xc, -0xf, -0x8, -0x5f, -0x55, -0x49, -0x44, -0x0, -0x8, -0x5f, -0x50, -0x52, -0x53, -0x11, -0xe, -0xa, -0xb, -0x89, -0x6, -0x0, -0x9, -0x1, -0x12, -0x0, -0x0, -0x0, -0x79, -0x0, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0xe, -0xa, -0xb, -0x89, -0x6, -0x0, -0x9, -0x1, -0x12, -0x0, -0x0, -0x0, -0x79, -0x0, -0x14, -0x6, -0x5f, -0x53, -0x52, -0x53, -0x1, -0x5b, -0x82, -0x45, -0x4, -0x47, -0x53, -0x49, -0x44, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xc, -0xf, -0x8, -0x5f, -0x55, -0x49, -0x44, -0x0, -0x8, -0x5f, -0x50, -0x52, -0x53, -0x11, -0xe, -0xa, -0xb, -0x89, -0x6, -0x0, -0x9, -0x1, -0x13, -0x0, -0x0, -0x0, -0x79, -0x0, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0xe, -0xa, -0xb, -0x89, -0x6, -0x0, -0x9, -0x1, -0x13, -0x0, -0x0, -0x0, -0x79, -0x0, -0x14, -0x6, -0x5f, -0x53, -0x52, -0x53, -0x1, -0x5b, -0x82, -0x45, -0x4, -0x47, -0x53, -0x49, -0x45, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xc, -0xf, -0x8, -0x5f, -0x55, -0x49, -0x44, -0x0, -0x8, -0x5f, -0x50, -0x52, -0x53, -0x11, -0xe, -0xa, -0xb, -0x89, -0x6, -0x0, -0x9, -0x1, -0x14, -0x0, -0x0, -0x0, -0x79, -0x0, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0xe, -0xa, -0xb, -0x89, -0x6, -0x0, -0x9, -0x1, -0x14, -0x0, -0x0, -0x0, -0x79, -0x0, -0x14, -0x6, -0x5f, -0x53, -0x52, -0x53, -0x1, -0x5b, -0x82, -0x45, -0x4, -0x47, -0x53, -0x49, -0x46, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xc, -0xf, -0x8, -0x5f, -0x55, -0x49, -0x44, -0x0, -0x8, -0x5f, -0x50, -0x52, -0x53, -0x11, -0xe, -0xa, -0xb, -0x89, -0x6, -0x0, -0x9, -0x1, -0x15, -0x0, -0x0, -0x0, -0x79, -0x0, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0xe, -0xa, -0xb, -0x89, -0x6, -0x0, -0x9, -0x1, -0x15, -0x0, -0x0, -0x0, -0x79, -0x0, -0x14, -0x6, -0x5f, -0x53, -0x52, -0x53, -0x1, -0x5b, -0x82, -0x45, -0x4, -0x47, -0x53, -0x49, -0x47, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xc, -0xf, -0x8, -0x5f, -0x55, -0x49, -0x44, -0x0, -0x8, -0x5f, -0x50, -0x52, -0x53, -0x11, -0xe, -0xa, -0xb, -0x89, -0x6, -0x0, -0x9, -0x1, -0x16, -0x0, -0x0, -0x0, -0x79, -0x0, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0xe, -0xa, -0xb, -0x89, -0x6, -0x0, -0x9, -0x1, -0x16, -0x0, -0x0, -0x0, -0x79, -0x0, -0x14, -0x6, -0x5f, -0x53, -0x52, -0x53, -0x1, -0x5b, -0x82, -0x45, -0x4, -0x47, -0x53, -0x49, -0x48, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xc, -0x41, -0xd0, -0xc, -0xf, -0x8, -0x5f, -0x55, -0x49, -0x44, -0x0, -0x8, -0x5f, -0x50, -0x52, -0x53, -0x11, -0xe, -0xa, -0xb, -0x89, -0x6, -0x0, -0x9, -0x1, -0x17, -0x0, -0x0, -0x0, -0x79, -0x0, -0x8, -0x5f, -0x43, -0x52, -0x53, -0x11, -0xe, -0xa, -0xb, -0x89, -0x6, -0x0, -0x9, -0x1, -0x17, -0x0, -0x0, -0x0, -0x79, -0x0, -0x14, -0x6, -0x5f, -0x53, -0x52, -0x53, -0x1, -0x10, -0x4d, -0xc, -0x5f, -0x53, -0x42, -0x5f, -0x14, -0x35, -0x43, -0x50, -0x4d, -0x41, -0x1, -0x70, -0x83, -0x88, -0x43, -0x50, -0x4f, -0x4e, -0x68, -0x0, -0x60, -0x70, -0x11, -0xb, -0xa, -0x8, -0x0, -0x8, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x61, -0x70, -0x68, -0x88, -0x61, -0xa, -0x2, -0x0, -0x70, -0x68, -0x88, -0x61, -0xa, -0x3, -0x0, -0x70, -0x60, -0x88, -0x61, -0xa, -0x4, -0x0, -0xa4, -0x61, -0x14, -0x1a, -0x43, -0x50, -0x53, -0x54, -0x1, -0x70, -0x83, -0x88, -0x43, -0x50, -0x4f, -0x4e, -0x68, -0x0, -0x60, -0xa0, -0x5, -0x60, -0xa4, -0xa, -0xf, -0xa1, -0x3, -0xa4, -0x0, -0x14, -0xa, -0x43, -0x50, -0x45, -0x4a, -0x2, -0x5b, -0x22, -0xa, -0xc8, -0x14, -0x4a, -0x6, -0x50, -0x52, -0x53, -0x43, -0x0, -0x70, -0x50, -0x52, -0x53, -0x5f, -0x65, -0x70, -0x0, -0x62, -0x70, -0x0, -0x60, -0xa2, -0x46, -0x5, -0x95, -0x60, -0x87, -0x43, -0x50, -0x4f, -0x4e, -0x70, -0x83, -0x88, -0x43, -0x50, -0x4f, -0x4e, -0x60, -0x0, -0x61, -0xa0, -0xa, -0x7b, -0x60, -0xa, -0x7, -0x0, -0x7a, -0x62, -0x1, -0x62, -0xa1, -0xc, -0x70, -0x83, -0x88, -0x65, -0x7a, -0x60, -0xa, -0x3, -0x0, -0x0, -0x62, -0x70, -0x7b, -0x62, -0x1, -0x0, -0x63, -0xa0, -0x22, -0x92, -0x93, -0x61, -0x63, -0x70, -0x63, -0x88, -0x43, -0x50, -0x4f, -0x4e, -0x60, -0x0, -0xa0, -0xa, -0x93, -0x63, -0x1, -0x4e, -0x54, -0x46, -0x59, -0x60, -0x1, -0xa1, -0x8, -0x4e, -0x54, -0x46, -0x59, -0x60, -0xa, -0x3, -0x75, -0x60, -0x10, -0x44, -0x2a, -0x2e, -0x5f, -0x53, -0x42, -0x5f, -0x50, -0x43, -0x49, -0x30, -0x5b, -0x82, -0x47, -0x29, -0x4d, -0x48, -0x50, -0x44, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xd, -0x50, -0x4e, -0x50, -0x30, -0x41, -0x30, -0x36, -0x0, -0x8, -0x5f, -0x55, -0x49, -0x44, -0xd, -0x4d, -0x65, -0x6d, -0x6f, -0x72, -0x79, -0x20, -0x68, -0x6f, -0x74, -0x70, -0x6c, -0x75, -0x67, -0x20, -0x72, -0x65, -0x73, -0x6f, -0x75, -0x72, -0x63, -0x65, -0x73, -0x0, -0x14, -0x13, -0x5f, -0x53, -0x54, -0x41, -0x0, -0xa0, -0x9, -0x93, -0x4d, -0x44, -0x4e, -0x52, -0x0, -0xa4, -0x0, -0xa4, -0xa, -0xb, -0x5b, -0x1, -0x4d, -0x4c, -0x43, -0x4b, -0x0, -0x14, -0x4a, -0x4, -0x4d, -0x53, -0x43, -0x4e, -0x0, -0xa0, -0x9, -0x93, -0x4d, -0x44, -0x4e, -0x52, -0x0, -0xa4, -0x0, -0x70, -0x0, -0x60, -0x5b, -0x23, -0x4d, -0x4c, -0x43, -0x4b, -0xff, -0xff, -0xa2, -0x25, -0x95, -0x60, -0x4d, -0x44, -0x4e, -0x52, -0x70, -0x60, -0x4d, -0x53, -0x45, -0x4c, -0xa0, -0x13, -0x93, -0x4d, -0x49, -0x4e, -0x53, -0x1, -0x4d, -0x54, -0x46, -0x59, -0x60, -0x1, -0x70, -0x1, -0x4d, -0x49, -0x4e, -0x53, -0x72, -0x60, -0x1, -0x60, -0x5b, -0x27, -0x4d, -0x4c, -0x43, -0x4b, -0xa4, -0x1, -0x14, -0x2d, -0x4d, -0x52, -0x53, -0x54, -0x1, -0x70, -0x0, -0x60, -0x5b, -0x23, -0x4d, -0x4c, -0x43, -0x4b, -0xff, -0xff, -0x70, -0x99, -0x68, -0x0, -0x4d, -0x53, -0x45, -0x4c, -0xa0, -0xb, -0x93, -0x4d, -0x45, -0x53, -0x5f, -0x1, -0x70, -0xa, -0xf, -0x60, -0x5b, -0x27, -0x4d, -0x4c, -0x43, -0x4b, -0xa4, -0x60, -0x14, -0x41, -0x18, -0x4d, -0x43, -0x52, -0x53, -0x9, -0x5b, -0x23, -0x4d, -0x4c, -0x43, -0x4b, -0xff, -0xff, -0x70, -0x99, -0x68, -0x0, -0x4d, -0x53, -0x45, -0x4c, -0x8, -0x4d, -0x52, -0x36, -0x34, -0x11, -0x33, -0xa, -0x30, -0x8a, -0x2b, -0x0, -0x0, -0xc, -0x3, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0xfe, -0xff, -0xff, -0xff, -0xff, -0xff, -0xff, -0xff, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0xff, -0xff, -0xff, -0xff, -0xff, -0xff, -0xff, -0xff, -0x79, -0x0, -0x8a, -0x4d, -0x52, -0x36, -0x34, -0xa, -0xe, -0x4d, -0x49, -0x4e, -0x4c, -0x8a, -0x4d, -0x52, -0x36, -0x34, -0xa, -0x12, -0x4d, -0x49, -0x4e, -0x48, -0x8a, -0x4d, -0x52, -0x36, -0x34, -0xa, -0x26, -0x4c, -0x45, -0x4e, -0x4c, -0x8a, -0x4d, -0x52, -0x36, -0x34, -0xa, -0x2a, -0x4c, -0x45, -0x4e, -0x48, -0x8a, -0x4d, -0x52, -0x36, -0x34, -0xa, -0x16, -0x4d, -0x41, -0x58, -0x4c, -0x8a, -0x4d, -0x52, -0x36, -0x34, -0xa, -0x1a, -0x4d, -0x41, -0x58, -0x48, -0x70, -0x4d, -0x52, -0x42, -0x48, -0x4d, -0x49, -0x4e, -0x48, -0x70, -0x4d, -0x52, -0x42, -0x4c, -0x4d, -0x49, -0x4e, -0x4c, -0x70, -0x4d, -0x52, -0x4c, -0x48, -0x4c, -0x45, -0x4e, -0x48, -0x70, -0x4d, -0x52, -0x4c, -0x4c, -0x4c, -0x45, -0x4e, -0x4c, -0x72, -0x4d, -0x49, -0x4e, -0x4c, -0x4c, -0x45, -0x4e, -0x4c, -0x4d, -0x41, -0x58, -0x4c, -0x72, -0x4d, -0x49, -0x4e, -0x48, -0x4c, -0x45, -0x4e, -0x48, -0x4d, -0x41, -0x58, -0x48, -0xa0, -0x14, -0x95, -0x4d, -0x41, -0x58, -0x4c, -0x4d, -0x49, -0x4e, -0x4c, -0x72, -0x4d, -0x41, -0x58, -0x48, -0x1, -0x4d, -0x41, -0x58, -0x48, -0xa0, -0x11, -0x95, -0x4d, -0x41, -0x58, -0x4c, -0x1, -0x74, -0x4d, -0x41, -0x58, -0x48, -0x1, -0x4d, -0x41, -0x58, -0x48, -0x74, -0x4d, -0x41, -0x58, -0x4c, -0x1, -0x4d, -0x41, -0x58, -0x4c, -0xa0, -0x44, -0x7, -0x93, -0x4d, -0x41, -0x58, -0x48, -0x0, -0x8, -0x4d, -0x52, -0x33, -0x32, -0x11, -0x1f, -0xa, -0x1c, -0x87, -0x17, -0x0, -0x0, -0xc, -0x3, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0x0, -0xfe, -0xff, -0xff, -0xff, -0x0, -0x0, -0x0, -0x0, -0xff, -0xff, -0xff, -0xff, -0x79, -0x0, -0x8a, -0x4d, -0x52, -0x33, -0x32, -0xa, -0xa, -0x4d, -0x49, -0x4e, -0x5f, -0x8a, -0x4d, -0x52, -0x33, -0x32, -0xa, -0xe, -0x4d, -0x41, -0x58, -0x5f, -0x8a, -0x4d, -0x52, -0x33, -0x32, -0xa, -0x16, -0x4c, -0x45, -0x4e, -0x5f, -0x70, -0x4d, -0x49, -0x4e, -0x4c, -0x4d, -0x49, -0x4e, -0x5f, -0x70, -0x4d, -0x41, -0x58, -0x4c, -0x4d, -0x41, -0x58, -0x5f, -0x70, -0x4c, -0x45, -0x4e, -0x4c, -0x4c, -0x45, -0x4e, -0x5f, -0x5b, -0x27, -0x4d, -0x4c, -0x43, -0x4b, -0xa4, -0x4d, -0x52, -0x33, -0x32, -0x5b, -0x27, -0x4d, -0x4c, -0x43, -0x4b, -0xa4, -0x4d, -0x52, -0x36, -0x34, -0x14, -0x24, -0x4d, -0x50, -0x58, -0x4d, -0x1, -0x5b, -0x23, -0x4d, -0x4c, -0x43, -0x4b, -0xff, -0xff, -0x70, -0x99, -0x68, -0x0, -0x4d, -0x53, -0x45, -0x4c, -0x70, -0x4d, -0x50, -0x58, -0x5f, -0x60, -0x5b, -0x27, -0x4d, -0x4c, -0x43, -0x4b, -0xa4, -0x60, -0x14, -0x28, -0x4d, -0x4f, -0x53, -0x54, -0x4, -0x5b, -0x23, -0x4d, -0x4c, -0x43, -0x4b, -0xff, -0xff, -0x70, -0x99, -0x68, -0x0, -0x4d, -0x53, -0x45, -0x4c, -0x70, -0x69, -0x4d, -0x4f, -0x45, -0x56, -0x70, -0x6a, -0x4d, -0x4f, -0x53, -0x43, -0x5b, -0x27, -0x4d, -0x4c, -0x43, -0x4b, -0x10, -0x42, -0xa, -0x5f, -0x47, -0x50, -0x45, -0x8, -0x5f, -0x48, -0x49, -0x44, -0xd, -0x41, -0x43, -0x50, -0x49, -0x30, -0x30, -0x30, -0x36, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x30, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x31, -0x0, -0x14, -0x10, -0x5f, -0x45, -0x30, -0x32, -0x0, -0x5c, -0x2e, -0x5f, -0x53, -0x42, -0x5f, -0x50, -0x52, -0x53, -0x43, -0x14, -0x19, -0x5f, -0x45, -0x30, -0x33, -0x0, -0x5c, -0x2f, -0x4, -0x5f, -0x53, -0x42, -0x5f, -0x50, -0x43, -0x49, -0x30, -0x4d, -0x48, -0x50, -0x44, -0x4d, -0x53, -0x43, -0x4e, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x34, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x35, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x36, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x37, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x38, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x39, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x41, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x42, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x43, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x44, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x45, -0x0, -0x14, -0x6, -0x5f, -0x4c, -0x30, -0x46, -0x0 -}; diff --git a/scripts/acpi_extract.py b/scripts/acpi_extract.py deleted file mode 100755 index 10c1ffb..0000000 --- a/scripts/acpi_extract.py +++ /dev/null @@ -1,367 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2011 Red Hat, Inc., Michael S. Tsirkin <mst@redhat.com> -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, see <http://www.gnu.org/licenses/>. - -# Process mixed ASL/AML listing (.lst file) produced by iasl -l -# Locate and execute ACPI_EXTRACT directives, output offset info -# -# Documentation of ACPI_EXTRACT_* directive tags: -# -# These directive tags output offset information from AML for BIOS runtime -# table generation. -# Each directive is of the form: -# ACPI_EXTRACT_<TYPE> <array_name> <Operator> (...) -# and causes the extractor to create an array -# named <array_name> with offset, in the generated AML, -# of an object of a given type in the following <Operator>. -# -# A directive must fit on a single code line. -# -# Object type in AML is verified, a mismatch causes a build failure. -# -# Directives and operators currently supported are: -# ACPI_EXTRACT_NAME_DWORD_CONST - extract a Dword Const object from Name() -# ACPI_EXTRACT_NAME_WORD_CONST - extract a Word Const object from Name() -# ACPI_EXTRACT_NAME_BYTE_CONST - extract a Byte Const object from Name() -# ACPI_EXTRACT_METHOD_STRING - extract a NameString from Method() -# ACPI_EXTRACT_NAME_STRING - extract a NameString from Name() -# ACPI_EXTRACT_PROCESSOR_START - start of Processor() block -# ACPI_EXTRACT_PROCESSOR_STRING - extract a NameString from Processor() -# ACPI_EXTRACT_PROCESSOR_END - offset at last byte of Processor() + 1 -# ACPI_EXTRACT_PKG_START - start of Package block -# -# ACPI_EXTRACT_ALL_CODE - create an array storing the generated AML bytecode -# -# ACPI_EXTRACT is not allowed anywhere else in code, except in comments. - -import re; -import sys; -import fileinput; - -aml = [] -asl = [] -output = {} -debug = "" - -class asl_line: - line = None - lineno = None - aml_offset = None - -def die(diag): - sys.stderr.write("Error: %s; %s\n" % (diag, debug)) - sys.exit(1) - -#Store an ASL command, matching AML offset, and input line (for debugging) -def add_asl(lineno, line): - l = asl_line() - l.line = line - l.lineno = lineno - l.aml_offset = len(aml) - asl.append(l) - -#Store an AML byte sequence -#Verify that offset output by iasl matches # of bytes so far -def add_aml(offset, line): - o = int(offset, 16); - # Sanity check: offset must match size of code so far - if (o != len(aml)): - die("Offset 0x%x != 0x%x" % (o, len(aml))) - # Strip any trailing dots and ASCII dump after " - line = re.sub(r'\s*\.*\s*".*$',"", line) - # Strip traling whitespace - line = re.sub(r'\s+$',"", line) - # Strip leading whitespace - line = re.sub(r'^\s+',"", line) - # Split on whitespace - code = re.split(r'\s+', line) - for c in code: - # Require a legal hex number, two digits - if (not(re.search(r'^[0-9A-Fa-f][0-9A-Fa-f]$', c))): - die("Unexpected octet %s" % c); - aml.append(int(c, 16)); - -# Process aml bytecode array, decoding AML -def aml_pkglen_bytes(offset): - # PkgLength can be multibyte. Bits 8-7 give the # of extra bytes. - pkglenbytes = aml[offset] >> 6; - return pkglenbytes + 1 - -def aml_pkglen(offset): - pkgstart = offset - pkglenbytes = aml_pkglen_bytes(offset) - pkglen = aml[offset] & 0x3F - # If multibyte, first nibble only uses bits 0-3 - if ((pkglenbytes > 1) and (pkglen & 0x30)): - die("PkgLen bytes 0x%x but first nibble 0x%x expected 0x0X" % - (pkglen, pkglen)) - offset += 1 - pkglenbytes -= 1 - for i in range(pkglenbytes): - pkglen |= aml[offset + i] << (i * 8 + 4) - if (len(aml) < pkgstart + pkglen): - die("PckgLen 0x%x at offset 0x%x exceeds AML size 0x%x" % - (pkglen, offset, len(aml))) - return pkglen - -# Given method offset, find its NameString offset -def aml_method_string(offset): - #0x14 MethodOp PkgLength NameString MethodFlags TermList - if (aml[offset] != 0x14): - die( "Method offset 0x%x: expected 0x14 actual 0x%x" % - (offset, aml[offset])); - offset += 1; - pkglenbytes = aml_pkglen_bytes(offset) - offset += pkglenbytes; - return offset; - -# Given name offset, find its NameString offset -def aml_name_string(offset): - #0x08 NameOp NameString DataRef - if (aml[offset] != 0x08): - die( "Name offset 0x%x: expected 0x08 actual 0x%x" % - (offset, aml[offset])); - offset += 1 - # Block Name Modifier. Skip it. - if (aml[offset] == 0x5c or aml[offset] == 0x5e): - offset += 1 - return offset; - -# Given data offset, find variable length byte buffer offset -def aml_data_buffer(offset, length): - #0x11 PkgLength BufferSize ByteList - if (length > 63): - die( "Name offset 0x%x: expected a one byte PkgLength (length<=63)" % - (offset)); - expect = [0x11, length+3, 0x0A, length] - if (aml[offset:offset+4] != expect): - die( "Name offset 0x%x: expected %s actual %s" % - (offset, expect, aml[offset:offset+4])) - return offset + len(expect) - -# Given data offset, find dword const offset -def aml_data_dword_const(offset): - #0x08 NameOp NameString DataRef - if (aml[offset] != 0x0C): - die( "Name offset 0x%x: expected 0x0C actual 0x%x" % - (offset, aml[offset])); - return offset + 1; - -# Given data offset, find word const offset -def aml_data_word_const(offset): - #0x08 NameOp NameString DataRef - if (aml[offset] != 0x0B): - die( "Name offset 0x%x: expected 0x0B actual 0x%x" % - (offset, aml[offset])); - return offset + 1; - -# Given data offset, find byte const offset -def aml_data_byte_const(offset): - #0x08 NameOp NameString DataRef - if (aml[offset] != 0x0A): - die( "Name offset 0x%x: expected 0x0A actual 0x%x" % - (offset, aml[offset])); - return offset + 1; - -# Find name'd buffer -def aml_name_buffer(offset, length): - return aml_data_buffer(aml_name_string(offset) + 4, length) - -# Given name offset, find dword const offset -def aml_name_dword_const(offset): - return aml_data_dword_const(aml_name_string(offset) + 4) - -# Given name offset, find word const offset -def aml_name_word_const(offset): - return aml_data_word_const(aml_name_string(offset) + 4) - -# Given name offset, find byte const offset -def aml_name_byte_const(offset): - return aml_data_byte_const(aml_name_string(offset) + 4) - -def aml_device_start(offset): - #0x5B 0x82 DeviceOp PkgLength NameString - if ((aml[offset] != 0x5B) or (aml[offset + 1] != 0x82)): - die( "Name offset 0x%x: expected 0x5B 0x82 actual 0x%x 0x%x" % - (offset, aml[offset], aml[offset + 1])); - return offset - -def aml_device_string(offset): - #0x5B 0x82 DeviceOp PkgLength NameString - start = aml_device_start(offset) - offset += 2 - pkglenbytes = aml_pkglen_bytes(offset) - offset += pkglenbytes - return offset - -def aml_device_end(offset): - start = aml_device_start(offset) - offset += 2 - pkglenbytes = aml_pkglen_bytes(offset) - pkglen = aml_pkglen(offset) - return offset + pkglen - -def aml_processor_start(offset): - #0x5B 0x83 ProcessorOp PkgLength NameString ProcID - if ((aml[offset] != 0x5B) or (aml[offset + 1] != 0x83)): - die( "Name offset 0x%x: expected 0x5B 0x83 actual 0x%x 0x%x" % - (offset, aml[offset], aml[offset + 1])); - return offset - -def aml_processor_string(offset): - #0x5B 0x83 ProcessorOp PkgLength NameString ProcID - start = aml_processor_start(offset) - offset += 2 - pkglenbytes = aml_pkglen_bytes(offset) - offset += pkglenbytes - return offset - -def aml_processor_end(offset): - start = aml_processor_start(offset) - offset += 2 - pkglenbytes = aml_pkglen_bytes(offset) - pkglen = aml_pkglen(offset) - return offset + pkglen - -def aml_package_start(offset): - offset = aml_name_string(offset) + 4 - # 0x12 PkgLength NumElements PackageElementList - if (aml[offset] != 0x12): - die( "Name offset 0x%x: expected 0x12 actual 0x%x" % - (offset, aml[offset])); - offset += 1 - return offset + aml_pkglen_bytes(offset) + 1 - -lineno = 0 -for line in fileinput.input(): - # Strip trailing newline - line = line.rstrip(); - # line number and debug string to output in case of errors - lineno = lineno + 1 - debug = "input line %d: %s" % (lineno, line) - #ASL listing: space, then line#, then ...., then code - pasl = re.compile('^\s+([0-9]+)(:\s\s|\.\.\.\.)\s*') - m = pasl.search(line) - if (m): - add_asl(lineno, pasl.sub("", line)); - # AML listing: offset in hex, then ...., then code - paml = re.compile('^([0-9A-Fa-f]+)(:\s\s|\.\.\.\.)\s*') - m = paml.search(line) - if (m): - add_aml(m.group(1), paml.sub("", line)) - -# Now go over code -# Track AML offset of a previous non-empty ASL command -prev_aml_offset = -1 -for i in range(len(asl)): - debug = "input line %d: %s" % (asl[i].lineno, asl[i].line) - - l = asl[i].line - - # skip if not an extract directive - a = len(re.findall(r'ACPI_EXTRACT', l)) - if (not a): - # If not empty, store AML offset. Will be used for sanity checks - # IASL seems to put {}. at random places in the listing. - # Ignore any non-words for the purpose of this test. - m = re.search(r'\w+', l) - if (m): - prev_aml_offset = asl[i].aml_offset - continue - - if (a > 1): - die("Expected at most one ACPI_EXTRACT per line, actual %d" % a) - - mext = re.search(r''' - ^\s* # leading whitespace - /\*\s* # start C comment - (ACPI_EXTRACT_\w+) # directive: group(1) - \s+ # whitspace separates directive from array name - (\w+) # array name: group(2) - \s*\*/ # end of C comment - \s*$ # trailing whitespace - ''', l, re.VERBOSE) - if (not mext): - die("Stray ACPI_EXTRACT in input") - - # previous command must have produced some AML, - # otherwise we are in a middle of a block - if (prev_aml_offset == asl[i].aml_offset): - die("ACPI_EXTRACT directive in the middle of a block") - - directive = mext.group(1) - array = mext.group(2) - offset = asl[i].aml_offset - - if (directive == "ACPI_EXTRACT_ALL_CODE"): - if array in output: - die("%s directive used more than once" % directive) - output[array] = aml - continue - if (directive == "ACPI_EXTRACT_NAME_BUFFER8"): - offset = aml_name_buffer(offset, 8) - elif (directive == "ACPI_EXTRACT_NAME_BUFFER16"): - offset = aml_name_buffer(offset, 16) - elif (directive == "ACPI_EXTRACT_NAME_DWORD_CONST"): - offset = aml_name_dword_const(offset) - elif (directive == "ACPI_EXTRACT_NAME_WORD_CONST"): - offset = aml_name_word_const(offset) - elif (directive == "ACPI_EXTRACT_NAME_BYTE_CONST"): - offset = aml_name_byte_const(offset) - elif (directive == "ACPI_EXTRACT_NAME_STRING"): - offset = aml_name_string(offset) - elif (directive == "ACPI_EXTRACT_METHOD_STRING"): - offset = aml_method_string(offset) - elif (directive == "ACPI_EXTRACT_DEVICE_START"): - offset = aml_device_start(offset) - elif (directive == "ACPI_EXTRACT_DEVICE_STRING"): - offset = aml_device_string(offset) - elif (directive == "ACPI_EXTRACT_DEVICE_END"): - offset = aml_device_end(offset) - elif (directive == "ACPI_EXTRACT_PROCESSOR_START"): - offset = aml_processor_start(offset) - elif (directive == "ACPI_EXTRACT_PROCESSOR_STRING"): - offset = aml_processor_string(offset) - elif (directive == "ACPI_EXTRACT_PROCESSOR_END"): - offset = aml_processor_end(offset) - elif (directive == "ACPI_EXTRACT_PKG_START"): - offset = aml_package_start(offset) - else: - die("Unsupported directive %s" % directive) - - if array not in output: - output[array] = [] - output[array].append(offset) - -debug = "at end of file" - -def get_value_type(maxvalue): - #Use type large enough to fit the table - if (maxvalue >= 0x10000): - return "int" - elif (maxvalue >= 0x100): - return "short" - else: - return "char" - -# Pretty print output -for array in output.keys(): - otype = get_value_type(max(output[array])) - odata = [] - for value in output[array]: - odata.append("0x%x" % value) - sys.stdout.write("static unsigned %s %s[] = {\n" % (otype, array)) - sys.stdout.write(",\n".join(odata)) - sys.stdout.write('\n};\n'); diff --git a/scripts/acpi_extract_preprocess.py b/scripts/acpi_extract_preprocess.py deleted file mode 100755 index 69d10d6..0000000 --- a/scripts/acpi_extract_preprocess.py +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2011 Red Hat, Inc., Michael S. Tsirkin <mst@redhat.com> -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, see <http://www.gnu.org/licenses/>. - -# Read a preprocessed ASL listing and put each ACPI_EXTRACT -# directive in a comment, to make iasl skip it. -# We also put each directive on a new line, the machinery -# in tools/acpi_extract.py requires this. - -import re; -import sys; -import fileinput; - -def die(diag): - sys.stderr.write("Error: %s\n" % (diag)) - sys.exit(1) - -# Note: () around pattern make split return matched string as part of list -psplit = re.compile(r''' ( - \b # At word boundary - ACPI_EXTRACT_\w+ # directive - \s+ # some whitespace - \w+ # array name - )''', re.VERBOSE); - -lineno = 0 -for line in fileinput.input(): - # line number and debug string to output in case of errors - lineno = lineno + 1 - debug = "input line %d: %s" % (lineno, line.rstrip()) - - s = psplit.split(line); - # The way split works, each odd item is the matching ACPI_EXTRACT directive. - # Put each in a comment, and on a line by itself. - for i in range(len(s)): - if (i % 2): - sys.stdout.write("\n/* %s */\n" % s[i]) - else: - sys.stdout.write(s[i]) diff --git a/scripts/update-acpi.sh b/scripts/update-acpi.sh deleted file mode 100644 index b5f05ff..0000000 --- a/scripts/update-acpi.sh +++ /dev/null @@ -1,4 +0,0 @@ -cd x86_64-softmmu -for file in hw/i386/*.hex; do - cp -f $file ../$file.generated -done -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 52+ messages in thread
end of thread, other threads:[~2015-12-28 17:04 UTC | newest] Thread overview: 52+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-12-28 16:57 [Qemu-devel] [PATCH v2 00/51] pc: acpi: convert DSDT to AML API and drop ASL templates support Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 01/51] tests: acpi: print ASL diff in verbose mode Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 02/51] pc: acpi: memhp: prepare context in SSDT for moving memhp DSDT code Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 03/51] pc: acpi: memhp: move MHPD._STA method into SSDT Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 04/51] pc: acpi: memhp: move MHPD.MLCK mutex " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 05/51] pc: acpi: memhp: move MHPD.MSCN method " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 06/51] pc: acpi: memhp: move MHPD.MRST " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 07/51] pc: acpi: memhp: move MHPD.MPXM " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 08/51] pc: acpi: memhp: move MHPD.MOST " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 09/51] pc: acpi: memhp: move MHPD.MEJ0 " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 10/51] pc: acpi: memhp: move MHPD.MCRS " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 11/51] pc: acpi: memhp: move MHPD Device " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 12/51] pc: acpi: factor out memhp code from build_ssdt() into separate function Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 13/51] pc: acpi: memhp: move \_GPE._E03 into SSDT Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 14/51] pc: acpi: memhp: drop not needed stringify(MEMORY_foo) usage Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 15/51] pc: acpi: drop unused CPU_STATUS_LEN from DSDT Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 16/51] pc: acpi: cpuhp: move CPEJ() method to SSDT Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 17/51] pc: acpi: cpuhp: move CPMA() method into SSDT Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 18/51] pc: acpi: cpuhp: move CPST() " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 19/51] pc: acpi: cpuhp: move PRSC() " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 20/51] pc: acpi: cpuhp: move \_GPE._E02() " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 21/51] pc: acpi: factor out cpu hotplug code from build_ssdt() into separate function Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 22/51] pc: acpi: move HPET from DSDT to SSDT Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 23/51] pc: acpi: move DBUG() " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 24/51] pc: acpi: move RTC device " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 25/51] pc: acpi: move KBD " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 26/51] pc: acpi: move MOU " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 27/51] pc: acpi: move FDC0 " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 28/51] pc: acpi: move LPT " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 29/51] pc: acpi: move COM devices " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 30/51] pc: acpi: move PIIX4 isa-bridge and pm devices into SSDT Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 31/51] pc: acpi: move remaining GPE handlers " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 32/51] pc: acpi: pci: move link devices " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 33/51] pc: acpi: piix4: move IQCR() " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 34/51] pc: acpi: piix4: move IQST() " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 35/51] pc: acpi: piix4: move PCI0._PRT() " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 36/51] pc: acpi: piix4: move remaining PCI hotplug bits " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 37/51] pc: acpi: piix4: acpi move PCI0 device to SSDT Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 38/51] pc: acpi: q35: move GSI links " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 39/51] pc: acpi: q35: move link devices " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 40/51] pc: acpi: q35: move IQCR() into SSDT Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 41/51] pc: acpi: q35: move IQST() " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 42/51] pc: acpi: q35: move ISA bridge " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 43/51] pc: acpi: q35: move _PRT() " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 44/51] pc: acpi: q35: move PRTA routing table " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 45/51] pc: acpi: q35: move PRTP " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 46/51] pc: acpi: q35: move _PIC() method " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 47/51] pc: acpi: q35: move PCI0._OSC() " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 48/51] pc: acpi: q35: move PCI0 device definition " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 49/51] pc: acpi: q35: PCST, PCSB opregions and PCIB field " Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 50/51] pc: acpi: switch to AML API composed DSDT Igor Mammedov 2015-12-28 17:02 ` [Qemu-devel] [PATCH v2 51/51] pc: acpi: remove unused ASL templates and related blobs/utils Igor Mammedov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).