From owner-acpi-jp@jp.freebsd.org  Wed Aug 23 18:31:57 2000
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id SAA89628;
	Wed, 23 Aug 2000 18:31:57 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from tasogare.imasy.or.jp (daemon@tasogare.imasy.or.jp [202.227.24.5])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id SAA89618;
	Wed, 23 Aug 2000 18:31:55 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Received: from localhost (iwasaki.imasy.or.jp [202.227.24.92])
	by tasogare.imasy.or.jp (8.10.2+3.3W/3.7W-tasogare/smtpfeed 1.07) with ESMTP id e7N9Vmr52776;
	Wed, 23 Aug 2000 18:31:48 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
To: man-jp@jp.freebsd.org
Cc: acpi-jp@jp.freebsd.org, Hiroki Sato <hrs@geocities.co.jp>
In-Reply-To: <10008140337.AA08593@wendy.a.perfect-liberty.or.jp>
References: <200008140224.LAA00752@castle.jp.freebsd.org>
	<10008140337.AA08593@wendy.a.perfect-liberty.or.jp>
X-Mailer: Mew version 1.94.1 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Message-Id: <20000823183147I.iwasaki@jp.FreeBSD.org>
Date: Wed, 23 Aug 2000 18:31:47 +0900
From: Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
X-Dispatcher: imput version 20000228(IM140)
Lines: 256
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+000315
X-Sequence: acpi-jp 579
Subject: [acpi-jp 579] Re: [man-jp 2667] Re:
 =?ISO-2022-JP?B?GyRCO2o1XktdTHUwTU1qGyhC?= [Re:acpidump.8]
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: iwasaki@jp.freebsd.org

acpidump.8 $B$N1QLu$G$9$,!":4F#(B $B9-@8!wEl5~M}2JBg3X$5$s$,(B
$BDs6!$7$F$/$@$5$$$^$7$?(B \(^_^)/
$B$\$/$NJ}$GB?>/<j$rF~$l$?$b$N$rN.$7$F$*$-$^$9$N$G!"2?$+5$$,$D$$$?$H$3$m$,(B
$B$"$l$P$4;XE&$*4j$$$7$^$9!#$3$N8e$G$9$,!"K\2H$X$N%^!<%8A08e$K(B native $B$N?M$K(B
$B1QLu$N%A%'%C%/$rB>$N(B manpages $B$b0l=o$K$*4j$$$7$h$&$H9M$($F$$$^$9!#(B

$B$=$s$J$o$1$G!"0J2<$N$h$&$J>u67$K$J$j$^$7$?!#(B
                $BF|K\8l86J8(B      $B1QLu(B            norrf $B2=(B        $BF|K\8l(B roff
acpiconf(8)     $B4d:j(B ($B40(B)       $BIMED(B ($BCe(B)       $BIMED(B ($BCe(B)       $B7'C+(B($B40(B)
amldb(8)        $B4d:j(B ($B40(B)       -               -               $B4dM|(B($B40(B)
acpidump(8)     $B4d:j(B ($B40(B)       $B:4F#(B ($B40(B)       $B:4F#(B ($B40(B)       $B4dM|(B($B40(B)
acpi(4)         -               -               -               -

$B$G$O(B


.\"
.\" Copyright (c) 1999 Doug Rabson <dfr@FreeBSD.org>
.\" Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org>
.\" Copyright (c) 2000 Hiroki Sato <hrs@FreeBSD.org>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\" 
.\" $FreeBSD$
.\" 
.Dd August xx, 2000
.Dt ACPIDUMP 8
.Os FreeBSD
.Sh NAME
.Nm acpidump
.Nd dump ACPI tables
.Sh SYNOPSIS
.Nm acpidump
.Nm acpidump
.Op Fl o Ar dsdt_file_for_output
.Nm acpidump
.Op Fl f Ar dsdt_file_for_input
.Sh DESCRIPTION
.\"
.\"acpidump $B$OJ*M}%a%b%j$K3JG<$5$l$F$$$k(B ACPI $B%F!<%V%k$r2r@O$7I8(B
.\"$B=`=PNO$X=PNO$7$^$9(B. $B0lIt$N(B AML (ACPI Machine Language) $B$N7A<0(B
.\"$B$G5-=R$5$l$F$$$kFbMF$O5U%"%;%s%V%k$7$F(B ASL (ACPI Source
.\"Language) $B$N7A<0$G=PNO$7$^$9(B.
.\"
The
.Nm
command analyzes ACPI tables in physical memory and dumps them to standard output.
In addition,
.Nm
can disassemble some contents of the tables in AML
.Pq ACPI Machine Language
and dump them in ASL
.Pq ACPI Source Language .
.Pp
.\"
.\"ACPI $B%F!<%V%k$K$O(B DSDT (Differenticated System Description
.\"Table) $B$H8F$P$l$kFC$K=EMW$J%G!<%?%V%m%C%/$,$"$j(B, $B%O!<%I%&%'%"(B
.\"$B$N(B PnP $B$K4X$9$k>\:Y>pJs$dEE8;4IM}$N5!G=$rA`:n$9$k<jB3$-$J$I$N(B 
.\"OS $BB&$G;HMQ$9$k>pJs$,3JG<$5$l$F$$$^$9(B. acpidump $B$OJ*M}%a%b%j$+(B
.\"$B$i(BDSDT $B%G!<%?%V%m%C%/$rCj=P$7$F%U%!%$%k$X3JG<$9$k$3$H$,$G$-$^(B
.\"$B$9(B. $B$^$?M?$($i$l$?(B DSDT $B%G!<%?%U%!%$%k$+$i(B, $B5U%"%;%s%V%k$5$l$?(B 
.\"ASL $B$r=PNO$9$k$3$H$b2DG=$G$9(B.
.\"
ACPI tables have an notably essential data block called DSDT
.Pq Differentiated System Description Table ,
that includes information used on the kernel side such as
detail information about PnP hardware, procedures for controlling
a power management support and so on.
.Nm
can extract a DSDT data block from physical memory and store it into
a DSDT data file, and also can generate an output in ASL
from a given DSDT data file.
.Pp
.\"
.\"$B0z?tL5$7$G(B acpidump $B$,5/F0$5$l$k$H(B, $BFC<l%U%!%$%k(B /dev/mem $B7PM3(B
.\"$B$G$$$/$D$+$N(B ACPI $B%F!<%V%k$rJ*M}%a%b%j$+$i8!:w$7$F%@%s%W$7$^$9(B.
.\"$B:G=i$K(B "RSD PTR " $B$N%7%0%M%A%c$r;}$D(B Root System Description
.\"Pointer $B$rC5$7(B, $BB>$N%F!<%V%k72$X$NJ*M}%"%I%l%9$N%]%$%s%?$N%j%9(B
.\"$B%H$,3JG<$5$l$F$$$k(B RSDT (Root System Description Table) $B$r<hF@(B
.\"$B$7$^$9(B. RSDT $B$*$h$S(B RSDT $B$+$iD>@\$?$I$l$k$9$Y$F$N%F!<%V%k$OAm(B
.\"$B>N$7$F(B SDT (System Description Table) $B$H8F$P$l(B, Signature, 
.\"Length, Revision, Checksum, OEMID, OEM Table ID, OEM Revision,
.\"Creator ID, Creator Revision $B$N9`L\$+$i$J$k6&DL$N%X%C%@$r;}$A(B
.\"$B$^$9(B. acpidump $B$O$3$l$i$N(B SDT $B$NFbMF$r%@%s%W$7$^$9(B. $B3F%F!<%V%k(B
.\"$B$N7A<0$N>\:Y$K$D$$$F$O(B Intel/Microsoft/Toshiba $B$K$h$k(B 
.\"``Advanced Configuration and Power Interfce Specification
.\"Revision 1.0b'' $B$N(B 5 $B>O(B ``ACPI Software Programming Model'' $BEy(B
.\"$B$r;2>H$7$F$/$@$5$$(B.
.\"
When
.Nm
is invoked with no option, it will search ACPI tables from physical
memory via a special file
.Pa /dev/mem
and dumps them.  First, it searches Root System Description Pointer,
that has a signature
.Qq RSD PTR\ \& ,
and then gets RSDT
.Pq Root System Description Table ,
which includes a list of pointers to physical memory addresses
for other tables.
RSDT itself and all other tables linked from RSDT are generically
called SDT
.Pq System Description Table
and their header has the common format which consists of items
such as Signature, Length, Revision, Checksum, OEMID, OEM Table ID,
OEM Revision, Creator ID and Creator Revision.
.Nm
dumps contents of these SDTs.
For further information about formats of each table,
see chapter 5: ACPI Software Programming Model, 
.Dq Advanced Configuration and Power Interface Specification Revision 1.0b
from Intel/Microsoft/Toshiba.
.Pp
.\"
.\"RSDT $B$K$O(B, $BI,$:(B Fixed ACPI Description Table (FACP) $B$X$NJ*M}%"(B
.\"$B%I%l%9$N%]%$%s%?$,3JG<$5$l$F$$$^$9(B. FACP $B$O3d$j9~$_%b!<%I(B 
.\"(INT_MODEL), SCI $B3d$j9~$_HV9f(B (SCI_INT), SMI Command $B%]!<%H(B 
.\"(SMI_CMD) $B$d3F<o(B ACPI $B%l%8%9%?$N0LCV$J$I$NEE8;4IM}$K4X$9$k@EE*(B
.\"$B$J%7%9%F%`>pJs$rDj5A$7$F$$$^$9(B. FACP $B$O(B $B>e5-$N(B ACPI Hardware
.\"Register implementation $B$N>pJs$NB>$K(B, OS $BB&$G(B PnP $B$dEE8;4IM}$r(B
.\"$B$*$3$J$&:]$KMxMQ$9$k>pJs$r4^$`(B DSDT $B$X$NJ*M}%"%I%l%9$N%]%$%s%?(B
.\"$B$b4^$s$G$$$^$9(B. $B8GDj7A<0$GI=8=$5$l$F$$$kB>$N%F!<%V%k$H0[$J$j(B, 
.\"DSDT $B$O(B ASL $B$H$$$&(BACPI $BMQ$N5-=R8@8l$G<+M37A<0$G=q$+$l$?%=!<%9$r%3%s%Q%$(B
.\"$B%k$7$?(B AML $B$,3JG<$5$l$F$$$^$9(B. $B$=$N$?$a(B, acpidump $B$O(B DSDT $B$r=P(B
.\"$BNO$9$k:]$K$O(B, AML $B$r5U%"%;%s%V%k$7$F(B ASL$B$N7A<0$KJQ49$7$^$9(B.
.\"
There is always a pointer to a physical memory address in RSDT for FACP
.Pq Fixed ACPI Description Table .
.Ns \ FACP defines static system information about power management support
.Pq ACPI Hardware Register Implementation
such as interrupt mode
.Pq INT_MODEL ,
SCI interrupt number, SMI command port
.Pq SMI_CMD
and location of ACPI registers.  
FACP also has a pointer to a physical memory address for DSDT,
which includes information used on the kernel side such as
PnP, power management support and so on.
While the other tables are described in fixed format,
DSDT consists of AML data which compiled from sources
written in free formated ASL, description language for ACPI.
When
.Nm
outputs DSDT, it disassembles the AML data and
translates them into ASL.
.Sh OPTIONS
.\"
.\"$B0J2<$N%*%W%7%g%s$,(B acpidump $B$GMxMQ2DG=$G$9(B.
.\"
The following options are supported by
.Nm Ns :
.Bl -tag -width indent
.It Fl o Ar dsdt_file_for_output
.\"
.\"$B0z?tL5$7$NF0:n$K2C$((B, $BJ*M}%a%b%j$+$iCj=P$7$?(B DSDT $B%G!<(B
.\"$B%?%V%m%C%/$r(B dsdt_file_for_output $B$X3JG<$7$^$9(B.
.\"
Stores DSDT data block from physical memory into a file specified in
.Ar dsdt_file_for_output
in addition to behavior with no option.
.It Fl f Ar dsdt_file_for_input
.\"
.\"$B;XDj$5$l$?(B dsdt_file_for_input $B$K3JG<$5$l$F$$$k(B DSDT 
.\"$B$N(B AML $B$r2r<a$7(B, ASL $B$N7A<0$GI8=`=PNO$X=PNO$7$^$9(B.
.\"
Interprets AML data in DSDT from a file specified in
.Ar dsdt_file_for_input
and dumps them in ASL to standard output.
.It Fl h
.\"
.\"$B;HMQJ}K!$rI=<($7$F=*N;$7$^$9(B.
.\"
Displays usage and exit.
.El
.Sh EXAMPLES
.\"
.\"$B0J2<$O(B ACPI BIOS $B$,Ek:\$5$l$F$$$k%^%7%s>e$G(B acpidump $B$r<B9T$7(B, 
.\"SDT $B$N%@%s%W=PNO$H(B DSDT $B%G!<%?%U%!%$%k$rF1;~$K:N<h$9$kNc$G$9(B.
.\"
This is an example to get a dump of SDTs and a DSDT data file
simultaneously on a machine that supports ACPI BIOS.
.Bd -literal -offset indent
# acpidump -o foo.dsdt > foo.asl
.Ed
.Sh BUGS
.\"
.\"$B8=:_$N<BAu$G$O(B FACP $B$K%]%$%s%?$,$"$k(B Firmware ACPI Control
.\"Structure (FACS) $B$N>pJs$O=PNO$5$l$^$;$s(B.
.\"$B=PNO$5$l$k(B ASL $B$OIT40A4$JItJ,$,$"$j$^$9(B. $B40A4$J=PNO$rF@$k$?$a(B
.\"$B$K$O(B, $BA0=hM}$H$7$F(B DSDT $BA4BN$r2r@O$7$F(B ACPI namespace $B$r9=C[$7(B, 
.\"namespace $B$r;2>H$7$J$,$i:F$S(B DSDT $B$r2r<a$7$F$$$/<BAu$K$9$kI,MW(B
.\"$B$,$"$j$^$9(B.
.\"
In the current implementation,
.Nm
doesn't dump any information of Firmware ACPI Control Structure
.Pq FACS
specified by a pointer in FACP.
Some parts of output in ASL are incomplete.  To obtain a complete
output, it would need to change the implementation into another one
that analyzes a whole DSDT and builds an ACPI namespace as preprocess,
and then interprets the DSDT again referring to namespace.
.Sh FILES
.Bl -tag -width /dev/mem
.It Pa /dev/mem
.El
.Sh SEE ALSO
.Xr mem 4 ,
.Xr acpi 4 ,
.Xr acpiconf 8 ,
.Xr amldb 8
.Pp
.Dq Advanced Configuration and Power Interfce Specification
.Bd -literal -offset indent -compact 
Intel
Microsoft
Toshiba
Revision 1.0b
.Ed
<URL:http://www.teleport.com/~acpi/>
.Sh AUTHORS
.An Doug Rabson Aq dfr@FreeBSD.org
.An Mitsuru IWASAKI Aq iwasaki@FreeBSD.org
.Pp
Some contributions made by
.An Chitoshi Ohsawa Aq ohsawa@catv1.ccn-net.ne.jp ,
.An Takayasu IWANASHI Aq takayasu@wendy.perfect-liberty.or.jp ,
.An Yoshihiko SARUMARU Aq mistral@imasy.or.jp ,
and
.An Hiroki Sato Aq hrs@FreeBSD.org .
.Sh HISTORY
The
.Nm
command appeared in
.Fx 5.0 .
