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