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