]> xenbits.xensource.com Git - seabios.git/commitdiff
Fix aml_name_string() to recognize block name modifiers.
authorGleb Natapov <gleb@redhat.com>
Sun, 20 May 2012 09:03:38 +0000 (12:03 +0300)
committerKevin O'Connor <kevin@koconnor.net>
Fri, 22 Jun 2012 01:04:24 +0000 (21:04 -0400)
Signed-off-by: Gleb Natapov <gleb@redhat.com>
tools/acpi_extract.py

index 5f613e4ac92078b39cc25515967a3231629fab19..8038269971452059aeaaba6b505787818fed836e 100755 (executable)
@@ -121,7 +121,11 @@ def aml_name_string(offset):
     if (aml[offset] != 0x08):
         die( "Name offset 0x%x: expected 0x08 actual 0x%x" %
              (offset, aml[offset]));
-    return offset + 1;
+    offset += 1
+    # Block Name Modifier. Skip it.
+    if (aml[offset] == 0x5c or aml[offset] == 0x5e):
+        offset += 1
+    return offset;
 
 # Given data offset, find dword const offset
 def aml_data_dword_const(offset):