Linux Read ACPI Table Tools.

ACPI tools的安装:

#yum install acpica-tools

或者到下面链接下载源码:

下面示例是解析SSDT1表的步骤。

#acpidump -o ACPI_table.out

#acpixtract -a ACPI_table.out

Intel ACPI Component Architecture

ACPI Binary Table Extraction Utility version 20150619-64

Copyright (c) 2000 – 2015 Intel Corporation

Acpi table [BDAT] – 48 bytes written to bdat.dat

Acpi table [APIC] – 772 bytes written to apic.dat

Acpi table [BERT] – 48 bytes written to bert.dat

Acpi table [DMAR] – 272 bytes written to dmar.dat

Acpi table [DSDT] – 177247 bytes written to dsdt.dat

Acpi table [EINJ] – 336 bytes written to einj.dat

Acpi table [FACP] – 268 bytes written to facp.dat

Acpi table [FACS] – 64 bytes written to facs.dat

Acpi table [ERST] – 560 bytes written to erst.dat

Acpi table [FIDT] – 156 bytes written to fidt.dat

Acpi table [FPDT] – 68 bytes written to fpdt.dat

Acpi table [HEST] – 168 bytes written to hest.dat

Acpi table [HPET] – 56 bytes written to hpet.dat

Acpi table [MCEJ] – 304 bytes written to mcej.dat

Acpi table [MCFG] – 60 bytes written to mcfg.dat

Acpi table [PMCT] – 100 bytes written to pmct.dat

Acpi table [PRAD] – 258 bytes written to prad.dat

Acpi table [SPMI] – 64 bytes written to spmi.dat

Acpi table [UEFI] – 66 bytes written to uefi.dat

Acpi table [WDDT] – 64 bytes written to wddt.dat

Acpi table [SSDT] – 60841 bytes written to ssdt1.dat

Acpi table [SSDT] – 8516 bytes written to ssdt2.dat

Acpi table [SSDT] – 100 bytes written to ssdt3.dat

#iasl -d ssdt1.dat

intel ACPI Component Architecture

ASL+ Optimizing Compiler version 20150619-64

Copyright (c) 2000 – 2015 Intel Corporation

Reading ACPI table from file ssdt1.dat – Length 00060841 (0x00EDA9)

ACPI: SSDT 0x0000000000000000 00EDA9 (v01 ALASKA PmMgt 00000001 INTL 20120913)

Acpi table [SSDT] successfully installed and loaded

Pass 1 parse of [SSDT]

Pass 2 parse of [SSDT]

Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

Parsing completed

Disassembly completed

ASL Output: ssdt1.dsl – 632824 bytes

#

ssdt1.dsl文件格式为文本文件,可以直接查看其中的内容了。

acpidump– dump a system’s ACPI tables to an ASCII file

acpixtract– convert ASCII acpidump output to raw binary table

turbostat– gather performance statistics

NAME

acpidump – dump a system’s ACPI tables to an ASCII file

acpixtract – convert ASCII acpidump output to raw binary table

turbostat – gather performance statistics

SYNOPSIS

acpidump [options]

acpixtract [options] [filename]

turbostat [options] [command [arg]…]

DESCRIPTION

This manual page documents briefly the acpidump , acpixtract and

turbostat commands.

turbostat reads hardware registers and gather statistics on the

processor clock frequency and C-state usage. Works properly on Nehalem

and newer processors and on Linux kernel 2.6.30 and later versions.

OPTIONS

acpidump options are as follow:

-a, –addr 0x1234

look for tables at this phisical address

-t, –table DSDT

only dump table with DSDT signature

-o, –output filename

redirect output from stdin to filename

-b, –binary

dump data in binary form rather than in hex-dump format

-l, –lenght 0x456

works only with –addr, dump phisical memory region without

trying to understand it’s contents

-s, –skip 2

skip 2 tables of the given name and output only 3rd one

-h, –help

outputs an help message

OPTIONS

acpixtract options are as follow:

-a extract all tables, not just DSDT/SSDT

-l list table summaries, do not extract

-s

Extract all tables named

OPTIONS

turbostat options are as follow:

-v makes turbostat more verbose

-i

polling interval, default is 5

When given a command turbostat runs it and outputs statistics gathered

while the program was running.

EXAMPLES

Dump the DSDT table to the file DSDT.aml in binary format (this can be

disassembled later with iasl(1)):

acpidump -b -t DSDT -o DSDT.aml

Show the FACP table:

acpidump -t FACP > FACP.dat

acpixtract -a FACP.dat

iasl -d FACP.dat

Dump and extract all ACPI tables:

acpidump -o DSDT.dat

acpixtract -a

Parse APIC tables:

acpidump -o DSDT.dat

acpixtract -sAPIC DSDT.dat

SEE ALSO

iasl(1),

IASL:ACPI Source Language compiler/decompiler

SYNOPSIS

iasl [options] [input file]

DESCRIPTION

This manual page documents briefly the iasl command. The option list is

taken from the iasl interactive help.

iasl is an ASL compiler and decompiler.

OPTIONS

General Output

-p

Specify filename prefix for all output files (including .aml)

-vi Less verbose errors and warnings for use with IDEs

-vo Enable optimization comments

-vr Disable remarks

-vsDisable signon

AML Output Files

-s

Create AML in assembler or C source file (*.asm or *.c)

-i

Create assembler or C include file (*.inc or *.h)

-t

Create AML in assembler or C hex table (*.hex)

AML Code Generation

-oa Disable all optimizations (compatibility mode)

-of Disable constant folding

-oi Disable integer optimization to Zero/One/Ones

-on Disable named reference string optimization

-r

Override table header Revision (1-255)

Listings

-l Create mixed listing file (ASL source and AML) (*.lst)

-ln Create namespace file (*.nsp)

-ls Create combined source file (expanded includes) (*.src)

AML Disassembler

-d [file]

Disassemble AML to ASL source code file (*.dsl)

-dc [file]

Disassemble AML and immediately compile it

(Obtain DSDT from current system if no input file)

-e Generate External() statements for unresolved symbols

-g Get ACPI tables and write to files (*.dat)

Miscellaneous

-a Verify source file is entirely ASCII text (0x00-0x7F)

Help

-h Additional help and compiler debug options

-hc Display operators allowed in constant expressions

-hr Display ACPI reserved method names

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐