acpi-dsdt: procedurally generate _PRTfor-upstream-full
commit586ace56d1f3c6f1f1ccf4f3efe6a02b2a0e418b
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 23 Jul 2014 14:17:46 +0000 (23 16:17 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 25 Jul 2014 12:48:01 +0000 (25 14:48 +0200)
tree6746aed783166fec1ee84e37e6265e2f1b92a5f6
parent62c339c5272ce8fbe8ca52695cee8ff40da7872e
acpi-dsdt: procedurally generate _PRT

This replaces the _PRT constant with a method that computes it.

The problem is that the DSDT+SSDT have grown from 2.0 to 2.1,
enough to cross the 8k barrier (we align the ACPI tables to 4k
before putting them in fw_cfg).  This causes problems with
migration and the pc-i440fx-2.0 machine type.

The solution to the problem is to hardcode 64k as the limit,
but this doesn't solve the bug with pc-i440fx-2.0.  The fix will be
for QEMU 2.1 to use exactly the same size as QEMU 2.0 for the
ACPI tables.  First, however, we must make the actual AML
equal or smaller; to do this, rewrite _PRT in a way that saves
over 1k of bytecode.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/i386/acpi-dsdt.dsl
hw/i386/acpi-dsdt.hex.generated