summaryrefslogtreecommitdiff
path: root/usr.sbin/acpidump/acpidump.8
blob: 22c32eb65d45d7ae9a27d8e00111991410b1e0b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
.\"	$OpenBSD: acpidump.8,v 1.7 2007/10/17 18:58:23 deraadt Exp $
.\"
.\" Copyright (c) 1999 Doug Rabson <dfr@FreeBSD.org>
.\" Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org>
.\" Copyright (c) 2000 Yasuo YOKOYAMA <yokoyama@jp.FreeBSD.org>
.\" Copyright (c) 2000 Hiroki Sato <hrs@FreeBSD.org>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD: src/usr.sbin/acpi/acpidump/acpidump.8,v 1.9 2001/09/05 19:21:25 dd Exp $
.\"
.Dd $Mdocdate: October 17 2007 $
.Dt ACPIDUMP 8
.Os
.Sh NAME
.Nm acpidump
.Nd dump ACPI tables
.Sh SYNOPSIS
.Nm
.Op Fl f Ar dsdt_file_for_input
.Nm
.Op Fl o Ar prefix_for_output
.Sh DESCRIPTION
The
.Nm
command analyzes ACPI tables in physical memory and dumps them to standard output.
In addition,
.Nm
can disassemble some contents of the tables in AML
(ACPI Machine Language)
and dump them in ASL
(ACPI Source Language).
.Pp
ACPI tables have an notably essential data block called DSDT
(Differentiated System Description Table),
that includes information used on the kernel side such as
detailed information about PnP hardware, procedures for controlling
power management support, and so on.
.Nm
can extract a DSDT data block from physical memory and store it into
a DSDT data file, and can also generate an output in ASL
from a given DSDT data file.
.Pp
When
.Nm
is invoked with no options, it will search ACPI tables from physical
memory via a special file
.Pa /dev/mem
and dump them.
First, it searches Root System Description Pointer,
that has a signature
.Qq RSD PTR\ \& ,
and then gets RSDT
(Root System Description Table),
which includes a list of pointers to physical memory addresses
for other tables.
RSDT itself and all other tables linked from RSDT are generically
called SDT
(System Description Table)
and their header has the common format which consists of items
such as Signature, Length, Revision, Checksum, OEMID, OEM Table ID,
OEM Revision, Creator ID, and Creator Revision.
.Nm
dumps the contents of these SDTs.
For further information about the formats of each table,
see chapter 5: ACPI Software Programming Model,
.Dq Advanced Configuration and Power Interface Specification Revision 1.0b
from Intel/Microsoft/Toshiba.
.Pp
There is always a pointer to a physical memory address in RSDT for FACP
(Fixed ACPI Description Table).
FACP defines static system information about power management support
(ACPI Hardware Register Implementation)
such as interrupt mode
(INT_MODEL),
SCI interrupt number, SMI command port
(SMI_CMD),
and the location of ACPI registers.
FACP also has a pointer to a physical memory address for DSDT,
which includes information used on the kernel side such as
PnP, power management support, and so on.
While the other tables are described in a fixed format,
DSDT consists of AML data which is compiled from sources
written in free formatted ASL, a description language for ACPI.
When
.Nm
outputs DSDT, it disassembles the AML data and
translates them into ASL.
.Sh OPTIONS
The following options are supported by
.Nm :
.Bl -tag -width indent
.It Fl f Ar dsdt_file_for_input
Interpret AML data in DSDT from a file specified in
.Ar dsdt_file_for_input
and dumps them in ASL to standard output.
.It Fl o Ar prefix_for_output
Additionally store ACPI tables from physical memory into files specified by
.Ar prefix_for_output .
The files generated will
be of the form <prefix>.<sig>.<id>.
.Dq sig
is the signature of the ACPI Table;
.Dq id
is unique for each table.
.Pp
The following are common table signatures (there may be others):
RSDP, FACP, DSDT, SSDT, HPET, MCFG, SPMI, APIC, SPCR, SRAT, XSDT.
.El
.Sh FILES
.Bl -tag -width /dev/mem
.It Pa /dev/mem
.El
.Sh EXAMPLES
This is an example to get a dump of SDTs and a DSDT data file
simultaneously on a machine that supports ACPI BIOS:
.Pp
.Dl # acpidump -o foo \*(Gt foo.asl
.Pp
This will generate foo.RSDP.x, foo.FACP.x, foo.DSDT.x, etc.
.Sh SEE ALSO
.\" .Xr acpi 4 ,
.Xr mem 4
.\" .Xr acpiconf 8 ,
.\" Xr amldb 8
.Rs
.%T Advanced Configuration and Power Interface Specification
.%A Intel
.%A Microsoft
.%A Toshiba
.%R Revision 1.0b
.%O http://www.teleport.com/~acpi/
.Re
.Sh HISTORY
The
.Nm
command first appeared in
.Ox 3.8 .
.Sh AUTHORS
.An Doug Rabson Aq dfr@FreeBSD.org
.An Mitsuru IWASAKI Aq iwasaki@FreeBSD.org
.An Yasuo YOKOYAMA Aq yokoyama@jp.FreeBSD.org
.Pp
Some contributions made by:
.An Chitoshi Ohsawa Aq ohsawa@catv1.ccn-net.ne.jp ,
.An Takayasu IWANASHI Aq takayasu@wendy.a.perfect-liberty.or.jp ,
.An Yoshihiko SARUMARU Aq mistral@imasy.or.jp ,
.An Hiroki Sato Aq hrs@FreeBSD.org ,
.An Jordan Hargrave Aq jordan@openbsd.org
and
.An Michael Lucas Aq mwlucas@blackhelicopters.org .
.Sh BUGS
In the current implementation,
.Nm
doesn't dump any information of Firmware ACPI Control Structure
(FACS)
specified by a pointer in FACP.