qemu-e2k/hw/i386
Michael S. Tsirkin b4f4d54812 acpi: make SSDT 1.0 spec compliant when possible
The ACPI specification says:

The ASL compiler can emit two different AML opcodes for a Package
declaration, either PackageOp or VarPackageOp. For small, fixed-length
packages, the PackageOp is used and this opcode is compatible with ACPI
1.0. A VarPackageOp will be emitted if any of the following conditions
are true:
. The NumElements argument is a TermArg that can only be resolved at
runtime.
. At compile time, NumElements resolves to a constant that is larger than
255.
. The PackageList contains more than 255 initializer elements.
Note: The ability to create variable-sized packages was first introduced
in ACPI 2.0. ACPI 1.0 only allowed fixed-size packages with up to 255 elements.

So the spec seems to say a fixed value up to 255 must always
be used with PackageOp and not VarPackageOp, and some guests
(windows up to win2k8) seem to interpret it like this.

Let's do just this, choosing the encoding depending on
the number of elements.

Fixes 9bcc80cd71
(i386/acpi-build: allow more than 255 elements in CPON).

https://bugs.launchpad.net/bugs/1297651

Reported-by: Robert Hu <robert.hu@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-03-26 12:31:31 +02:00
..
kvm pci-assign: Fix potential read beyond buffer on -EBUSY 2014-02-26 10:30:03 -07:00
Makefile.objs pc: ACPI: unify source of CPU hotplug IO base/len 2014-01-26 13:11:44 +02:00
acpi-build.c acpi: make SSDT 1.0 spec compliant when possible 2014-03-26 12:31:31 +02:00
acpi-build.h i386: ACPI table generation code from seabios 2013-10-14 17:48:57 +03:00
acpi-defs.h acpi: fix endian-ness for table ids 2014-03-18 16:46:07 +02:00
acpi-dsdt-cpu-hotplug.dsl pc: ACPI: unify source of CPU hotplug IO base/len 2014-01-26 13:11:44 +02:00
acpi-dsdt-dbug.dsl i386: add ACPI table files from seabios 2013-10-14 17:48:51 +03:00
acpi-dsdt-hpet.dsl ACPI: Remove commented-out code from HPET._CRS 2014-02-10 11:09:33 +02:00
acpi-dsdt-isa.dsl ACPI: Fix AppleSMC _STA size 2014-01-26 13:06:48 +02:00
acpi-dsdt-pci-crs.dsl pc: Q35 DSDT: exclude CPU hotplug IO range from PCI bus resources 2014-01-26 13:11:44 +02:00
acpi-dsdt.dsl acpi-build: append description for non-hotplug 2014-03-09 21:09:30 +02:00
acpi-dsdt.hex.generated acpi-build: append description for non-hotplug 2014-03-09 21:09:30 +02:00
bios-linker-loader.c i386: Add missing include file for QEMU_PACKED 2014-02-01 13:43:52 +04:00
bios-linker-loader.h i386: add bios linker/loader 2013-10-14 17:48:52 +03:00
kvmvapic.c cpu-exec: Change cpu_resume_from_signal() argument to CPUState 2014-03-13 19:20:48 +01:00
multiboot.c multiboot: Calculate upper_mem in the ROM 2013-06-28 14:01:52 -05:00
multiboot.h refer to FWCfgState explicitly 2013-06-02 18:14:02 +03:00
pc.c pc: Refuse max_cpus if it results in too large APIC ID 2014-03-18 16:08:43 +02:00
pc_piix.c target-i386: Enable x2apic by default on KVM 2014-03-13 19:01:49 +01:00
pc_q35.c target-i386: Enable x2apic by default on KVM 2014-03-13 19:01:49 +01:00
pc_sysfw.c hw/i386/pc_sysfw: support two flash drives 2013-12-23 13:12:34 +02:00
q35-acpi-dsdt.dsl acpi-build: append description for non-hotplug 2014-03-09 21:09:30 +02:00
q35-acpi-dsdt.hex.generated acpi-build: append description for non-hotplug 2014-03-09 21:09:30 +02:00
smbios.c smbios: Set system manufacturer, product & version by default 2013-12-10 13:29:22 +02:00
ssdt-misc.dsl i386: add ACPI table files from seabios 2013-10-14 17:48:51 +03:00
ssdt-misc.hex.generated acpi: pre-compiled ASL files 2013-10-14 17:48:51 +03:00
ssdt-pcihp.dsl acpi-build: append description for non-hotplug 2014-03-09 21:09:30 +02:00
ssdt-pcihp.hex.generated acpi-build: append description for non-hotplug 2014-03-09 21:09:30 +02:00
ssdt-proc.dsl ssdt: fix PBLK length 2013-10-14 17:48:57 +03:00
ssdt-proc.hex.generated pc: ACPI: update acpi-dsdt.hex.generated q35-acpi-dsdt.hex.generated 2014-01-26 13:11:44 +02:00
xen_domainbuild.c aio / timers: Switch entire codebase to the new timer API 2013-08-22 19:14:24 +02:00
xen_domainbuild.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
xen_machine_pv.c hw: Clean up bogus default boot order 2013-08-28 10:16:47 +03:00