Tools

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$ acpidump -h
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
-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 Do not use but dump XSDT
-x -x Do not use or dump XSDT

Invocation without parameters dumps all available tables
Multiple mixed instances of -a, -f, and -n are supported

Example

How to dump apic table

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$ acpidump -n APIC -b
$ ls
apic.dat
$ iasl -d apic.dat
Intel ACPI Component Architecture
ASL+ Optimizing Compiler version 20160527-64
Copyright (c) 2000 - 2016 Intel Corporation

Input file apic.dat, Length 0xB0 (176) bytes
ACPI: APIC 0x0000000000000000 0000B0 (v01 BOCHS BXPCAPIC 00000001 BXPC 00000001)
Acpi Data Table [APIC] decoded
Formatted output: apic.dsl - 7376 bytes
$ ls
apic.dat apic.dsl
$ vim apic.dsl

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

acpidump source code

https://elixir.bootlin.com/linux/v3.14.34/source/tools/power/acpi/tools/acpidump/acpidump.c
https://elixir.bootlin.com/linux/v4.19/source/tools/power/acpi/tools/acpidump
研究acpidump的实现有助于理解acpi。


参考资料:

  1. Linux系统中ACPI Table读取与解析
  2. acpica.org