137a23ef8SMitsuru IWASAKI.\" ACPI (ACPI Package) 237a23ef8SMitsuru IWASAKI.\" 337a23ef8SMitsuru IWASAKI.\" Copyright (c) 1999 Doug Rabson <dfr@FreeBSD.org> 437a23ef8SMitsuru IWASAKI.\" Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org> 537a23ef8SMitsuru IWASAKI.\" Copyright (c) 2000 Yasuo YOKOYAMA <yokoyama@jp.FreeBSD.org> 637a23ef8SMitsuru IWASAKI.\" Copyright (c) 2000 Hiroki Sato <hrs@FreeBSD.org> 737a23ef8SMitsuru IWASAKI.\" All rights reserved. 837a23ef8SMitsuru IWASAKI.\" 937a23ef8SMitsuru IWASAKI.\" Redistribution and use in source and binary forms, with or without 1037a23ef8SMitsuru IWASAKI.\" modification, are permitted provided that the following conditions 1137a23ef8SMitsuru IWASAKI.\" are met: 1237a23ef8SMitsuru IWASAKI.\" 1. Redistributions of source code must retain the above copyright 1337a23ef8SMitsuru IWASAKI.\" notice, this list of conditions and the following disclaimer. 1437a23ef8SMitsuru IWASAKI.\" 2. Redistributions in binary form must reproduce the above copyright 1537a23ef8SMitsuru IWASAKI.\" notice, this list of conditions and the following disclaimer in the 1637a23ef8SMitsuru IWASAKI.\" documentation and/or other materials provided with the distribution. 1737a23ef8SMitsuru IWASAKI.\" 1837a23ef8SMitsuru IWASAKI.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1937a23ef8SMitsuru IWASAKI.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2037a23ef8SMitsuru IWASAKI.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2137a23ef8SMitsuru IWASAKI.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2237a23ef8SMitsuru IWASAKI.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2337a23ef8SMitsuru IWASAKI.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2437a23ef8SMitsuru IWASAKI.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2537a23ef8SMitsuru IWASAKI.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2637a23ef8SMitsuru IWASAKI.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2737a23ef8SMitsuru IWASAKI.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2837a23ef8SMitsuru IWASAKI.\" SUCH DAMAGE. 2937a23ef8SMitsuru IWASAKI.\" 30bbfd7348SWarner Losh.Dd October 5, 2024 3137a23ef8SMitsuru IWASAKI.Dt ACPIDUMP 8 32a4c37c81SRuslan Ermilov.Os 3337a23ef8SMitsuru IWASAKI.Sh NAME 3437a23ef8SMitsuru IWASAKI.Nm acpidump 35945137d9SNate Lawson.Nd dump ACPI tables and ASL 3637a23ef8SMitsuru IWASAKI.Sh SYNOPSIS 37e97407b4SRuslan Ermilov.Nm 38945137d9SNate Lawson.Op Fl d 39945137d9SNate Lawson.Op Fl f Ar dsdt_input 40bbfd7348SWarner Losh.Op Fl h 41945137d9SNate Lawson.Op Fl o Ar dsdt_output 42bbfd7348SWarner Losh.Op Fl t 43*3ff9ea7dSWarner Losh.Op Fl T Ar table_name 44bbfd7348SWarner Losh.Op Fl v 4537a23ef8SMitsuru IWASAKI.Sh DESCRIPTION 4637a23ef8SMitsuru IWASAKIThe 4737a23ef8SMitsuru IWASAKI.Nm 48945137d9SNate Lawsonutility analyzes ACPI tables in physical memory and can dump them to a file. 4937a23ef8SMitsuru IWASAKIIn addition, 5037a23ef8SMitsuru IWASAKI.Nm 51945137d9SNate Lawsoncan call 52945137d9SNate Lawson.Xr iasl 8 53945137d9SNate Lawsonto disassemble AML 54c4d9468eSRuslan Ermilov(ACPI Machine Language) 55add420aaSMike Smithfound in these tables and dump them as ASL 56945137d9SNate Lawson(ACPI Source Language) 57945137d9SNate Lawsonto stdout. 5837a23ef8SMitsuru IWASAKI.Pp 59add420aaSMike SmithACPI tables have an essential data block (the DSDT, 60945137d9SNate LawsonDifferentiated System Description Table) 6137a23ef8SMitsuru IWASAKIthat includes information used on the kernel side such as 62add420aaSMike Smithdetailed information about PnP hardware, procedures for controlling 63945137d9SNate Lawsonpower management support, and so on. 64490d5836SPhilippe CharnierThe 6537a23ef8SMitsuru IWASAKI.Nm 66490d5836SPhilippe Charnierutility can extract the DSDT data block from physical memory and store it into 67e840018eSNate Lawsonan output file and optionally also disassemble it. 68f7675a56SNate LawsonIf any Secondary System Description Table 69e840018eSNate Lawson(SSDT) 70f7675a56SNate Lawsonentries exist, they will also be included in the output file and disassembly. 7137a23ef8SMitsuru IWASAKI.Pp 7237a23ef8SMitsuru IWASAKIWhen 7337a23ef8SMitsuru IWASAKI.Nm 74add420aaSMike Smithis invoked without the 75add420aaSMike Smith.Fl f 76945137d9SNate Lawsonoption, it will read ACPI tables from physical memory via 77945137d9SNate Lawson.Pa /dev/mem . 785f343805SRuslan ErmilovFirst it searches for the RSDP 79add420aaSMike Smith(Root System Description Pointer), 80add420aaSMike Smithwhich has the signature 8137a23ef8SMitsuru IWASAKI.Qq RSD PTR\ \& , 82add420aaSMike Smithand then gets the RSDT 83c4d9468eSRuslan Ermilov(Root System Description Table), 8437a23ef8SMitsuru IWASAKIwhich includes a list of pointers to physical memory addresses 8537a23ef8SMitsuru IWASAKIfor other tables. 86add420aaSMike SmithThe RSDT itself and all other tables linked from RSDT are generically 87add420aaSMike Smithcalled SDTs 88add420aaSMike Smith(System Description Tables) 89add420aaSMike Smithand their header has a common format which consists of items 9037a23ef8SMitsuru IWASAKIsuch as Signature, Length, Revision, Checksum, OEMID, OEM Table ID, 9137a23ef8SMitsuru IWASAKIOEM Revision, Creator ID and Creator Revision. 92bbfd7348SWarner Losh.Pp 93945137d9SNate LawsonWhen invoked with the 94945137d9SNate Lawson.Fl t 95945137d9SNate Lawsonflag, the 9637a23ef8SMitsuru IWASAKI.Nm 97bbfd7348SWarner Loshutility dumps contents of all the ACPI tables, except the DSDT and SSDT. 98bbfd7348SWarner LoshThe following SDTs are reported in detail, while the remainder will only report 99bbfd7348SWarner Loshthe common header information: 10037a23ef8SMitsuru IWASAKI.Pp 101945137d9SNate Lawson.Bl -tag -offset indent -width 12345 -compact 102bbfd7348SWarner Losh.It BERT Boot Error Record Table 103bbfd7348SWarner LoshReports any previous boot errors. 104bbfd7348SWarner Losh.It DMAR DMA Remapping Table 105bbfd7348SWarner LoshContains information about the DMA remapping necessary for the system 106bbfd7348SWarner Loshfor I/O virtualization on Intel CPUS. 107bbfd7348SWarner Losh.It DSDT Differentiated System Description Table 108bbfd7348SWarner LoshContains the main AML for the system. 109bbfd7348SWarner Losh.It ECDT Embedded Controller Boot Resources Table 110bbfd7348SWarner LoshContains information about accessing the embedded controller 111bbfd7348SWarner Loshprior to the OS decoding the DSDT for all its details. 112bbfd7348SWarner Losh.It EINJ Error Injection Table 113bbfd7348SWarner LoshUse to inject hardware errors to the error reporting mechanisms. 114bbfd7348SWarner Losh.It ERST Error Record Serialization Table 115bbfd7348SWarner LoshInformation to retrieve and manage errors reported from the hardware. 116bbfd7348SWarner Losh.It FACS Firmware ACPI Control Structure 117bbfd7348SWarner LoshInformation for the OS to interact with the firmware for things 118bbfd7348SWarner Loshlike suspend / resume and prevent mutual access to resources 119bbfd7348SWarner Loshshared between the OS and the firmware. 120bbfd7348SWarner Losh.It FACP Fixed ACPI Description Table (FADT) 121bbfd7348SWarner LoshInformation related to power management, and other CPU related data. 122bbfd7348SWarner Losh.It HEST Hardware Error Source Table 123bbfd7348SWarner LoshDescribes the possible sources of hardware errors to the OS. 124bbfd7348SWarner Losh.It HPET High Precision Event Timer Table 125bbfd7348SWarner LoshDescribes the high precision timers in the system. 126bbfd7348SWarner Losh.It IVRS I/O Virtualization Reporting Structure 127bbfd7348SWarner LoshInformation for hypvervisors to use to share I/O resources on AMD 128bbfd7348SWarner Loshprocessors. 129bbfd7348SWarner Losh.It LPIT Low Power Idle Table 130bbfd7348SWarner LoshPower management information for reducing power usage of the system. 131bbfd7348SWarner Losh.It MADT Multiple APIC Description Table 132bbfd7348SWarner LoshDescribes all the Advanced Programmable Interrupt Controllers and 133bbfd7348SWarner LoshIntel Streamlined Advanced Programmable Interrupt Controller present 134bbfd7348SWarner Loshin the system. 135bbfd7348SWarner Losh.It MCFG PCI Express Memory-mapped Configuration 136bbfd7348SWarner LoshPCI config space base address register. 137bbfd7348SWarner Losh.It NFIT NVDIMM Firmware Interface Table 138bbfd7348SWarner LoshNVDIMM information in the system. 139945137d9SNate Lawson.It RSD PTR 140bbfd7348SWarner LoshPointer to the RSDT. 141bbfd7348SWarner Losh.It RSDT Root System Description Table 142bbfd7348SWarner LoshAn array of physical pointers to other system description tables, 143bbfd7348SWarner Loshthe FACP (Fixed ACPI Description Table). 144bbfd7348SWarner Losh.It SLIT System Locality Distance Information Table 145bbfd7348SWarner LoshProvides information about the cost of communicating between different 146bbfd7348SWarner Loshparts of the system (NUMA). 147bbfd7348SWarner Losh.It SPCR Serial Port Console Redirection 148bbfd7348SWarner LoshContains informatiom about any serial port that the firmware used as 149bbfd7348SWarner Losha reporting console. 150bbfd7348SWarner Losh.It SRAT System Resource Affinity Table 151bbfd7348SWarner LoshDefines the domains of locality in the system for processors, memory 152bbfd7348SWarner Loshand generic initiators (eg PCIe root complexes). 153bbfd7348SWarner Losh.It TCPA Trusted Computing Platform Alliance 154bbfd7348SWarner LoshInformation about the TPM elements of the system. 155bbfd7348SWarner Losh.It TPM2 Trusted Platform Module 2 156bbfd7348SWarner LoshAdditional information about newer TPM hardware. 157bbfd7348SWarner Losh.It WDDT Watchdog Timer Description Table 158bbfd7348SWarner LoshInformation about how to manage watchdog timers in the system. 159945137d9SNate Lawson.El 160945137d9SNate Lawson.Pp 161add420aaSMike SmithThe FACP defines static system information about power management support 162c4d9468eSRuslan Ermilov(ACPI Hardware Register Implementation) 163945137d9SNate Lawsonsuch as interrupt mode (INT_MODEL), 164945137d9SNate LawsonSCI interrupt number, SMI command port (SMI_CMD) 165945137d9SNate Lawsonand the location of ACPI registers. 166945137d9SNate LawsonThe FACP also has a pointer to a physical memory address for the DSDT. 167945137d9SNate LawsonWhile the other tables are fixed format, 168945137d9SNate Lawsonthe DSDT consists of free-formatted AML data. 16937a23ef8SMitsuru IWASAKI.Sh OPTIONS 17037a23ef8SMitsuru IWASAKIThe following options are supported by 171e97407b4SRuslan Ermilov.Nm : 17237a23ef8SMitsuru IWASAKI.Bl -tag -width indent 173945137d9SNate Lawson.It Fl d 174f5a04b16STakanori WatanabeConcatenate the DSDT and the SSDT's into single image and disassemble the image into ASL using 175945137d9SNate Lawson.Xr iasl 8 176945137d9SNate Lawsonand print the results to stdout. 177945137d9SNate Lawson.It Fl t 178945137d9SNate LawsonDump the contents of the various fixed tables listed above. 179*3ff9ea7dSWarner Losh.It Fl T ar table_name 180*3ff9ea7dSWarner LoshDump the contents of the specific table. 181*3ff9ea7dSWarner LoshAll ACPI tables are exactly 4 characters long. 18237a23ef8SMitsuru IWASAKI.It Fl h 18337a23ef8SMitsuru IWASAKIDisplays usage and exit. 184f5a04b16STakanori Watanabe.It Fl s 185f5a04b16STakanori WatanabeDisassemble each of the DSDT and the SSDT's into ASL using 186f5a04b16STakanori Watanabe.Xr iasl 8 187f5a04b16STakanori Watanabeand print the results to stdout. 188f5a04b16STakanori WatanabeThis will avoid 189f5a04b16STakanori Watanabe.Xr iasl 8 190f5a04b16STakanori Watanabeerror on disassembling concatenated image. 191f5a04b16STakanori WatanabeIf both 192f5a04b16STakanori Watanabe.Fl d 193f5a04b16STakanori Watanabeand 194f5a04b16STakanori Watanabe.Fl s 195f5a04b16STakanori Watanabeare specified, the last option is effective. 196945137d9SNate Lawson.It Fl v 197945137d9SNate LawsonEnable verbose messages. 198945137d9SNate Lawson.It Fl f Ar dsdt_input 199945137d9SNate LawsonLoad the DSDT from the specified file instead of physical memory. 200945137d9SNate LawsonSince only the DSDT is stored in the file, the 201945137d9SNate Lawson.Fl t 202945137d9SNate Lawsonflag may not be used with this option. 203945137d9SNate Lawson.It Fl o Ar dsdt_output 204945137d9SNate LawsonStore the DSDT data block from physical memory into the specified file. 20537a23ef8SMitsuru IWASAKI.El 20659a3c79dSRuslan Ermilov.Sh FILES 20759a3c79dSRuslan Ermilov.Bl -tag -width /dev/mem 20859a3c79dSRuslan Ermilov.It Pa /dev/mem 20959a3c79dSRuslan Ermilov.El 21037a23ef8SMitsuru IWASAKI.Sh EXAMPLES 211ceb8cd64SNate LawsonIf a developer requests a copy of your ASL, please use the following 212ceb8cd64SNate Lawsoncommand to dump all tables and compress the result. 213ceb8cd64SNate Lawson.Bd -literal -offset indent 214ceb8cd64SNate Lawson# acpidump -dt | gzip -c9 > my_computer.asl.gz 215ceb8cd64SNate Lawson.Ed 216ceb8cd64SNate Lawson.Pp 217945137d9SNate LawsonThis example dumps the DSDT from physical memory to foo.dsdt. 218945137d9SNate LawsonIt also prints the contents of various system tables and disassembles 219945137d9SNate Lawsonthe AML contained in the DSDT to stdout, redirecting the output 220945137d9SNate Lawsonto foo.asl. 22137a23ef8SMitsuru IWASAKI.Bd -literal -offset indent 222945137d9SNate Lawson# acpidump -t -d -o foo.dsdt > foo.asl 223945137d9SNate Lawson.Ed 224945137d9SNate Lawson.Pp 225945137d9SNate LawsonThis example reads a DSDT file and disassembles it to stdout. 226945137d9SNate LawsonVerbose messages are enabled. 227945137d9SNate Lawson.Bd -literal -offset indent 228945137d9SNate Lawson# acpidump -v -d -f foo.dsdt 22937a23ef8SMitsuru IWASAKI.Ed 23037a23ef8SMitsuru IWASAKI.Sh SEE ALSO 23137a23ef8SMitsuru IWASAKI.Xr acpi 4 , 2325521ff5aSRuslan Ermilov.Xr mem 4 , 23337a23ef8SMitsuru IWASAKI.Xr acpiconf 8 , 234945137d9SNate Lawson.Xr acpidb 8 , 235945137d9SNate Lawson.Xr iasl 8 23659a3c79dSRuslan Ermilov.Sh HISTORY 23759a3c79dSRuslan ErmilovThe 23859a3c79dSRuslan Ermilov.Nm 23959a3c79dSRuslan Ermilovutility first appeared in 24059a3c79dSRuslan Ermilov.Fx 5.0 24159a3c79dSRuslan Ermilovand was rewritten to use 24259a3c79dSRuslan Ermilov.Xr iasl 8 24359a3c79dSRuslan Ermilovfor 24459a3c79dSRuslan Ermilov.Fx 5.2 . 24537a23ef8SMitsuru IWASAKI.Sh AUTHORS 24601c2b8acSBaptiste Daroussin.An Doug Rabson Aq Mt dfr@FreeBSD.org 24701c2b8acSBaptiste Daroussin.An Mitsuru IWASAKI Aq Mt iwasaki@FreeBSD.org 24801c2b8acSBaptiste Daroussin.An Yasuo YOKOYAMA Aq Mt yokoyama@jp.FreeBSD.org 24901c2b8acSBaptiste Daroussin.An Nate Lawson Aq Mt njl@FreeBSD.org 25037a23ef8SMitsuru IWASAKI.Pp 2515f343805SRuslan Ermilov.An -nosplit 25237a23ef8SMitsuru IWASAKISome contributions made by 25301c2b8acSBaptiste Daroussin.An Chitoshi Ohsawa Aq Mt ohsawa@catv1.ccn-net.ne.jp , 25401c2b8acSBaptiste Daroussin.An Takayasu IWANASHI Aq Mt takayasu@wendy.a.perfect-liberty.or.jp , 25501c2b8acSBaptiste Daroussin.An Yoshihiko SARUMARU Aq Mt mistral@imasy.or.jp , 25601c2b8acSBaptiste Daroussin.An Hiroki Sato Aq Mt hrs@FreeBSD.org , 25701c2b8acSBaptiste Daroussin.An Michael Lucas Aq Mt mwlucas@blackhelicopters.org 25837a23ef8SMitsuru IWASAKIand 25901c2b8acSBaptiste Daroussin.An Michael Smith Aq Mt msmith@FreeBSD.org . 26059a3c79dSRuslan Ermilov.Sh BUGS 26159a3c79dSRuslan ErmilovThe current implementation does not dump the BOOT structure or 26259a3c79dSRuslan Ermilovother miscellaneous tables. 263