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