xref: /freebsd/usr.sbin/acpi/acpidump/acpidump.8 (revision a4128aad8503277614f2d214011ef60a19447b83)
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 October 5, 2024
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 f Ar dsdt_input
40.Op Fl h
41.Op Fl o Ar dsdt_output
42.Op Fl t
43.Op Fl T Ar table_name
44.Op Fl v
45.Sh DESCRIPTION
46The
47.Nm
48utility analyzes ACPI tables in physical memory and can dump them to a file.
49In addition,
50.Nm
51can call
52.Xr iasl 8
53to disassemble AML
54(ACPI Machine Language)
55found in these tables and dump them as ASL
56(ACPI Source Language)
57to stdout.
58.Pp
59ACPI tables have an essential data block (the DSDT,
60Differentiated System Description Table)
61that includes information used on the kernel side such as
62detailed information about PnP hardware, procedures for controlling
63power management support, and so on.
64The
65.Nm
66utility can extract the DSDT data block from physical memory and store it into
67an output file and optionally also disassemble it.
68If any Secondary System Description Table
69(SSDT)
70entries exist, they will also be included in the output file and disassembly.
71.Pp
72When
73.Nm
74is invoked without the
75.Fl f
76option, it will read ACPI tables from physical memory via
77.Pa /dev/mem .
78First it searches for the RSDP
79(Root System Description Pointer),
80which has the signature
81.Qq RSD PTR\ \& ,
82and then gets the RSDT
83(Root System Description Table),
84which includes a list of pointers to physical memory addresses
85for other tables.
86The RSDT itself and all other tables linked from RSDT are generically
87called SDTs
88(System Description Tables)
89and their header has a common format which consists of items
90such as Signature, Length, Revision, Checksum, OEMID, OEM Table ID,
91OEM Revision, Creator ID and Creator Revision.
92.Pp
93When invoked with the
94.Fl t
95flag, the
96.Nm
97utility dumps contents of all the ACPI tables, except the DSDT and SSDT.
98The following SDTs are reported in detail, while the remainder will only report
99the common header information:
100.Pp
101.Bl -tag -offset indent -width 12345 -compact
102.It BERT Boot Error Record Table
103Reports any previous boot errors.
104.It DMAR DMA Remapping Table
105Contains information about the DMA remapping necessary for the system
106for I/O virtualization on Intel CPUS.
107.It DSDT Differentiated System Description Table
108Contains the main AML for the system.
109.It ECDT Embedded Controller Boot Resources Table
110Contains information about accessing the embedded controller
111prior to the OS decoding the DSDT for all its details.
112.It EINJ Error Injection Table
113Use to inject hardware errors to the error reporting mechanisms.
114.It ERST Error Record Serialization Table
115Information to retrieve and manage errors reported from the hardware.
116.It FACS Firmware ACPI Control Structure
117Information for the OS to interact with the firmware for things
118like suspend / resume and prevent mutual access to resources
119shared between the OS and the firmware.
120.It FACP Fixed ACPI Description Table (FADT)
121Information related to power management, and other CPU related data.
122.It HEST Hardware Error Source Table
123Describes the possible sources of hardware errors to the OS.
124.It HPET High Precision Event Timer Table
125Describes the high precision timers in the system.
126.It IVRS I/O Virtualization Reporting Structure
127Information for hypvervisors to use to share I/O resources on AMD
128processors.
129.It LPIT Low Power Idle Table
130Power management information for reducing power usage of the system.
131.It MADT Multiple APIC Description Table
132Describes all the Advanced Programmable Interrupt Controllers and
133Intel Streamlined Advanced Programmable Interrupt Controller present
134in the system.
135.It MCFG PCI Express Memory-mapped Configuration
136PCI config space base address register.
137.It NFIT NVDIMM Firmware Interface Table
138NVDIMM information in the system.
139.It RSD PTR
140Pointer to the RSDT.
141.It RSDT Root System Description Table
142An array of physical pointers to other system description tables,
143the FACP (Fixed ACPI Description Table).
144.It SLIT System Locality Distance Information Table
145Provides information about the cost of communicating between different
146parts of the system (NUMA).
147.It SPCR Serial Port Console Redirection
148Contains informatiom about any serial port that the firmware used as
149a reporting console.
150.It SRAT System Resource Affinity Table
151Defines the domains of locality in the system for processors, memory
152and generic initiators (eg PCIe root complexes).
153.It TCPA Trusted Computing Platform Alliance
154Information about the TPM elements of the system.
155.It TPM2 Trusted Platform Module 2
156Additional information about newer TPM hardware.
157.It WDDT Watchdog Timer Description Table
158Information about how to manage watchdog timers in the system.
159.El
160.Pp
161The FACP defines static system information about power management support
162(ACPI Hardware Register Implementation)
163such as interrupt mode (INT_MODEL),
164SCI interrupt number, SMI command port (SMI_CMD)
165and the location of ACPI registers.
166The FACP also has a pointer to a physical memory address for the DSDT.
167While the other tables are fixed format,
168the DSDT consists of free-formatted AML data.
169.Sh OPTIONS
170The following options are supported by
171.Nm :
172.Bl -tag -width indent
173.It Fl d
174Concatenate the DSDT and the SSDT's into single image and disassemble the image into ASL using
175.Xr iasl 8
176and print the results to stdout.
177.It Fl t
178Dump the contents of the various fixed tables listed above.
179.It Fl T ar table_name
180Dump the contents of the specific table.
181All ACPI tables are exactly 4 characters long.
182.It Fl h
183Displays usage and exit.
184.It Fl s
185Disassemble each of the DSDT and the SSDT's into ASL using
186.Xr iasl 8
187and print the results to stdout.
188This will avoid
189.Xr iasl 8
190error on disassembling concatenated image.
191If both
192.Fl d
193and
194.Fl s
195are specified, the last option is effective.
196.It Fl v
197Enable verbose messages.
198.It Fl f Ar dsdt_input
199Load the DSDT from the specified file instead of physical memory.
200Since only the DSDT is stored in the file, the
201.Fl t
202flag may not be used with this option.
203.It Fl o Ar dsdt_output
204Store the DSDT data block from physical memory into the specified file.
205.El
206.Sh FILES
207.Bl -tag -width /dev/mem
208.It Pa /dev/mem
209.El
210.Sh EXAMPLES
211If a developer requests a copy of your ASL, please use the following
212command to dump all tables and compress the result.
213.Bd -literal -offset indent
214# acpidump -dt | gzip -c9 > my_computer.asl.gz
215.Ed
216.Pp
217This example dumps the DSDT from physical memory to foo.dsdt.
218It also prints the contents of various system tables and disassembles
219the AML contained in the DSDT to stdout, redirecting the output
220to foo.asl.
221.Bd -literal -offset indent
222# acpidump -t -d -o foo.dsdt > foo.asl
223.Ed
224.Pp
225This example reads a DSDT file and disassembles it to stdout.
226Verbose messages are enabled.
227.Bd -literal -offset indent
228# acpidump -v -d -f foo.dsdt
229.Ed
230.Sh SEE ALSO
231.Xr acpi 4 ,
232.Xr mem 4 ,
233.Xr acpiconf 8 ,
234.Xr acpidb 8 ,
235.Xr iasl 8
236.Sh HISTORY
237The
238.Nm
239utility first appeared in
240.Fx 5.0
241and was rewritten to use
242.Xr iasl 8
243for
244.Fx 5.2 .
245.Sh AUTHORS
246.An Doug Rabson Aq Mt dfr@FreeBSD.org
247.An Mitsuru IWASAKI Aq Mt iwasaki@FreeBSD.org
248.An Yasuo YOKOYAMA Aq Mt yokoyama@jp.FreeBSD.org
249.An Nate Lawson Aq Mt njl@FreeBSD.org
250.Pp
251.An -nosplit
252Some contributions made by
253.An Chitoshi Ohsawa Aq Mt ohsawa@catv1.ccn-net.ne.jp ,
254.An Takayasu IWANASHI Aq Mt takayasu@wendy.a.perfect-liberty.or.jp ,
255.An Yoshihiko SARUMARU Aq Mt mistral@imasy.or.jp ,
256.An Hiroki Sato Aq Mt hrs@FreeBSD.org ,
257.An Michael Lucas Aq Mt mwlucas@blackhelicopters.org
258and
259.An Michael Smith Aq Mt msmith@FreeBSD.org .
260.Sh BUGS
261The current implementation does not dump the BOOT structure or
262other miscellaneous tables.
263