1.\" ACPI (ACPI Package) 2.\" 3.\" Copyright (c) 1999 Doug Rabson <dfr@FreeBSD.org> 4.\" Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org> 5.\" Copyright (c) 2000 Yasuo YOKOYAMA <yokoyama@jp.FreeBSD.org> 6.\" Copyright (c) 2000 Hiroki Sato <hrs@FreeBSD.org> 7.\" All rights reserved. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" SUCH DAMAGE. 29.\" 30.\" $FreeBSD$ 31.\" 32.Dd August 31, 2000 33.Dt ACPIDUMP 8 34.Os 35.Sh NAME 36.Nm acpidump 37.Nd dump ACPI tables 38.Sh SYNOPSIS 39.Nm 40.Op Fl r 41.Nm 42.Op Fl r 43.Op Fl o Ar dsdt_file_for_output 44.Nm 45.Op Fl r 46.Op Fl f Ar dsdt_file_for_input 47.Sh DESCRIPTION 48The 49.Nm 50command analyzes ACPI tables in physical memory and dumps them to standard output. 51In addition, 52.Nm 53can disassemble AML 54(ACPI Machine Language) 55found in these tables and dump them as ASL 56(ACPI Source Language). 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. 63.Nm 64can extract the DSDT data block from physical memory and store it into 65a DSDT data file, and also can generate an output in ASL 66from a given DSDT data file. 67.Pp 68When 69.Nm 70is invoked without the 71.Fl f 72option, it will read ACPI tables from physical 73memory via a special file 74.Pa /dev/mem 75and dump them. 76First it searches for the RSDP 77(Root System Description Pointer), 78which has the signature 79.Qq RSD PTR\ \& , 80and then gets the RSDT 81(Root System Description Table), 82which includes a list of pointers to physical memory addresses 83for other tables. 84The RSDT itself and all other tables linked from RSDT are generically 85called SDTs 86(System Description Tables) 87and their header has a common format which consists of items 88such as Signature, Length, Revision, Checksum, OEMID, OEM Table ID, 89OEM Revision, Creator ID and Creator Revision. 90.Nm 91dumps contents of these SDTs. 92For further information about formats of each table, 93see chapter 5: 94.Dq ACPI Software Programming Model 95from the ACPI specifications referenced below. 96.Pp 97There is always a pointer to a physical memory address in RSDT for FACP 98(Fixed ACPI Description Table). 99The FACP defines static system information about power management support 100(ACPI Hardware Register Implementation) 101such as interrupt mode 102(INT_MODEL), 103SCI interrupt number, SMI command port 104(SMI_CMD) 105and location of ACPI registers. 106The FACP also has a pointer to a physical memory address for DSDT, 107which includes information used on the kernel side such as 108PnP, power management support and so on. 109While the other tables are described in fixed format, 110the DSDT consists of AML data which is compiled from sources 111written in free formated ASL, which is the description language for ACPI. 112When 113.Nm 114outputs DSDT, it disassembles the AML data and 115formats it as ASL. 116.Sh OPTIONS 117The following options are supported by 118.Nm : 119.Bl -tag -width indent 120.It Fl o Ar dsdt_file_for_output 121Stores DSDT data block from physical memory into a file specified in 122.Ar dsdt_file_for_output 123in addition to behavior with no option. 124.It Fl f Ar dsdt_file_for_input 125Interprets AML data in DSDT from a file specified in 126.Ar dsdt_file_for_input 127and dumps them in ASL to standard output. 128.It Fl r 129Additionally outputs commented ResourceTemplate() macros for Buffer 130objects that contain valid resource streams. 131These macros are defined in the ACPI 2.0 specification section 13216.2.4. 133.It Fl h 134Displays usage and exit. 135.El 136.Sh EXAMPLES 137This is an example to get a dump of SDTs and a DSDT data file 138simultaneously on a machine that supports ACPI BIOS. 139.Bd -literal -offset indent 140# acpidump -o foo.dsdt > foo.asl 141.Ed 142.Sh BUGS 143In the current implementation, 144.Nm 145doesn't dump any information of Firmware ACPI Control Structure 146(FACS) 147specified by a pointer in FACP. 148.Sh FILES 149.Bl -tag -width /dev/mem 150.It Pa /dev/mem 151.El 152.Sh SEE ALSO 153.Xr acpi 4 , 154.Xr mem 4 , 155.Xr acpiconf 8 , 156.Xr amldb 8 157.Pp 158.Dq Advanced Configuration and Power Interface Specification 159.Bd -literal -offset indent -compact 160Intel 161Microsoft 162Toshiba 163Revision 1.0b, 2.0 164.Ed 165<URL:http://www.teleport.com/~acpi/> 166.Sh AUTHORS 167.An Doug Rabson Aq dfr@FreeBSD.org 168.An Mitsuru IWASAKI Aq iwasaki@FreeBSD.org 169.An Yasuo YOKOYAMA Aq yokoyama@jp.FreeBSD.org 170.Pp 171.An -nosplit 172Some contributions made by 173.An Chitoshi Ohsawa Aq ohsawa@catv1.ccn-net.ne.jp , 174.An Takayasu IWANASHI Aq takayasu@wendy.a.perfect-liberty.or.jp , 175.An Yoshihiko SARUMARU Aq mistral@imasy.or.jp , 176.An Hiroki Sato Aq hrs@FreeBSD.org , 177.An Michael Lucas Aq mwlucas@blackhelicopters.org 178and 179.An Michael Smith Aq msmith@FreeBSD.org . 180.Sh HISTORY 181The 182.Nm 183command appeared in 184.Fx 5.0 . 185