syntaxcheck

Firmware Test Suite - syntaxcheck test

This test loads the ACPI DSDT and SSDT tables and will check the ACPI machine language inside these tables against the strict Intel IASL assembler. The test disassembles the code and then reassembles it and parses the output to check for any errors. Each error found is annotated with some advice to try explain the error and the possible impact of the error.

The annotation and error message format is as follows:

Line | AML source
------------------------------------------------------------------------------------
01081|                     0xFED40000,         // Range Minimum
01082|                     0xFED44FFF,         // Range Maximum
01083|                     0x00000000,         // Translation Offset
01084|                     0x00000000,         // Length
     |                              ^
     | error 4122: Invalid combination of Length and Min/Max fixed flags
01085|                     ,, , AddressRangeMemory, TypeStatic)
01086|             })
01087|             Method (_CRS, 0, Serialized)
====================================================================================

ADVICE: (for error #4122): This occurs if the length is zero and just one of the
resource MIF/MAF flags are set, or the length is non-zero and resource MIF/MAF flags
are both set. These are illegal combinations and need to be fixed. See section
6.4.3.5 Address Space Resource Descriptors of version 4.0a of the ACPI specification
for more details.
     
FAILED [HIGH] AMLReassemblyErrors: Test 1, Table DSDT (0) reassembly: Found 2 errors,
0 warnings.

Typically the ADVICE text will explain the error in a little more detail and point one to the relevant section of the ACPI specification.

The default mode of this utility is to try and use the host machine's ACPI tables which requires root permissions to be able to load this data from firmware. However, one can load in ACPI tables from other machines using the --dumpfile option. The ACPI tables can be loaded in from the output from acpidump or from using "sudo fwts --dump".

Examples:

sudo fwts syntaxcheck - 

..runs the syntaxcheck test on your machine and dumps the output to stdout.

fwts syntaxcheck --dumpfile=apcidump.dat -

..runs the test using ACPI tables in the dump file acpidump.dat as the input and dumps the test results to stdout.

sudo acpidump > acpidump.dat
fwts syntaxcheck --dumpfile=acpidump.dat

..dumps the tables using acpidump and loads them in and runs the test with results appended to results.log

sudo fwts --dump
fwts syntaxcheck --dumpfile=acpidump.log -

..dumps the tables using fwts and loads them in and runs the test with results going to stdout.

FirmwareTestSuite/Reference/syntaxcheck (last edited 2016-01-11 07:25:16 by anthonywong)