All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/4] acpi: move common parts of the SSDT to the DSDT (and preview of things to come)
@ 2014-12-24 16:07 Paolo Bonzini
  2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT Paolo Bonzini
                   ` (6 more replies)
  0 siblings, 7 replies; 27+ messages in thread
From: Paolo Bonzini @ 2014-12-24 16:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: imammedo, dgilbert, mst

Right now, the SSDT/DSDT is split in three parts:

- code that doesn't need patching goes in the DSDT.  Furthermore,
  code in this category that is shared between PIIX4 and Q35 is
  handled via #include.  There was one exception, the SMC._STA
  method is patched and is in the DSDT.

- shared code that needs patching goes in the SSDT

- template-based code that comes from command line arguments
  goes in the SSDT as well

This series changes things to:

- code that is chipset-specific goes in the DSDT first.
  Right now none of this needs patching

- code that is not chipset-specific, some of which needs
  patching, goes in the DSDT second

- template-based code that comes from command line arguments
  goes in the SSDT

Patch 1 moves ssdt-misc ("common code that needs patching")
to the DSDT.  Patches 2-4 stop using the C preprocessor
in the DSDTs, except for parameterized code (CPU hotplug,
PCI CRS).

Patches 5-7 show why this could be useful.  They add padding
in fw_cfg after the DSDT, and in exchange stop padding the ACPI
tables to 128K.  This fixes migration problems (ROM sizes, RSDP)
because the ACPI tables are split in two:

1) fixed tables and the DSDT can be changed freely;

2) tables that vary depending on the command-line arguments (SSDT,
MADT, ...) are versioned and, given a machine type, they have to be
byte-equivalent across QEMU versions >= 2.3.

Patches 5 and 6 introduce a new sizing algorithm.  Patch 7 use it
to fix the migration problems.

Only the first 4 or 6 patches are meant for inclusion.  Patch 7 should
only be committed after Igor's series that rewrites the templating
mechanism in C.  That makes it much simpler to track changes to the ACPI
tables, and removes dependencies on the IASL version that could cause
some head-scratching.

The conflicts with Igor's series are nontrivial but overall
not complicated to solve.  Igor rewrote ssdt-misc in C, but those
parts can be easily removed from his series.  He has plans to
build the DSDT from C, and if that materializes it can apply to
acpi-dsdt-common.dsl too.

v1->v2 fixes problems due to GArray resizing and updates test data.
Now passes make check.

Paolo

Paolo Bonzini (7):
  pc: append ssdt-misc.dsl to the DSDT
  pc: rename ssdt-misc to dsdt-common
  pc: move common parts of the DSDT to dsdt-common
  pc: merge DSDT common parts into acpi-dsdt-common.dsl
  pc: introduce new ACPI table sizing algorithm
  pc: clean up pre-2.1 compatibility code
  pc: go back to smaller ACPI tables

 hw/i386/Makefile.objs                  |    2 +-
 hw/i386/acpi-build.c                   |  113 +-
 hw/i386/acpi-dsdt-common.dsl           |  467 +++++
 hw/i386/acpi-dsdt-common.hex.generated | 1897 +++++++++++++++++++
 hw/i386/acpi-dsdt-dbug.dsl             |   41 -
 hw/i386/acpi-dsdt-hpet.dsl             |   48 -
 hw/i386/acpi-dsdt-isa.dsl              |  128 --
 hw/i386/acpi-dsdt-mem-hotplug.dsl      |  176 --
 hw/i386/acpi-dsdt.dsl                  |   12 +-
 hw/i386/acpi-dsdt.hex.generated        | 3119 +++++++++-----------------------
 hw/i386/pc_piix.c                      |    9 +-
 hw/i386/pc_q35.c                       |    6 +-
 hw/i386/q35-acpi-dsdt.dsl              |    9 +-
 hw/i386/q35-acpi-dsdt.hex.generated    | 2787 +++++++---------------------
 hw/i386/ssdt-misc.dsl                  |  122 --
 hw/i386/ssdt-misc.hex.generated        |  399 ----
 include/hw/i386/pc.h                   |    2 +
 tests/acpi-test-data/pc/DSDT           |  Bin 3592 -> 3923 bytes
 tests/acpi-test-data/pc/SSDT           |  Bin 2279 -> 1951 bytes
 tests/acpi-test-data/q35/DSDT          |  Bin 8182 -> 8513 bytes
 tests/acpi-test-data/q35/SSDT          |  Bin 560 -> 232 bytes
 21 files changed, 3905 insertions(+), 5432 deletions(-)
 create mode 100644 hw/i386/acpi-dsdt-common.dsl
 create mode 100644 hw/i386/acpi-dsdt-common.hex.generated
 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/ssdt-misc.dsl
 delete mode 100644 hw/i386/ssdt-misc.hex.generated

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2015-01-20 12:56 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-24 16:07 [Qemu-devel] [PATCH v2 0/4] acpi: move common parts of the SSDT to the DSDT (and preview of things to come) Paolo Bonzini
2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 1/4] pc: append ssdt-misc.dsl to the DSDT Paolo Bonzini
2015-01-19 15:15   ` Igor Mammedov
2015-01-19 15:41     ` Paolo Bonzini
2015-01-19 17:14       ` Igor Mammedov
2015-01-19 17:26         ` Paolo Bonzini
2015-01-19 19:29           ` Michael S. Tsirkin
2015-01-19 19:33             ` Michael S. Tsirkin
2015-01-19 19:57               ` Paolo Bonzini
2015-01-19 21:27                 ` Michael S. Tsirkin
2015-01-20  9:59             ` Igor Mammedov
2015-01-20 10:34               ` Paolo Bonzini
2015-01-20 10:35               ` Michael S. Tsirkin
2015-01-20 12:41                 ` Igor Mammedov
2015-01-20 12:56                   ` Michael S. Tsirkin
2015-01-19 15:31   ` Michael S. Tsirkin
2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 2/4] pc: rename ssdt-misc to dsdt-common Paolo Bonzini
2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 3/4] pc: move common parts of the DSDT " Paolo Bonzini
2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 4/4] pc: merge DSDT common parts into acpi-dsdt-common.dsl Paolo Bonzini
2015-01-19 15:26   ` Michael S. Tsirkin
2015-01-19 15:33     ` Paolo Bonzini
2015-01-19 15:38       ` Michael S. Tsirkin
2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 5/4] pc: introduce new ACPI table sizing algorithm Paolo Bonzini
2015-01-19 15:33   ` Michael S. Tsirkin
2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 6/4] pc: clean up pre-2.1 compatibility code Paolo Bonzini
2014-12-24 16:07 ` [Qemu-devel] [PATCH v2 7/4] pc: go back to smaller ACPI tables Paolo Bonzini
2015-01-19 15:36   ` Michael S. Tsirkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.