aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-11-03 22:51:07 +0000
committerPeter Maydell <peter.maydell@linaro.org>2014-11-03 22:51:08 +0000
commit949ca9e479c381a63ddb257adca1a6f0c44d898e (patch)
treec0ef67123c24a2474fe31ea17a924cbac424f53f /scripts
parent47e8acb45feddcbc340583781b53935459330db2 (diff)
parentd43f0d641e366251bd9c63005241775f672bf3ec (diff)
downloadqemu-949ca9e479c381a63ddb257adca1a6f0c44d898e.zip
qemu-949ca9e479c381a63ddb257adca1a6f0c44d898e.tar.gz
qemu-949ca9e479c381a63ddb257adca1a6f0c44d898e.tar.bz2
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
pc, virtio, misc bugfixes A bunch of minor bugfixes all over the place. changes from v2: added cpu hotplug rework added default vga type switch more fixes changes from v1: fix for test re-generation script add missing acks to two patches Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Mon 03 Nov 2014 16:33:13 GMT using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" * remotes/mst/tags/for_upstream: (28 commits) vga: flip qemu 2.2 pc machine types from cirrus to stdvga vga: add default display to machine class vhost-user: fix mmap offset calculation hw/i386/acpi-build.c: Fix memory leak in acpi_build_tables_cleanup() smbios: Encode UUID according to SMBIOS specification pc: Add pc_compat_2_1() function hw/virtio/vring/event_idx: fix the vring_avail_event error hw/pci: fixed hotplug crash when using rombar=0 with devices having romfile hw/pci: fixed error flow in pci_qdev_init -machine vmport=off: Allow disabling of VMWare ioport emulation acpi/cpu-hotplug: introduce helper function to keep bit setting in one place cpu-hotplug: rename function for better readability qom/cpu: remove the unused CPU hot-plug notifier pc: Update rtc_cmos in pc_cpu_plug pc: add cpu hotplug handler to PC_MACHINE acpi:piix4: convert cpu hotplug to hotplug_handler API acpi:ich9: convert cpu hotplug to hotplug_handler API acpi/cpu: add cpu hotplug callback function to match hotplug_handler API acpi: create separate file for TCPA log tests: fix rebuild-expected-aml.sh for acpi-test rename ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/acpi_extract.py23
1 files changed, 14 insertions, 9 deletions
diff --git a/scripts/acpi_extract.py b/scripts/acpi_extract.py
index 22ea468..10c1ffb 100755
--- a/scripts/acpi_extract.py
+++ b/scripts/acpi_extract.py
@@ -139,13 +139,16 @@ def aml_name_string(offset):
offset += 1
return offset;
-# Given data offset, find 8 byte buffer offset
-def aml_data_buffer8(offset):
- #0x08 NameOp NameString DataRef
- expect = [0x11, 0x0B, 0x0A, 0x08]
+# 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, aml[offset:offset+4], expect))
+ (offset, expect, aml[offset:offset+4]))
return offset + len(expect)
# Given data offset, find dword const offset
@@ -172,9 +175,9 @@ def aml_data_byte_const(offset):
(offset, aml[offset]));
return offset + 1;
-# Find name'd buffer8
-def aml_name_buffer8(offset):
- return aml_data_buffer8(aml_name_string(offset) + 4)
+# 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):
@@ -308,7 +311,9 @@ for i in range(len(asl)):
output[array] = aml
continue
if (directive == "ACPI_EXTRACT_NAME_BUFFER8"):
- offset = aml_name_buffer8(offset)
+ 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"):