1.\" $NetBSD: acpidump.8,v 1.17 2020/12/06 02:57:30 jmcneill Exp $ 2.\" ACPI (ACPI Package) 3.\" 4.\" Copyright (c) 1999 Doug Rabson <dfr@FreeBSD.org> 5.\" Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org> 6.\" Copyright (c) 2000 Yasuo YOKOYAMA <yokoyama@jp.FreeBSD.org> 7.\" Copyright (c) 2000 Hiroki Sato <hrs@FreeBSD.org> 8.\" All rights reserved. 9.\" 10.\" Redistribution and use in source and binary forms, with or without 11.\" modification, are permitted provided that the following conditions 12.\" are met: 13.\" 1. Redistributions of source code must retain the above copyright 14.\" notice, this list of conditions and the following disclaimer. 15.\" 2. Redistributions in binary form must reproduce the above copyright 16.\" notice, this list of conditions and the following disclaimer in the 17.\" documentation and/or other materials provided with the distribution. 18.\" 19.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" SUCH DAMAGE. 30.\" 31.\" $FreeBSD: head/usr.sbin/acpi/acpidump/acpidump.8 267668 2014-06-20 09:57:27Z bapt $ 32.\" 33.Dd December 4, 2020 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 cdhstv 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/acpi . 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 APIC 99.It BERT 100.It BGRT 101.It BOOT 102.It CPEP 103.It CSRT 104.It DBG2 105.It DBGP 106.It DMAR 107.It DSDT 108.It ECDT 109.It EINJ 110.It ERST 111.It FACS 112.It FADT 113.It GTDT 114.It HEST 115.It HPET 116.It IORT 117.It LPIT 118.It MADT 119.It MCFG 120.It MSCT 121.It NFIT 122.It PPTT 123.It RSD PTR 124.It RSDT 125.It SBST 126.It SLIT 127.It SPCR 128.It SPMI 129.It SRAT 130.It TCPA 131.It TPM2 132.It UEFI 133.It WAET 134.It WDAT 135.It WDDT 136.It WDRT 137.El 138.Pp 139The RSDT contains a pointer to the physical memory address of the FACP 140(Fixed ACPI Description Table). 141The FACP defines static system information about power management support 142(ACPI Hardware Register Implementation) 143such as interrupt mode (INT_MODEL), 144SCI interrupt number, SMI command port (SMI_CMD) 145and the location of ACPI registers. 146The FACP also has a pointer to a physical memory address for the DSDT. 147While the other tables are fixed format, 148the DSDT consists of free-formatted AML data. 149.Sh OPTIONS 150The following options are supported by 151.Nm : 152.Bl -tag -width indent 153.It Fl c 154Dump unknown table data as characters instead of hex. 155.It Fl d 156Disassemble the DSDT into ASL using 157.Xr iasl 8 158and print the results to stdout. 159.It Fl f Ar dsdt_input 160Load the DSDT from the specified file instead of physical memory. 161Since only the DSDT is stored in the file, the 162.Fl t 163flag may not be used with this option. 164.It Fl h 165Displays usage and exit. 166.It Fl o Ar dsdt_output 167Store the DSDT data block from physical memory into the specified file. 168.It Fl s 169Skip tables with bad checksums. 170.It Fl t 171Dump the contents of the various fixed tables listed above. 172.It Fl v 173Enable verbose messages. 174.El 175.Sh FILES 176.Bl -tag -width /dev/acpi 177.It Pa /dev/acpi 178.El 179.Sh EXAMPLES 180If a developer requests a copy of your ASL, please use the following 181command to dump all tables and compress the result. 182.Bd -literal -offset indent 183# acpidump -dt | gzip -c9 > my_computer.asl.gz 184.Ed 185.Pp 186This example dumps the DSDT from physical memory to foo.dsdt. 187It also prints the contents of various system tables and disassembles 188the AML contained in the DSDT to stdout, redirecting the output 189to foo.asl. 190.Bd -literal -offset indent 191# acpidump -t -d -o foo.dsdt > foo.asl 192.Ed 193.Pp 194This example reads a DSDT file and disassembles it to stdout. 195Verbose messages are enabled. 196.Bd -literal -offset indent 197# acpidump -v -d -f foo.dsdt 198.Ed 199.Sh SEE ALSO 200.Xr acpi 4 , 201.\" .Xr mem 4 , 202.\" .Xr acpiconf 8 , 203.Xr amldb 8 , 204.Xr iasl 8 205.Sh HISTORY 206The 207.Nm 208utility first appeared in 209.Fx 5.0 210and was rewritten to use 211.Xr iasl 8 212for 213.Fx 5.2 . 214.Sh AUTHORS 215.An Doug Rabson Aq Mt dfr@FreeBSD.org 216.An Mitsuru IWASAKI Aq Mt iwasaki@FreeBSD.org 217.An Yasuo YOKOYAMA Aq Mt yokoyama@jp.FreeBSD.org 218.An Nate Lawson Aq Mt njl@FreeBSD.org 219.Pp 220.An -nosplit 221Some contributions made by 222.An Chitoshi Ohsawa Aq Mt ohsawa@catv1.ccn-net.ne.jp , 223.An Takayasu IWANASHI Aq Mt takayasu@wendy.a.perfect-liberty.or.jp , 224.An Yoshihiko SARUMARU Aq Mt mistral@imasy.or.jp , 225.An Hiroki Sato Aq Mt hrs@FreeBSD.org , 226.An Michael Lucas Aq Mt mwlucas@blackhelicopters.org 227and 228.An Michael Smith Aq Mt msmith@FreeBSD.org . 229.Sh BUGS 230The current implementation does not dump 231some miscellaneous tables. 232