1.\" $NetBSD: acpidump.8,v 1.10 2017/09/01 18:35:50 msaitoh 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 September 1, 2017 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/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 APIC 99.It BERT 100.It BOOT 101.It CPEP 102.It DBG2 103.It DBGP 104.It DMAR 105.It DSDT 106.It ECDT 107.It EINJ 108.It ERST 109.It FACS 110.It FADT 111.It HEST 112.It HPET 113.It MADT 114.It MCFG 115.It MSCT 116.It NFIT 117.It RSD PTR 118.It RSDT 119.It SBST 120.It SLIT 121.It SPCR 122.It SPMI 123.It SRAT 124.It TCPA 125.It UEFI 126.It WAET 127.It WDAT 128.It WDDT 129.It WDRT 130.El 131.Pp 132The RSDT contains a pointer to the physical memory address of the FACP 133(Fixed ACPI Description Table). 134The FACP defines static system information about power management support 135(ACPI Hardware Register Implementation) 136such as interrupt mode (INT_MODEL), 137SCI interrupt number, SMI command port (SMI_CMD) 138and the location of ACPI registers. 139The FACP also has a pointer to a physical memory address for the DSDT. 140While the other tables are fixed format, 141the DSDT consists of free-formatted AML data. 142.Sh OPTIONS 143The following options are supported by 144.Nm : 145.Bl -tag -width indent 146.It Fl c 147Dump unknown table data as characters instead of hex. 148.It Fl d 149Disassemble the DSDT into ASL using 150.Xr iasl 8 151and print the results to stdout. 152.It Fl f Ar dsdt_input 153Load the DSDT from the specified file instead of physical memory. 154Since only the DSDT is stored in the file, the 155.Fl t 156flag may not be used with this option. 157.It Fl h 158Displays usage and exit. 159.It Fl o Ar dsdt_output 160Store the DSDT data block from physical memory into the specified file. 161.It Fl s 162Skip tables with bad checksums. 163.It Fl t 164Dump the contents of the various fixed tables listed above. 165.It Fl v 166Enable verbose messages. 167.El 168.Sh FILES 169.Bl -tag -width /dev/mem 170.It Pa /dev/mem 171.El 172.Sh EXAMPLES 173If a developer requests a copy of your ASL, please use the following 174command to dump all tables and compress the result. 175.Bd -literal -offset indent 176# acpidump -dt | gzip -c9 > my_computer.asl.gz 177.Ed 178.Pp 179This example dumps the DSDT from physical memory to foo.dsdt. 180It also prints the contents of various system tables and disassembles 181the AML contained in the DSDT to stdout, redirecting the output 182to foo.asl. 183.Bd -literal -offset indent 184# acpidump -t -d -o foo.dsdt > foo.asl 185.Ed 186.Pp 187This example reads a DSDT file and disassembles it to stdout. 188Verbose messages are enabled. 189.Bd -literal -offset indent 190# acpidump -v -d -f foo.dsdt 191.Ed 192.Sh SEE ALSO 193.Xr acpi 4 , 194.\" .Xr mem 4 , 195.\" .Xr acpiconf 8 , 196.Xr amldb 8 , 197.Xr iasl 8 198.Sh HISTORY 199The 200.Nm 201utility first appeared in 202.Fx 5.0 203and was rewritten to use 204.Xr iasl 8 205for 206.Fx 5.2 . 207.Sh AUTHORS 208.An Doug Rabson Aq Mt dfr@FreeBSD.org 209.An Mitsuru IWASAKI Aq Mt iwasaki@FreeBSD.org 210.An Yasuo YOKOYAMA Aq Mt yokoyama@jp.FreeBSD.org 211.An Nate Lawson Aq Mt njl@FreeBSD.org 212.Pp 213.An -nosplit 214Some contributions made by 215.An Chitoshi Ohsawa Aq Mt ohsawa@catv1.ccn-net.ne.jp , 216.An Takayasu IWANASHI Aq Mt takayasu@wendy.a.perfect-liberty.or.jp , 217.An Yoshihiko SARUMARU Aq Mt mistral@imasy.or.jp , 218.An Hiroki Sato Aq Mt hrs@FreeBSD.org , 219.An Michael Lucas Aq Mt mwlucas@blackhelicopters.org 220and 221.An Michael Smith Aq Mt msmith@FreeBSD.org . 222.Sh BUGS 223The current implementation does not dump 224some miscellaneous tables. 225