1*161b30afSjmcneill.\" $NetBSD: acpidump.8,v 1.17 2020/12/06 02:57:30 jmcneill Exp $ 253e202c1Schristos.\" ACPI (ACPI Package) 353e202c1Schristos.\" 453e202c1Schristos.\" Copyright (c) 1999 Doug Rabson <dfr@FreeBSD.org> 553e202c1Schristos.\" Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org> 653e202c1Schristos.\" Copyright (c) 2000 Yasuo YOKOYAMA <yokoyama@jp.FreeBSD.org> 753e202c1Schristos.\" Copyright (c) 2000 Hiroki Sato <hrs@FreeBSD.org> 853e202c1Schristos.\" All rights reserved. 953e202c1Schristos.\" 1053e202c1Schristos.\" Redistribution and use in source and binary forms, with or without 1153e202c1Schristos.\" modification, are permitted provided that the following conditions 1253e202c1Schristos.\" are met: 1353e202c1Schristos.\" 1. Redistributions of source code must retain the above copyright 1453e202c1Schristos.\" notice, this list of conditions and the following disclaimer. 1553e202c1Schristos.\" 2. Redistributions in binary form must reproduce the above copyright 1653e202c1Schristos.\" notice, this list of conditions and the following disclaimer in the 1753e202c1Schristos.\" documentation and/or other materials provided with the distribution. 1853e202c1Schristos.\" 1953e202c1Schristos.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2053e202c1Schristos.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2153e202c1Schristos.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2253e202c1Schristos.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2353e202c1Schristos.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2453e202c1Schristos.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2553e202c1Schristos.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2653e202c1Schristos.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2753e202c1Schristos.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2853e202c1Schristos.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2953e202c1Schristos.\" SUCH DAMAGE. 3053e202c1Schristos.\" 31c359a213Smsaitoh.\" $FreeBSD: head/usr.sbin/acpi/acpidump/acpidump.8 267668 2014-06-20 09:57:27Z bapt $ 3253e202c1Schristos.\" 33*161b30afSjmcneill.Dd December 4, 2020 3453e202c1Schristos.Dt ACPIDUMP 8 3553e202c1Schristos.Os 3653e202c1Schristos.Sh NAME 3753e202c1Schristos.Nm acpidump 38de1cae9aScegger.Nd dump ACPI tables and ASL 3953e202c1Schristos.Sh SYNOPSIS 4053e202c1Schristos.Nm 413d273e44Swiz.Op Fl cdhstv 42de1cae9aScegger.Op Fl f Ar dsdt_input 43de1cae9aScegger.Op Fl o Ar dsdt_output 4453e202c1Schristos.Sh DESCRIPTION 4553e202c1SchristosThe 4653e202c1Schristos.Nm 47de1cae9aSceggerutility analyzes ACPI tables in physical memory and can dump them to a file. 4853e202c1SchristosIn addition, 4953e202c1Schristos.Nm 50de1cae9aSceggercan call 51de1cae9aScegger.Xr iasl 8 52de1cae9aSceggerto disassemble AML 5353e202c1Schristos(ACPI Machine Language) 5453e202c1Schristosfound in these tables and dump them as ASL 55de1cae9aScegger(ACPI Source Language) 56de1cae9aSceggerto stdout. 5753e202c1Schristos.Pp 5853e202c1SchristosACPI tables have an essential data block (the DSDT, 59de1cae9aSceggerDifferentiated System Description Table) 6053e202c1Schristosthat includes information used on the kernel side such as 6153e202c1Schristosdetailed information about PnP hardware, procedures for controlling 62de1cae9aSceggerpower management support, and so on. 6353e202c1SchristosThe 6453e202c1Schristos.Nm 6553e202c1Schristosutility can extract the DSDT data block from physical memory and store it into 66de1cae9aSceggeran output file and optionally also disassemble it. 67de1cae9aSceggerIf any Secondary System Description Table 68de1cae9aScegger(SSDT) 69de1cae9aSceggerentries exist, they will also be included in the output file and disassembly. 7053e202c1Schristos.Pp 7153e202c1SchristosWhen 7253e202c1Schristos.Nm 7353e202c1Schristosis invoked without the 7453e202c1Schristos.Fl f 75de1cae9aSceggeroption, it will read ACPI tables from physical memory via 76*161b30afSjmcneill.Pa /dev/acpi . 7753e202c1SchristosFirst it searches for the RSDP 7853e202c1Schristos(Root System Description Pointer), 7953e202c1Schristoswhich has the signature 8053e202c1Schristos.Qq RSD PTR\ \& , 8153e202c1Schristosand then gets the RSDT 8253e202c1Schristos(Root System Description Table), 8353e202c1Schristoswhich includes a list of pointers to physical memory addresses 8453e202c1Schristosfor other tables. 8553e202c1SchristosThe RSDT itself and all other tables linked from RSDT are generically 8653e202c1Schristoscalled SDTs 8753e202c1Schristos(System Description Tables) 8853e202c1Schristosand their header has a common format which consists of items 8953e202c1Schristossuch as Signature, Length, Revision, Checksum, OEMID, OEM Table ID, 9053e202c1SchristosOEM Revision, Creator ID and Creator Revision. 91de1cae9aSceggerWhen invoked with the 92de1cae9aScegger.Fl t 93de1cae9aSceggerflag, the 9453e202c1Schristos.Nm 95de1cae9aSceggerutility dumps contents of the following tables: 9653e202c1Schristos.Pp 97de1cae9aScegger.Bl -tag -offset indent -width 12345 -compact 98de1cae9aScegger.It APIC 99de1cae9aScegger.It BERT 100755dd632Smsaitoh.It BGRT 101de1cae9aScegger.It BOOT 102de1cae9aScegger.It CPEP 103055f8b85Smsaitoh.It CSRT 1045d527485Smsaitoh.It DBG2 105de1cae9aScegger.It DBGP 106c359a213Smsaitoh.It DMAR 107de1cae9aScegger.It DSDT 108de1cae9aScegger.It ECDT 109de1cae9aScegger.It EINJ 110de1cae9aScegger.It ERST 111de1cae9aScegger.It FACS 112de1cae9aScegger.It FADT 11343a714dcSmsaitoh.It GTDT 114de1cae9aScegger.It HEST 115de1cae9aScegger.It HPET 116c0f969c5Smsaitoh.It IORT 1173de33cabSmsaitoh.It LPIT 118de1cae9aScegger.It MADT 119de1cae9aScegger.It MCFG 120de1cae9aScegger.It MSCT 121792e611dSmsaitoh.It NFIT 12243a714dcSmsaitoh.It PPTT 123de1cae9aScegger.It RSD PTR 124de1cae9aScegger.It RSDT 125de1cae9aScegger.It SBST 126de1cae9aScegger.It SLIT 127de1cae9aScegger.It SPCR 1285d527485Smsaitoh.It SPMI 129de1cae9aScegger.It SRAT 130de1cae9aScegger.It TCPA 1310e3f83efSmaxv.It TPM2 1325d527485Smsaitoh.It UEFI 133de1cae9aScegger.It WAET 134de1cae9aScegger.It WDAT 1355d527485Smsaitoh.It WDDT 136de1cae9aScegger.It WDRT 137de1cae9aScegger.El 138de1cae9aScegger.Pp 139de1cae9aSceggerThe RSDT contains a pointer to the physical memory address of the FACP 14053e202c1Schristos(Fixed ACPI Description Table). 14153e202c1SchristosThe FACP defines static system information about power management support 14253e202c1Schristos(ACPI Hardware Register Implementation) 143de1cae9aSceggersuch as interrupt mode (INT_MODEL), 144de1cae9aSceggerSCI interrupt number, SMI command port (SMI_CMD) 145de1cae9aSceggerand the location of ACPI registers. 146de1cae9aSceggerThe FACP also has a pointer to a physical memory address for the DSDT. 147de1cae9aSceggerWhile the other tables are fixed format, 148de1cae9aSceggerthe DSDT consists of free-formatted AML data. 14953e202c1Schristos.Sh OPTIONS 15053e202c1SchristosThe following options are supported by 15153e202c1Schristos.Nm : 15253e202c1Schristos.Bl -tag -width indent 1530a87e199Sjmcneill.It Fl c 1540a87e199SjmcneillDump unknown table data as characters instead of hex. 155de1cae9aScegger.It Fl d 156de1cae9aSceggerDisassemble the DSDT into ASL using 157de1cae9aScegger.Xr iasl 8 158de1cae9aSceggerand print the results to stdout. 159de1cae9aScegger.It Fl f Ar dsdt_input 160de1cae9aSceggerLoad the DSDT from the specified file instead of physical memory. 161de1cae9aSceggerSince only the DSDT is stored in the file, the 162de1cae9aScegger.Fl t 163de1cae9aSceggerflag may not be used with this option. 1643d273e44Swiz.It Fl h 1653d273e44SwizDisplays usage and exit. 166de1cae9aScegger.It Fl o Ar dsdt_output 167de1cae9aSceggerStore the DSDT data block from physical memory into the specified file. 1683d273e44Swiz.It Fl s 1693d273e44SwizSkip tables with bad checksums. 1703d273e44Swiz.It Fl t 1713d273e44SwizDump the contents of the various fixed tables listed above. 1723d273e44Swiz.It Fl v 1733d273e44SwizEnable verbose messages. 174266bca7bSwiz.El 175266bca7bSwiz.Sh FILES 176*161b30afSjmcneill.Bl -tag -width /dev/acpi 177*161b30afSjmcneill.It Pa /dev/acpi 17853e202c1Schristos.El 17953e202c1Schristos.Sh EXAMPLES 180de1cae9aSceggerIf a developer requests a copy of your ASL, please use the following 181de1cae9aSceggercommand to dump all tables and compress the result. 18253e202c1Schristos.Bd -literal -offset indent 183de1cae9aScegger# acpidump -dt | gzip -c9 > my_computer.asl.gz 184de1cae9aScegger.Ed 185de1cae9aScegger.Pp 186de1cae9aSceggerThis example dumps the DSDT from physical memory to foo.dsdt. 187de1cae9aSceggerIt also prints the contents of various system tables and disassembles 188de1cae9aSceggerthe AML contained in the DSDT to stdout, redirecting the output 189de1cae9aSceggerto foo.asl. 190de1cae9aScegger.Bd -literal -offset indent 191de1cae9aScegger# acpidump -t -d -o foo.dsdt > foo.asl 192de1cae9aScegger.Ed 193de1cae9aScegger.Pp 194de1cae9aSceggerThis example reads a DSDT file and disassembles it to stdout. 195de1cae9aSceggerVerbose messages are enabled. 196de1cae9aScegger.Bd -literal -offset indent 197de1cae9aScegger# acpidump -v -d -f foo.dsdt 19853e202c1Schristos.Ed 19953e202c1Schristos.Sh SEE ALSO 20053e202c1Schristos.Xr acpi 4 , 201266bca7bSwiz.\" .Xr mem 4 , 202266bca7bSwiz.\" .Xr acpiconf 8 , 203de1cae9aScegger.Xr amldb 8 , 204de1cae9aScegger.Xr iasl 8 205266bca7bSwiz.Sh HISTORY 206266bca7bSwizThe 207266bca7bSwiz.Nm 208de1cae9aSceggerutility first appeared in 209de1cae9aScegger.Fx 5.0 210de1cae9aSceggerand was rewritten to use 211de1cae9aScegger.Xr iasl 8 212de1cae9aSceggerfor 213de1cae9aScegger.Fx 5.2 . 21453e202c1Schristos.Sh AUTHORS 215a5684d07Swiz.An Doug Rabson Aq Mt dfr@FreeBSD.org 216a5684d07Swiz.An Mitsuru IWASAKI Aq Mt iwasaki@FreeBSD.org 217a5684d07Swiz.An Yasuo YOKOYAMA Aq Mt yokoyama@jp.FreeBSD.org 218a5684d07Swiz.An Nate Lawson Aq Mt njl@FreeBSD.org 21953e202c1Schristos.Pp 22053e202c1Schristos.An -nosplit 22153e202c1SchristosSome contributions made by 222a5684d07Swiz.An Chitoshi Ohsawa Aq Mt ohsawa@catv1.ccn-net.ne.jp , 223a5684d07Swiz.An Takayasu IWANASHI Aq Mt takayasu@wendy.a.perfect-liberty.or.jp , 224a5684d07Swiz.An Yoshihiko SARUMARU Aq Mt mistral@imasy.or.jp , 225a5684d07Swiz.An Hiroki Sato Aq Mt hrs@FreeBSD.org , 226a5684d07Swiz.An Michael Lucas Aq Mt mwlucas@blackhelicopters.org 22753e202c1Schristosand 228a5684d07Swiz.An Michael Smith Aq Mt msmith@FreeBSD.org . 229266bca7bSwiz.Sh BUGS 230de1cae9aSceggerThe current implementation does not dump 231de1cae9aSceggersome miscellaneous tables. 232