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