Add support for SSDT tables.
[dragonfly.git] / usr.sbin / acpi / acpidump / acpidump.8
1 .\" ACPI (ACPI Package)
2 .\"
3 .\" Copyright (c) 1999 Doug Rabson <dfr@FreeBSD.org>
4 .\" Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org>
5 .\" Copyright (c) 2000 Yasuo YOKOYAMA <yokoyama@jp.FreeBSD.org>
6 .\" Copyright (c) 2000 Hiroki Sato <hrs@FreeBSD.org>
7 .\" All rights reserved.
8 .\"
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
11 .\" are met:
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\"    notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\"    notice, this list of conditions and the following disclaimer in the
16 .\"    documentation and/or other materials provided with the distribution.
17 .\"
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" SUCH DAMAGE.
29 .\"
30 .\" $FreeBSD: src/usr.sbin/acpi/acpidump/acpidump.8,v 1.18 2004/08/16 20:33:20
31 marcel Exp $
32 .\" $DragonFly: src/usr.sbin/acpi/acpidump/acpidump.8,v 1.5 2007/01/10 07:23:49 hsu Exp $
33 .\"
34 .Dd August 31, 2000
35 .Dt ACPIDUMP 8
36 .Os
37 .Sh NAME
38 .Nm acpidump
39 .Nd dump ACPI tables and ASL
40 .Sh SYNOPSIS
41 .Nm
42 .Op Fl d
43 .Op Fl t
44 .Op Fl h
45 .Op Fl v
46 .Op Fl f Ar dsdt_input
47 .Op Fl o Ar dsdt_output
48 .Sh DESCRIPTION
49 The
50 .Nm
51 utility analyzes ACPI tables in physical memory and can dump them to a file.
52 In addition,
53 .Nm
54 can call
55 .Xr iasl 8
56 to disassemble AML
57 (ACPI Machine Language)
58 found in these tables and dump them as ASL
59 (ACPI Source Language)
60 to stdout.
61 .Pp
62 ACPI tables have an essential data block (the DSDT,
63 Differentiated System Description Table)
64 that includes information used on the kernel side such as
65 detailed information about PnP hardware, procedures for controlling
66 power management support, and so on.
67 The
68 .Nm
69 utility can extract the DSDT data block from physical memory and store it into
70 a DSDT output file and optionally also disassemble it.
71 If Secondary System Description Table (SSDT) entries exist, then the DSDT
72 output file will include those tables.
73 Disassembly of the DSDT will also include SSDT tables, if such exist.
74 .Pp
75 When
76 .Nm
77 is invoked without the
78 .Fl f
79 option, it will read ACPI tables from physical memory via
80 .Pa /dev/mem .
81 First it searches for the RSDP
82 (Root System Description Pointer),
83 which has the signature
84 .Qq RSD PTR\ \& ,
85 and then gets the RSDT
86 (Root System Description Table),
87 which includes a list of pointers to physical memory addresses
88 for other tables.
89 The RSDT itself and all other tables linked from RSDT are generically
90 called SDTs
91 (System Description Tables)
92 and their header has a common format which consists of items
93 such as Signature, Length, Revision, Checksum, OEMID, OEM Table ID,
94 OEM Revision, Creator ID and Creator Revision.
95 When invoked with the
96 .Fl t
97 flag, the
98 .Nm
99 utility dumps contents of the following tables:
100 .Pp
101 .Bl -tag -offset indent -width 12345 -compact
102 .It DSDT
103 .It FADT
104 .It HPET
105 .It MADT
106 .It RSD PTR
107 .It RSDT
108 .El
109 .Pp
110 The RSDT contains a pointer to the physical memory address of the FACP
111 (Fixed ACPI Description Table).
112 The FACP defines static system information about power management support
113 (ACPI Hardware Register Implementation)
114 such as interrupt mode (INT_MODEL),
115 SCI interrupt number, SMI command port (SMI_CMD)
116 and the location of ACPI registers.
117 The FACP also has a pointer to a physical memory address for the DSDT.
118 While the other tables are fixed format,
119 the DSDT consists of free-formatted AML data.
120 .Sh OPTIONS
121 The following options are supported by
122 .Nm :
123 .Bl -tag -width indent
124 .It Fl d
125 Disassemble the DSDT into ASL using
126 .Xr iasl 8
127 and print the results to stdout.
128 .It Fl t
129 Dump the contents of the various fixed tables listed above.
130 .It Fl h
131 Displays usage and exit.
132 .It Fl v
133 Enable verbose messages.
134 .It Fl f Ar dsdt_input
135 Load the DSDT from the specified file instead of physical memory.
136 Since only the DSDT is stored in the file, the
137 .Fl t
138 flag may not be used with this option.
139 .It Fl o Ar dsdt_output
140 Store the DSDT data block from physical memory into the specified file.
141 .El
142 .Sh FILES
143 .Bl -tag -width /dev/mem
144 .It Pa /dev/mem
145 .El
146 .Sh EXAMPLES
147 This example dumps the DSDT from physical memory to foo.dsdt.
148 It also prints the contents of various system tables and disassembles
149 the AML contained in the DSDT to stdout, redirecting the output
150 to foo.asl.
151 .Bd -literal -offset indent
152 # acpidump -t -d -o foo.dsdt > foo.asl
153 .Ed
154 .Pp
155 This example reads a DSDT file and disassembles it to stdout.
156 Verbose messages are enabled.
157 .Bd -literal -offset indent
158 # acpidump -v -d -f foo.dsdt
159 .Ed
160 .Sh SEE ALSO
161 .Xr acpi 4 ,
162 .Xr mem 4 ,
163 .Xr acpiconf 8 ,
164 .Xr acpidb 8 ,
165 .Xr iasl 8
166 .Sh HISTORY
167 The
168 .Nm
169 utility first appeared in
170 .Fx 5.0
171 and was rewritten to use
172 .Xr iasl 8
173 for
174 .Fx 5.2 .
175 .Sh AUTHORS
176 .An Doug Rabson Aq dfr@FreeBSD.org
177 .An Mitsuru IWASAKI Aq iwasaki@FreeBSD.org
178 .An Yasuo YOKOYAMA Aq yokoyama@jp.FreeBSD.org
179 .Pp
180 .An -nosplit
181 Some contributions made by
182 .An Chitoshi Ohsawa Aq ohsawa@catv1.ccn-net.ne.jp ,
183 .An Takayasu IWANASHI Aq takayasu@wendy.a.perfect-liberty.or.jp ,
184 .An Yoshihiko SARUMARU Aq mistral@imasy.or.jp ,
185 .An Hiroki Sato Aq hrs@FreeBSD.org ,
186 .An Michael Lucas Aq mwlucas@blackhelicopters.org
187 and
188 .An Michael Smith Aq msmith@FreeBSD.org .
189 .Sh BUGS
190 In the current implementation,
191 .Nm
192 does not dump the
193 Embedded Controller Descriptor Table (ECDT),
194 or BOOT structures.