bits-862 released with these changes:
The "A Complicated Parsing Interface (ACPI)" release
Rewrite acpi module to use new unpacking, parsing, and classes
This introduces a new data unpacking infrastructure and class, replacing most of the uses of namedtuple with something more extensible and flexible. The new infrastructure handles nested tables and reused common structures much more cleanly, and automatically generates output code based on field-by-field formatting instructions.
In the process, add support for several new ACPI tables, including the
RSDP
,RSDT
,XSDT
,_MAT
, andFACS
. Also decode more fields of existing tables, and break out some flags fields into individual flags.Update init and testacpi to handle the changes to the acpi API.
Most importantly, this new infrastructure makes it much easier to write tests based on the contents of ACPI tables.
acpi.get_table
: Support retrieving theRSDP
,RSDT
, andXSDT
ACPICA's normal AcpiGetTable does not support retrieving these tables by signature. Add C functions in
_bits
to retrieve them, and then hide the special-casing in a new Python implementation ofget_table
, so thatacpi.get_table
works transparently for these tables.Add new
acpi.show_checksum
function, to compute and display a table's checksumMake
acpi.get_table
's instance parameter default to 1The underlying AcpiGetTable method accepts either 0 or 1 to refer to the first instance, 2 for the second instance, and so on. Using 0 seems inconsistent; let's embrace the 1-based ordering.
acpi: Preserve linebreaks when wrapping, to improve formatting of tables
Avoid returning duplicate signatures in
acpi.get_table_list()
acpi.get_table_list()
returned one copy of a table signature for each instance of a table. Return a sorted list of unique signatures instead.init: Make ACPI-related initialization more robust against exceptions