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