Merge from vendor branch GCC:
[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.16 2004/06/04 19:21:06 ru Exp $
31 .\" $DragonFly: src/usr.sbin/acpi/acpidump/acpidump.8,v 1.1 2004/07/05 00:22:43 dillon Exp $
32 .\"
33 .Dd August 31, 2000
34 .Dt ACPIDUMP 8
35 .Os
36 .Sh NAME
37 .Nm acpidump
38 .Nd dump ACPI tables and ASL
39 .Sh SYNOPSIS
40 .Nm
41 .Op Fl d
42 .Op Fl t
43 .Op Fl h
44 .Op Fl v
45 .Op Fl f Ar dsdt_input
46 .Op Fl o Ar dsdt_output
47 .Sh DESCRIPTION
48 The
49 .Nm
50 utility analyzes ACPI tables in physical memory and can dump them to a file.
51 In addition,
52 .Nm
53 can call
54 .Xr iasl 8
55 to disassemble AML
56 (ACPI Machine Language)
57 found in these tables and dump them as ASL
58 (ACPI Source Language)
59 to stdout.
60 .Pp
61 ACPI tables have an essential data block (the DSDT,
62 Differentiated System Description Table)
63 that includes information used on the kernel side such as
64 detailed information about PnP hardware, procedures for controlling
65 power management support, and so on.
66 The
67 .Nm
68 utility can extract the DSDT data block from physical memory and store it into
69 a DSDT output file and optionally also disassemble it.
70 .Pp
71 When
72 .Nm
73 is invoked without the
74 .Fl f
75 option, it will read ACPI tables from physical memory via
76 .Pa /dev/mem .
77 First it searches for the RSDP
78 (Root System Description Pointer),
79 which has the signature
80 .Qq RSD PTR\ \& ,
81 and then gets the RSDT
82 (Root System Description Table),
83 which includes a list of pointers to physical memory addresses
84 for other tables.
85 The RSDT itself and all other tables linked from RSDT are generically
86 called SDTs
87 (System Description Tables)
88 and their header has a common format which consists of items
89 such as Signature, Length, Revision, Checksum, OEMID, OEM Table ID,
90 OEM Revision, Creator ID and Creator Revision.
91 When invoked with the
92 .Fl t
93 flag, the
94 .Nm
95 utility dumps contents of the following tables:
96 .Pp
97 .Bl -tag -offset indent -width 12345 -compact
98 .It DSDT
99 .It FADT
100 .It HPET
101 .It MADT
102 .It RSD PTR
103 .It RSDT
104 .El
105 .Pp
106 The RSDT contains a pointer to the physical memory address of the FACP
107 (Fixed ACPI Description Table).
108 The FACP defines static system information about power management support
109 (ACPI Hardware Register Implementation)
110 such as interrupt mode (INT_MODEL),
111 SCI interrupt number, SMI command port (SMI_CMD)
112 and the location of ACPI registers.
113 The FACP also has a pointer to a physical memory address for the DSDT.
114 While the other tables are fixed format,
115 the DSDT consists of free-formatted AML data.
116 .Sh OPTIONS
117 The following options are supported by
118 .Nm :
119 .Bl -tag -width indent
120 .It Fl d
121 Disassemble the DSDT into ASL using
122 .Xr iasl 8
123 and print the results to stdout.
124 .It Fl t
125 Dump the contents of the various fixed tables listed above.
126 .It Fl h
127 Displays usage and exit.
128 .It Fl v
129 Enable verbose messages.
130 .It Fl f Ar dsdt_input
131 Load the DSDT from the specified file instead of physical memory.
132 Since only the DSDT is stored in the file, the
133 .Fl t
134 flag may not be used with this option.
135 .It Fl o Ar dsdt_output
136 Store the DSDT data block from physical memory into the specified file.
137 .El
138 .Sh EXAMPLES
139 This example dumps the DSDT from physical memory to foo.dsdt.
140 It also prints the contents of various system tables and disassembles
141 the AML contained in the DSDT to stdout, redirecting the output
142 to foo.asl.
143 .Bd -literal -offset indent
144 # acpidump -t -d -o foo.dsdt > foo.asl
145 .Ed
146 .Pp
147 This example reads a DSDT file and disassembles it to stdout.
148 Verbose messages are enabled.
149 .Bd -literal -offset indent
150 # acpidump -v -d -f foo.dsdt
151 .Ed
152 .Sh BUGS
153 In the current implementation,
154 .Nm
155 does not dump the
156 Secondary System Descriptor Table (SSDT), 
157 Embedded Controller Descriptor Table (ECDT), 
158 or BOOT structures.
159 .Sh FILES
160 .Bl -tag -width /dev/mem
161 .It Pa /dev/mem
162 .El
163 .Sh SEE ALSO
164 .Xr acpi 4 ,
165 .Xr mem 4 ,
166 .Xr acpiconf 8 ,
167 .Xr acpidb 8 ,
168 .Xr iasl 8
169 .Sh AUTHORS
170 .An Doug Rabson Aq dfr@FreeBSD.org
171 .An Mitsuru IWASAKI Aq iwasaki@FreeBSD.org
172 .An Yasuo YOKOYAMA Aq yokoyama@jp.FreeBSD.org
173 .Pp
174 .An -nosplit
175 Some contributions made by
176 .An Chitoshi Ohsawa Aq ohsawa@catv1.ccn-net.ne.jp ,
177 .An Takayasu IWANASHI Aq takayasu@wendy.a.perfect-liberty.or.jp ,
178 .An Yoshihiko SARUMARU Aq mistral@imasy.or.jp ,
179 .An Hiroki Sato Aq hrs@FreeBSD.org ,
180 .An Michael Lucas Aq mwlucas@blackhelicopters.org
181 and
182 .An Michael Smith Aq msmith@FreeBSD.org .
183 .Sh HISTORY
184 The
185 .Nm
186 utility first appeared in
187 .Fx 5.0
188 and was rewritten to use
189 .Xr iasl 8
190 for
191 .Fx 5.2 .