xref: /openbsd-src/usr.sbin/acpidump/acpidump.8 (revision 2b0358df1d88d06ef4139321dd05bd5e05d91eaf)
1.\"	$OpenBSD: acpidump.8,v 1.9 2008/10/30 22:08:57 sobrado Exp $
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: src/usr.sbin/acpi/acpidump/acpidump.8,v 1.9 2001/09/05 19:21:25 dd Exp $
31.\"
32.Dd $Mdocdate: October 30 2008 $
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 f Ar dsdt_file_for_input
41.Nm
42.Op Fl o Ar prefix_for_output
43.Sh DESCRIPTION
44The
45.Nm
46command analyzes ACPI tables in physical memory and dumps them to standard output.
47In addition,
48.Nm
49can disassemble some contents of the tables in AML
50(ACPI Machine Language)
51and dump them in ASL
52(ACPI Source Language).
53.Pp
54ACPI tables have an notably essential data block called DSDT
55(Differentiated System Description Table),
56that includes information used on the kernel side such as
57detailed information about PnP hardware, procedures for controlling
58power management support, and so on.
59.Nm
60can extract a DSDT data block from physical memory and store it into
61a DSDT data file, and can also generate an output in ASL
62from a given DSDT data file.
63.Pp
64The options are as follows:
65.Bl -tag -width indent
66.It Fl f Ar dsdt_file_for_input
67Interpret AML data in DSDT from a file specified in
68.Ar dsdt_file_for_input
69and dumps them in ASL to standard output.
70.It Fl o Ar prefix_for_output
71Store ACPI tables from physical memory into files specified by
72.Ar prefix_for_output .
73The files generated will
74be of the form <prefix>.<sig>.<id>.
75.Dq sig
76is the signature of the ACPI Table;
77.Dq id
78is unique for each table.
79.Pp
80The following are common table signatures (there may be others):
81RSDP, FACP, DSDT, SSDT, HPET, MCFG, SPMI, APIC, SPCR, SRAT, XSDT.
82.El
83.Pp
84When
85.Nm
86is invoked with no options, it will search ACPI tables from physical
87memory via a special file
88.Pa /dev/mem
89and dump them.
90First, it searches Root System Description Pointer,
91that has a signature
92.Qq RSD PTR\ \& ,
93and then gets RSDT
94(Root System Description Table),
95which includes a list of pointers to physical memory addresses
96for other tables.
97RSDT itself and all other tables linked from RSDT are generically
98called SDT
99(System Description Table)
100and their header has the common format which consists of items
101such as Signature, Length, Revision, Checksum, OEMID, OEM Table ID,
102OEM Revision, Creator ID, and Creator Revision.
103.Nm
104dumps the contents of these SDTs.
105For further information about the formats of each table,
106see chapter 5: ACPI Software Programming Model,
107.Dq Advanced Configuration and Power Interface Specification Revision 1.0b
108from Intel/Microsoft/Toshiba.
109.Pp
110There is always a pointer to a physical memory address in RSDT for FACP
111(Fixed ACPI Description Table).
112FACP defines static system information about power management support
113(ACPI Hardware Register Implementation)
114such as interrupt mode
115(INT_MODEL),
116SCI interrupt number, SMI command port
117(SMI_CMD),
118and the location of ACPI registers.
119FACP also has a pointer to a physical memory address for DSDT,
120which includes information used on the kernel side such as
121PnP, power management support, and so on.
122While the other tables are described in a fixed format,
123DSDT consists of AML data which is compiled from sources
124written in free formatted ASL, a description language for ACPI.
125When
126.Nm
127outputs DSDT, it disassembles the AML data and
128translates them into ASL.
129.Sh FILES
130.Bl -tag -width /dev/mem
131.It Pa /dev/mem
132.El
133.Sh SEE ALSO
134.\" .Xr acpi 4 ,
135.Xr mem 4
136.\" .Xr acpiconf 8 ,
137.\" Xr amldb 8
138.Rs
139.%T Advanced Configuration and Power Interface Specification
140.%A Intel
141.%A Microsoft
142.%A Toshiba
143.%R Revision 1.0b
144.Re
145.Sh HISTORY
146The
147.Nm
148command first appeared in
149.Ox 3.8 .
150.Sh AUTHORS
151.An Doug Rabson Aq dfr@FreeBSD.org
152.An Mitsuru IWASAKI Aq iwasaki@FreeBSD.org
153.An Yasuo YOKOYAMA Aq yokoyama@jp.FreeBSD.org
154.Pp
155Some contributions made by:
156.An Chitoshi Ohsawa Aq ohsawa@catv1.ccn-net.ne.jp ,
157.An Takayasu IWANASHI Aq takayasu@wendy.a.perfect-liberty.or.jp ,
158.An Yoshihiko SARUMARU Aq mistral@imasy.or.jp ,
159.An Hiroki Sato Aq hrs@FreeBSD.org ,
160.An Jordan Hargrave Aq jordan@openbsd.org
161and
162.An Michael Lucas Aq mwlucas@blackhelicopters.org .
163.Sh BUGS
164In the current implementation,
165.Nm
166doesn't dump any information of Firmware ACPI Control Structure
167(FACS)
168specified by a pointer in FACP.
169