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