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