[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 05/29] i386: Add an ACPI_EXTRACT_NAME_BUFFER16 direct
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 05/29] i386: Add an ACPI_EXTRACT_NAME_BUFFER16 directive. |
Date: |
Mon, 3 Nov 2014 14:44:58 +0200 |
From: Gal Hammer <address@hidden>
Add a 16-bytes buffer to allow storing a 128-bit UUID value in an
ACPI table.
Signed-off-by: Gal Hammer <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
scripts/acpi_extract.py | 23 ++++++++++++++---------
1 file 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"):
--
MST
- [Qemu-devel] [PULL 00/29] pc, virtio, misc bugfixes, Michael S. Tsirkin, 2014/11/03
- [Qemu-devel] [PULL 01/29] smbios: Fix assertion on socket count calculation, Michael S. Tsirkin, 2014/11/03
- [Qemu-devel] [PULL 02/29] well-defined listing order for machine types, Michael S. Tsirkin, 2014/11/03
- [Qemu-devel] [PULL 03/29] i386/pc: add piix and q35 machtypes to sorting families for -M \?, Michael S. Tsirkin, 2014/11/03
- [Qemu-devel] [PULL 04/29] pc: Fix disabling of vapic for compat PC models, Michael S. Tsirkin, 2014/11/03
- [Qemu-devel] [PULL 05/29] i386: Add an ACPI_EXTRACT_NAME_BUFFER16 directive.,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 06/29] pcie: change confused comment clearer, Michael S. Tsirkin, 2014/11/03
- [Qemu-devel] [PULL 08/29] intel_iommu: fix VTD_SID_TO_BUS, Michael S. Tsirkin, 2014/11/03
- [Qemu-devel] [PULL 07/29] virtio-pci: fix migration for pci bus master, Michael S. Tsirkin, 2014/11/03
- [Qemu-devel] [PULL 09/29] tests: fix rebuild-expected-aml.sh for acpi-test rename, Michael S. Tsirkin, 2014/11/03
- [Qemu-devel] [PULL 10/29] acpi: create separate file for TCPA log, Michael S. Tsirkin, 2014/11/03
- [Qemu-devel] [PULL 12/29] acpi:ich9: convert cpu hotplug to hotplug_handler API, Michael S. Tsirkin, 2014/11/03
- [Qemu-devel] [PULL 11/29] acpi/cpu: add cpu hotplug callback function to match hotplug_handler API, Michael S. Tsirkin, 2014/11/03
- [Qemu-devel] [PULL 13/29] acpi:piix4: convert cpu hotplug to hotplug_handler API, Michael S. Tsirkin, 2014/11/03
- [Qemu-devel] [PULL 14/29] pc: add cpu hotplug handler to PC_MACHINE, Michael S. Tsirkin, 2014/11/03
- [Qemu-devel] [PULL 15/29] pc: Update rtc_cmos in pc_cpu_plug, Michael S. Tsirkin, 2014/11/03