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 50utility analyzes ACPI tables in physical memory and dumps them to 51standard output. 52In addition, 53.Nm 54can disassemble AML 55(ACPI Machine Language) 56found in these tables and dump them as ASL 57(ACPI Source Language). 58.Pp 59ACPI tables have an essential data block (the DSDT, 60Differentiated System Description Table), 61that includes information used on the kernel side such as 62detailed information about PnP hardware, procedures for controlling 63power management support and so on. 64The 65.Nm 66utility can extract the DSDT data block from physical memory and store it into 67a DSDT data file, and also can generate an output in ASL 68from a given DSDT data file. 69.Pp 70When 71.Nm 72is invoked without the 73.Fl f 74option, it will read ACPI tables from physical 75memory via a special file 76.Pa /dev/mem 77and dump them. 78First it searches for the RSDP 79(Root System Description Pointer), 80which has the signature 81.Qq RSD PTR\ \& , 82and then gets the RSDT 83(Root System Description Table), 84which includes a list of pointers to physical memory addresses 85for other tables. 86The RSDT itself and all other tables linked from RSDT are generically 87called SDTs 88(System Description Tables) 89and their header has a common format which consists of items 90such as Signature, Length, Revision, Checksum, OEMID, OEM Table ID, 91OEM Revision, Creator ID and Creator Revision. 92The 93.Nm 94utility dumps contents of these SDTs. 95For further information about formats of each table, 96see chapter 5: 97.Dq ACPI Software Programming Model 98from the ACPI specifications referenced below. 99.Pp 100There is always a pointer to a physical memory address in RSDT for FACP 101(Fixed ACPI Description Table). 102The FACP defines static system information about power management support 103(ACPI Hardware Register Implementation) 104such as interrupt mode 105(INT_MODEL), 106SCI interrupt number, SMI command port 107(SMI_CMD) 108and location of ACPI registers. 109The FACP also has a pointer to a physical memory address for DSDT, 110which includes information used on the kernel side such as 111PnP, power management support and so on. 112While the other tables are described in fixed format, 113the DSDT consists of AML data which is compiled from sources 114written in free formated ASL, which is the description language for ACPI. 115When 116.Nm 117outputs DSDT, it disassembles the AML data and 118formats it as ASL. 119.Sh OPTIONS 120The following options are supported by 121.Nm : 122.Bl -tag -width indent 123.It Fl o Ar dsdt_file_for_output 124Stores DSDT data block from physical memory into a file specified in 125.Ar dsdt_file_for_output 126in addition to behavior with no option. 127.It Fl f Ar dsdt_file_for_input 128Interprets AML data in DSDT from a file specified in 129.Ar dsdt_file_for_input 130and dumps them in ASL to standard output. 131.It Fl r 132Additionally outputs commented ResourceTemplate() macros for Buffer 133objects that contain valid resource streams. 134These macros are defined in the ACPI 2.0 specification section 13516.2.4. 136.It Fl h 137Displays usage and exit. 138.El 139.Sh EXAMPLES 140This is an example to get a dump of SDTs and a DSDT data file 141simultaneously on a machine that supports ACPI BIOS. 142.Bd -literal -offset indent 143# acpidump -o foo.dsdt > foo.asl 144.Ed 145.Sh BUGS 146In the current implementation, 147.Nm 148doesn't dump any information of Firmware ACPI Control Structure 149(FACS) 150specified by a pointer in FACP. 151.Sh FILES 152.Bl -tag -width /dev/mem 153.It Pa /dev/mem 154.El 155.Sh SEE ALSO 156.Xr acpi 4 , 157.Xr mem 4 , 158.Xr acpiconf 8 , 159.Xr amldb 8 160.Pp 161.Dq Advanced Configuration and Power Interface Specification 162.Bd -literal -offset indent -compact 163Intel 164Microsoft 165Toshiba 166Revision 1.0b, 2.0 167.Ed 168<URL:http://www.teleport.com/~acpi/> 169.Sh AUTHORS 170.An Doug Rabson Aq dfr@FreeBSD.org 171.An Mitsuru IWASAKI Aq iwasaki@FreeBSD.org 172.An Yasuo YOKOYAMA Aq yokoyama@jp.FreeBSD.org 173.Pp 174.An -nosplit 175Some contributions made by 176.An Chitoshi Ohsawa Aq ohsawa@catv1.ccn-net.ne.jp , 177.An Takayasu IWANASHI Aq takayasu@wendy.a.perfect-liberty.or.jp , 178.An Yoshihiko SARUMARU Aq mistral@imasy.or.jp , 179.An Hiroki Sato Aq hrs@FreeBSD.org , 180.An Michael Lucas Aq mwlucas@blackhelicopters.org 181and 182.An Michael Smith Aq msmith@FreeBSD.org . 183.Sh HISTORY 184The 185.Nm 186utility appeared in 187.Fx 5.0 . 188