ACPICA 官方提供了一些工具可供直接使用,具体列表如下:
acpibin.exe | A binary AML file tool 提供了 AML 文件比较功能,AML文件转 TEXT, TEXT转 AML ,显示AML文件头,重新计算填充 AML Checksum的功能,删除注释提供简洁代码(Terse mode),显示编译时间日期 |
Usage: acpibin [options] Options: -a <File1> <File2> Compare two binary AML files, dump all mismatches -c <File1> <File2> Compare two binary AML files, dump first 100 mismatches -d <In> <Out> Dump AML binary to text file -o <Value> Start comparison at this offset into second file -h <File> Display table header for binary AML file -s <File> Update checksum for binary AML file -t Terse mode -v Display version information -vd Display build date and time | |
acpidump.exe | Dump System ACPI Tables 读取当前系统中 ACPI Table 的工具。以文本方式输出。配合AcpiXtract 可以实现DSDR和SSDT的合并。 |
Usage: acpidump [options] Options: -b Dump tables to binary files -h -? This help message -o <File> Redirect output to file -r <Address> Dump tables from specified RSDP -s Print table summaries only -v Display version information -vd Display build date and time -z Verbose mode Table Options: -a <Address> Get table via a physical address -c <on|off> Turning on/off customized table dumping -f <BinaryFile> Get table via a binary file -n <Signature> Get table via a name/signature -x Use RSDT instead of XSDT | |
acpiexec.exe | User Mode ACPI Execution/Simulation 在用户模式下运行一些 ACPI 命令/模拟,需要注意的是这些操作都是和硬件无关的。 |
Usage: acpiexec [options] AMLfile1 AMLfile2 … Options: -b “CommandLine” Batch mode command line execution (cmd1;cmd2;…) -h -? Display this help message -m [Method] Batch mode method execution. Default=MAIN -da Disable method abort on error -df Disable Local fault handler -di Disable execution of STA/INI methods during init -do Disable Operation Region address simulation -dr Disable repair of method return values -ds Disable method auto-serialization -dt Disable allocation tracking (performance) -ed Enable timer output for Debug Object -ef Enable display of final memory statistics -ei Enable additional tests for ACPICA interfaces -el Enable loading of additional test tables -eo Enable object evaluation log -es Enable Interpreter Slack Mode -et Enable debug semaphore timeout -fi <File> Specify namespace initialization file -fv <Value> Operation Region initialization fill value -l Load tables and namespace only -r Use hardware-reduced FADT V5 -te Exit loop on timeout instead of aborting method -to <Seconds> Set timeout period for AML while loops -v Display version information -va Display verbose dump of any memory leaks -vd Display build date and time -vh Verbose exception handler output -vi Verbose initialization output -vr Verbose region handler output -x <DebugLevel> Debug output level | |
acpihelp.exe | Display ACPI Help Information |
显示当前工具支持的 ASL 操作和关键字,预定义信息等等。我个人的理解是:这一套工具可以自行扩展,或者说新版本可能会增加新定义的操作等等,这个工具能够输出当前支持的操作和关键字这种信息。 | |
Usage: acpihelp <options> [Name/Prefix | HexValue] Options: -h Display help -v Display version information -vd Display build date and time AML Names and Encodings (ACPI Machine Language): -a [Name/Prefix | *] Display both ASL operator and AML opcode name(s) -g [Name/Prefix | *] Display AML grammar elements(s) -m [Name/Prefix | *] Display AML opcode name(s) ACPI Values: -e [HexValue] Decode ACPICA exception code -o [HexValue] Decode hex AML opcode -x [HexValue] Decode iASL exception code ASL Names and Symbols (ACPI Source Language): -k [Name/Prefix | *] Display ASL non-operator keyword(s) -p [Name/Prefix | *] Display ASL predefined method name(s) -s [Name/Prefix | *] Display ASL operator name(s) Other miscellaneous ACPI Names: -i [Name/Prefix | *] Display ACPI/PNP Hardware ID(s) -d Display iASL Preprocessor directives -t Display supported ACPI tables -u Display ACPI-related UUIDs Name/Prefix or HexValue not specified means “Display All” Default search with valid Name/Prefix and no options: Find ASL/AML operator names – if NamePrefix does not start with underscore Find ASL predefined method names – if NamePrefix starts with underscore | |
acpisrc.exe | Convert ACPICA Source Code 将 ASL code 转为为 Linux 代码格式 |
Usage: acpisrc [-c|l|u] [-dsvy] <SourceDir> <DestinationDir> Options: -a <file> Check entire file for non-printable characters -c Generate cleaned version of the source -h Insert dual-license header into all modules -i Cleanup macro indentation -l Generate Linux version of the source -u Generate Custom source translation -d Leave debug statements in code -s Generate source statistics only -v Display version information -vb Verbose mode -vd Display build date and time -y Suppress file overwrite prompts | |
acpixtract.exe | Extract ACPI Tables 分析前面AcpiDump输出的结果,可以实现 DSDT和SSDT 的合并 |
Usage: acpixtract [option] <InputFile> Options: -a Extract all tables, not just DSDT/SSDT -f Force extraction, even if there are errors -l List table summaries, do not extract -m Extract multiple DSDT/SSDTs to a single file -s <signature> Extract all tables with <signature> -v Display version information -vd Display build date and time Extract binary ACPI tables from text acpidump output Default invocation extracts the DSDT and all SSDTs | |
iasl | Compiler 完整的 ASL/AML 编译/反编译工具 |
Usage: iasl [Options] [Files] General: -@ <file> Specify command file -I <dir> Specify additional include directory -p <prefix> Specify path/filename prefix for all output files -v Display compiler version -vd Display compiler build date and time -vo Enable optimization comments -vs Disable signon -ld Disable deterministic output Help: -h This message -hc Display operators allowed in constant expressions -hd Info for obtaining and disassembling binary ACPI tables -hf Display help for output filename generation -hr Display ACPI reserved method names -ht Display currently supported ACPI table names Preprocessor: -D <symbol> Define symbol for preprocessor use -li Create preprocessed output file (*.i) -P Preprocess only and create preprocessor output file (*.i) -Pn Disable preprocessor Errors, Warnings, and Remarks: -va Disable all errors/warnings/remarks -ve Report only errors (ignore warnings and remarks) -vi Less verbose errors and warnings for use with IDEs -vr Disable remarks -vw <messageid> Ignore specific error, warning or remark -vx <messageid> Expect a specific warning, remark, or error -w <1|2|3> Set warning reporting level -we Report warnings as errors -ww <messageid> Report specific warning or remark as error AML Bytecode Generation (*.aml): -oa Disable all optimizations (compatibility mode) -of Disable constant folding -oi Disable integer optimization to Zero/One/Ones -on Disable named reference string optimization -ot Disable typechecking -cr Disable Resource Descriptor error checking -in Ignore NoOp operators -r <revision> Override table header Revision (1-255) Listings: -l Create mixed listing file (ASL source and AML) (*.lst) -lm Create hardware summary map file (*.map) -ln Create namespace file (*.nsp) -ls Create combined source file (expanded includes) (*.src) -lx Create cross-reference file (*.xrf) Firmware Support – C Text Output: -tc Create hex AML table in C (*.hex) -sc Create named hex AML arrays in C (*.c) -ic Create include file in C for -sc symbols (*.h) -so Create namespace AML offset table in C (*.offset.h) Firmware Support – Assembler Text Output: -ta Create hex AML table in assembler (*.hex) -sa Create named hex AML arrays in assembler (*.asm) -ia Create include file in assembler for -sa symbols (*.inc) Firmware Support – ASL Text Output: -ts Create hex AML table in ASL (Buffer object) (*.hex) Legacy-ASL to ASL+ Converter: -ca <file> Convert legacy-ASL source file to new ASL+ file (Original comments are passed through to ASL+ file) Data Table Compiler: -tp Compile tables with flex/bison prototype -G Compile custom table that contains generic operators -T <sig list>|ALL Create ACPI table template/example files -T <count> Emit DSDT and <count> SSDTs to same file -vt Create verbose template files (full disassembly) AML Disassembler: -d <f1 f2 …> Disassemble or decode binary ACPI tables to file (*.dsl) (Optional, file type is automatically detected) -da <f1 f2 …> Disassemble multiple tables from single namespace -db Do not translate Buffers to Resource Templates -dc <f1 f2 …> Disassemble AML and immediately compile it (Obtain DSDT from current system if no input file) -df Force disassembler to assume table contains valid AML -dl Emit legacy ASL code only (no C-style operators) -ds <signature(4)> Specify a table signature(4) (CDAT table only) -e <f1 f2 …> Include ACPI table(s) for external symbol resolution -fe <file> Specify external symbol declaration file -in Ignore NoOp opcodes -l Disassemble to mixed ASL and AML code -vt Dump binary table data in hex format within output file Debug Options: -bc Create converter debug file (*.cdb) -bf Create debug file (full output) (*.txt) -bs Create debug file (parse tree only) (*.txt) -bp <depth> Prune ASL parse tree -bt <type> Object type to be pruned from the parse tree -f Ignore errors, force creation of AML output file(s) -m <size> Set internal line buffer size (in Kbytes) -n Parse only, no output generation -oc Display compile times and statistics -x <level> Set debug level for trace output -z Do not insert new compiler ID for DataTables |