From 61c0377f1d53e996641f59e19550f82a47f86ee0 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Thu, 10 Apr 2014 21:07:10 +0200 Subject: [PATCH] Add some manual pages for the ACPICA utilities provided by Intel. For now, just list the options and their descriptions (taken from the usages). --- share/man/man4/acpi.4 | 4 + usr.sbin/acpi/acpibin/Makefile | 2 +- usr.sbin/acpi/acpibin/acpibin.8 | 79 ++++++++ usr.sbin/acpi/acpiconf/acpiconf.8 | 11 +- usr.sbin/acpi/acpidump/acpidump.8 | 225 ++++++---------------- usr.sbin/acpi/acpiexec/Makefile | 2 +- usr.sbin/acpi/acpiexec/acpiexec.8 | 111 +++++++++++ usr.sbin/acpi/acpihelp/Makefile | 2 +- usr.sbin/acpi/acpihelp/acpihelp.8 | 103 ++++++++++ usr.sbin/acpi/acpinames/Makefile | 2 +- usr.sbin/acpi/acpinames/acpinames.8 | 73 ++++++++ usr.sbin/acpi/acpixtract/Makefile | 2 +- usr.sbin/acpi/acpixtract/acpixtract.8 | 75 ++++++++ usr.sbin/acpi/iasl/iasl.8 | 258 ++++++++++++++------------ 14 files changed, 657 insertions(+), 292 deletions(-) create mode 100644 usr.sbin/acpi/acpibin/acpibin.8 create mode 100644 usr.sbin/acpi/acpiexec/acpiexec.8 create mode 100644 usr.sbin/acpi/acpihelp/acpihelp.8 create mode 100644 usr.sbin/acpi/acpinames/acpinames.8 create mode 100644 usr.sbin/acpi/acpixtract/acpixtract.8 diff --git a/share/man/man4/acpi.4 b/share/man/man4/acpi.4 index 57c2b53925..25a63f364d 100644 --- a/share/man/man4/acpi.4 +++ b/share/man/man4/acpi.4 @@ -586,8 +586,12 @@ ACPI is only found and supported on i386/ia32, ia64, and x86_64. .Xr acpi_video 4 , .Xr aibs 4 , .Xr loader.conf 5 , +.Xr acpibin 8 , .Xr acpiconf 8 , .Xr acpidump 8 , +.Xr acpiexec 8 , +.Xr acpinames 8 , +.Xr acpixtract 8 , .Xr config 8 , .Xr iasl 8 .Rs diff --git a/usr.sbin/acpi/acpibin/Makefile b/usr.sbin/acpi/acpibin/Makefile index b068b7efd6..e737cbfd18 100644 --- a/usr.sbin/acpi/acpibin/Makefile +++ b/usr.sbin/acpi/acpibin/Makefile @@ -7,7 +7,7 @@ UTILDIR=${.CURDIR}/../../../sys/contrib/dev/acpica/source/tools/acpibin .PATH: ${UTILDIR} PROG= acpibin -NOMAN= +MAN= acpibin.8 SRCS= \ abcompare.c \ diff --git a/usr.sbin/acpi/acpibin/acpibin.8 b/usr.sbin/acpi/acpibin/acpibin.8 new file mode 100644 index 0000000000..edbfa40e2c --- /dev/null +++ b/usr.sbin/acpi/acpibin/acpibin.8 @@ -0,0 +1,79 @@ +.\" +.\" Copyright (c) 2014 The DragonFly Project. 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. +.\" 3. Neither the name of The DragonFly Project nor the names of its +.\" contributors may be used to endorse or promote products derived +.\" from this software without specific, prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 +.\" COPYRIGHT HOLDERS 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. +.\" +.Dd April 10, 2014 +.Dt ACPIBIN 8 +.Os +.Sh NAME +.Nm acpibin +.Nd miscellaneous manipulation of binary ACPI tables +.Sh SYNOPSIS +.Nm +.Op Ar option ... +.Sh DESCRIPTION +The following options are supported: +.Bl -tag -width indent +.It Fl c Ar file1 Ar file2 +Compare two binary AML files. +.It Fl d Ar in Ar out +Dump AML binary to text file. +.It Fl e Ar sig Ar in Ar out +Extract binary AML table from AcpiDump file. +.It Fl h Ar file +Display table header for binary AML file. +.It Fl s Ar file +Update checksum for binary AML file. +.It Fl t +Terse mode. +.It Fl v +Display version information. +.El +.Sh SEE ALSO +.Xr acpi 4 , +.Xr acpiconf 8 , +.Xr acpidump 8 , +.Xr acpiexec 8 , +.Xr acpihelp 8 , +.Xr acpinames 8 , +.Xr acpixtract 8 , +.Xr iasl 8 +.Pp +.Lk https://acpica.org/documentation/ +.Sh AUTHORS +The +.Nm +utility is provided by +.Tn Intel +as part of their +.Sy ACPICA +distribution. +.Pp +This manual page was written by +.An Sascha Wildner . diff --git a/usr.sbin/acpi/acpiconf/acpiconf.8 b/usr.sbin/acpi/acpiconf/acpiconf.8 index 832bb20942..ffda19f303 100644 --- a/usr.sbin/acpi/acpiconf/acpiconf.8 +++ b/usr.sbin/acpi/acpiconf/acpiconf.8 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD: src/usr.sbin/acpi/acpiconf/acpiconf.8,v 1.15.20.1 2009/04/15 03:14:26 kensmith Exp $ .\" -.Dd August 16, 2004 +.Dd April 10, 2014 .Dt ACPICONF 8 .Os .Sh NAME @@ -75,8 +75,15 @@ the given sleep state. .El .Sh SEE ALSO .Xr acpi 4 , +.Xr acpibin 8 , .Xr acpidump 8 , -.Xr apm 8 +.Xr acpiexec 8 , +.Xr acpihelp 8 , +.Xr acpinames 8 , +.Xr acpixtract 8 , +.Xr acpidump 8 , +.Xr apm 8 , +.Xr iasl 8 .Sh HISTORY The .Nm diff --git a/usr.sbin/acpi/acpidump/acpidump.8 b/usr.sbin/acpi/acpidump/acpidump.8 index b8ee7fa219..65b06678fc 100644 --- a/usr.sbin/acpi/acpidump/acpidump.8 +++ b/usr.sbin/acpi/acpidump/acpidump.8 @@ -1,193 +1,90 @@ -.\" ACPI (ACPI Package) .\" -.\" Copyright (c) 1999 Doug Rabson -.\" Copyright (c) 2000 Mitsuru IWASAKI -.\" Copyright (c) 2000 Yasuo YOKOYAMA -.\" Copyright (c) 2000 Hiroki Sato -.\" All rights reserved. +.\" Copyright (c) 2014 The DragonFly Project. 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. +.\" notice, this list of conditions and the following disclaimer in +.\" the documentation and/or other materials provided with the +.\" distribution. +.\" 3. Neither the name of The DragonFly Project nor the names of its +.\" contributors may be used to endorse or promote products derived +.\" from this software without specific, prior written permission. .\" -.\" 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 +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 +.\" COPYRIGHT HOLDERS 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: src/usr.sbin/acpi/acpidump/acpidump.8,v 1.23 2005/02/14 16:32:32 njl Exp $ -.\" -.Dd February 14, 2005 +.Dd April 10, 2014 .Dt ACPIDUMP 8 .Os .Sh NAME .Nm acpidump -.Nd dump ACPI tables and ASL +.Nd obtain system ACPI tables and save in ASCII hex format .Sh SYNOPSIS .Nm -.Op Fl d -.Op Fl t -.Op Fl h -.Op Fl v -.Op Fl f Ar dsdt_input -.Op Fl o Ar dsdt_output +.Op Ar option ... .Sh DESCRIPTION -The -.Nm -utility analyzes ACPI tables in physical memory and can dump them to a file. -In addition, -.Nm -can call -.Xr iasl 8 -to disassemble AML -(ACPI Machine Language) -found in these tables and dump them as ASL -(ACPI Source Language) -to stdout. -.Pp -ACPI tables have an essential data block (the DSDT, -Differentiated System Description Table) -that includes information used on the kernel side such as -detailed information about PnP hardware, procedures for controlling -power management support, and so on. -The -.Nm -utility can extract the DSDT data block from physical memory and store it into -an output file and optionally also disassemble it. -If any Secondary System Description Table -(SSDT) -entries exist, they will also be included in the output file and disassembly. -.Pp -When -.Nm -is invoked without the -.Fl f -option, it will read ACPI tables from physical memory via -.Pa /dev/mem . -First it searches for the RSDP -(Root System Description Pointer), -which has the signature -.Qq RSD PTR\ \& , -and then gets the RSDT -(Root System Description Table), -which includes a list of pointers to physical memory addresses -for other tables. -The RSDT itself and all other tables linked from RSDT are generically -called SDTs -(System Description Tables) -and their header has a common format which consists of items -such as Signature, Length, Revision, Checksum, OEMID, OEM Table ID, -OEM Revision, Creator ID and Creator Revision. -When invoked with the -.Fl t -flag, the -.Nm -utility dumps contents of the following tables: -.Pp -.Bl -tag -offset indent -width 12345 -compact -.It DSDT -.It ECDT -.It FACS -.It FADT -.It HPET -.It MADT -.It MCFG -.It RSD PTR -.It RSDT -.El -.Pp -The RSDT contains a pointer to the physical memory address of the FACP -(Fixed ACPI Description Table). -The FACP defines static system information about power management support -(ACPI Hardware Register Implementation) -such as interrupt mode (INT_MODEL), -SCI interrupt number, SMI command port (SMI_CMD) -and the location of ACPI registers. -The FACP also has a pointer to a physical memory address for the DSDT. -While the other tables are fixed format, -the DSDT consists of free-formatted AML data. -.Sh OPTIONS -The following options are supported by -.Nm : +The following options are supported: .Bl -tag -width indent -.It Fl d -Disassemble the DSDT into ASL using -.Xr iasl 8 -and print the results to stdout. -.It Fl t -Dump the contents of the various fixed tables listed above. +.It Fl a Ar address +Get table via a physical address. +.It Fl b +Dump tables to binary files. +.It Fl c +Dump customized tables. +.It Fl f Ar binary_file +Get table via a binary file. .It Fl h -Displays usage and exit. +Display the help message. +.It Fl \&? +Alias for +.Fl h . +.It Fl n Ar signature +Get table via a name/signature. +.It Fl o Ar file +Redirect output to file. +.It Fl r Ar address +Dump tables from specified RSDP. +.It Fl s +Print table summaries only. .It Fl v -Enable verbose messages. -.It Fl f Ar dsdt_input -Load the DSDT from the specified file instead of physical memory. -Since only the DSDT is stored in the file, the -.Fl t -flag may not be used with this option. -.It Fl o Ar dsdt_output -Store the DSDT data block from physical memory into the specified file. -.El -.Sh FILES -.Bl -tag -width /dev/mem -.It Pa /dev/mem +Display version information. +.It Fl z +Verbose mode. .El -.Sh EXAMPLES -This example dumps the DSDT from physical memory to foo.dsdt. -It also prints the contents of various system tables and disassembles -the AML contained in the DSDT to stdout, redirecting the output -to foo.asl. -.Bd -literal -offset indent -# acpidump -t -d -o foo.dsdt > foo.asl -.Ed -.Pp -This example reads a DSDT file and disassembles it to stdout. -Verbose messages are enabled. -.Bd -literal -offset indent -# acpidump -v -d -f foo.dsdt -.Ed .Sh SEE ALSO .Xr acpi 4 , -.Xr mem 4 , +.Xr acpibin 8 , .Xr acpiconf 8 , -.\".Xr acpidb 8 , +.Xr acpiexec 8 , +.Xr acpihelp 8 , +.Xr acpinames 8 , +.Xr acpixtract 8 , .Xr iasl 8 -.Sh HISTORY +.Pp +.Lk https://acpica.org/documentation/ +.Sh AUTHORS The .Nm -utility first appeared in -.Fx 5.0 -and was rewritten to use -.Xr iasl 8 -for -.Fx 5.2 . -.Sh AUTHORS -.An Doug Rabson Aq Mt dfr@FreeBSD.org -.An Mitsuru IWASAKI Aq Mt iwasaki@FreeBSD.org -.An Yasuo YOKOYAMA Aq Mt yokoyama@jp.FreeBSD.org -.An Nate Lawson Aq Mt njl@FreeBSD.org +utility is provided by +.Tn Intel +as part of their +.Sy ACPICA +distribution. .Pp -.An -nosplit -Some contributions made by -.An Chitoshi Ohsawa Aq Mt ohsawa@catv1.ccn-net.ne.jp , -.An Takayasu IWANASHI Aq Mt takayasu@wendy.a.perfect-liberty.or.jp , -.An Yoshihiko SARUMARU Aq Mt mistral@imasy.or.jp , -.An Hiroki Sato Aq Mt hrs@FreeBSD.org , -.An Michael Lucas Aq Mt mwlucas@blackhelicopters.org -and -.An Michael Smith Aq Mt msmith@FreeBSD.org . -.Sh BUGS -The current implementation does not dump the BOOT structure or -other miscellaneous tables. +This manual page was written by +.An Sascha Wildner . diff --git a/usr.sbin/acpi/acpiexec/Makefile b/usr.sbin/acpi/acpiexec/Makefile index d8c9c0f67a..3d169e102b 100644 --- a/usr.sbin/acpi/acpiexec/Makefile +++ b/usr.sbin/acpi/acpiexec/Makefile @@ -9,7 +9,7 @@ UTILDIR=${.CURDIR}/../../../sys/contrib/dev/acpica/source/tools/acpiexec .PATH: ${UTILDIR} PROG= acpiexec -NOMAN= +MAN= acpiexec.8 SRCS= \ aeexec.c \ diff --git a/usr.sbin/acpi/acpiexec/acpiexec.8 b/usr.sbin/acpi/acpiexec/acpiexec.8 new file mode 100644 index 0000000000..3e20411d99 --- /dev/null +++ b/usr.sbin/acpi/acpiexec/acpiexec.8 @@ -0,0 +1,111 @@ +.\" +.\" Copyright (c) 2014 The DragonFly Project. 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. +.\" 3. Neither the name of The DragonFly Project nor the names of its +.\" contributors may be used to endorse or promote products derived +.\" from this software without specific, prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 +.\" COPYRIGHT HOLDERS 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. +.\" +.Dd April 10, 2014 +.Dt ACPIEXEC 8 +.Os +.Sh NAME +.Nm acpiexec +.Nd load ACPI tables and execute control methods from user space +.Sh SYNOPSIS +.Nm +.Op Ar option ... +.Ar aml_file ... +.Sh DESCRIPTION +The following options are supported: +.Bl -tag -width indent +.It Fl b Ar \&"command_line\&" +Batch mode command line execution (cmd1;cmd2;...). +.It Fl da +Disable method abort on error. +.It Fl di +Disable execution of STA/INI methods during init. +.It Fl do +Disable Operation Region address simulation. +.It Fl dr +Disable repair of method return values. +.It Fl ds +Disable method auto-serialization. +.It Fl dt +Disable allocation tracking (performance). +.It Fl ef +Enable display of final memory statistics. +.It Fl ei +Enable additional tests for ACPICA interfaces. +.It Fl el +Enable loading of additional test tables. +.It Fl es +Enable Interpreter Slack Mode. +.It Fl et +Enable debug semaphore timeout. +.It Fl f Ar value +Operation Region initialization fill value. +.It Fl h +Display the help message. +.It Fl \&? +Alias for +.Fl h . +.It Fl m Op Ar method +Batch mode method execution. +The default method is +.Sy MAIN . +.It Fl r +Use hardware-reduced FADT V5. +.It Fl v +Display version information. +.It Fl vi +Verbose initialization output. +.It Fl vr +Verbose region handler output. +.It Fl x Ar debug_level +Debug output level. +.El +.Sh SEE ALSO +.Xr acpi 4 , +.Xr acpibin 8 , +.Xr acpiconf 8 , +.Xr acpidump 8 , +.Xr acpihelp 8 , +.Xr acpinames 8 , +.Xr acpixtract 8 , +.Xr iasl 8 +.Pp +.Lk https://acpica.org/documentation/ +.Sh AUTHORS +The +.Nm +utility is provided by +.Tn Intel +as part of their +.Sy ACPICA +distribution. +.Pp +This manual page was written by +.An Sascha Wildner . diff --git a/usr.sbin/acpi/acpihelp/Makefile b/usr.sbin/acpi/acpihelp/Makefile index a826952674..f170d3b269 100644 --- a/usr.sbin/acpi/acpihelp/Makefile +++ b/usr.sbin/acpi/acpihelp/Makefile @@ -8,7 +8,7 @@ UTILDIR=${.CURDIR}/../../../sys/contrib/dev/acpica/source/tools/acpihelp .PATH: ${UTILDIR} PROG= acpihelp -NOMAN= +MAN= acpihelp.8 SRCS= \ ahamlops.c \ diff --git a/usr.sbin/acpi/acpihelp/acpihelp.8 b/usr.sbin/acpi/acpihelp/acpihelp.8 new file mode 100644 index 0000000000..2b456d1883 --- /dev/null +++ b/usr.sbin/acpi/acpihelp/acpihelp.8 @@ -0,0 +1,103 @@ +.\" +.\" Copyright (c) 2014 The DragonFly Project. 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. +.\" 3. Neither the name of The DragonFly Project nor the names of its +.\" contributors may be used to endorse or promote products derived +.\" from this software without specific, prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 +.\" COPYRIGHT HOLDERS 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. +.\" +.Dd April 10, 2014 +.Dt ACPIHELP 8 +.Os +.Sh NAME +.Nm acpihelp +.Nd help utility for ASL operators, AML opcodes, and ACPI predefined names +.Sh SYNOPSIS +.Nm +.Op Ar option ... +.Op Ar name_prefix | hex_value +.Sh DESCRIPTION +The following options are supported: +.Bl -tag -width indent +.It Fl e Op Ar hex_value +Decode ACPICA exception code. +.It Fl h +Display help. +.It Fl i +Display known ACPI Device IDs (_HID). +.It Fl k Op Ar name_prefix +Find/Display ASL non-operator keyword(s). +.It Fl m Op Ar name_prefix +Find/Display AML opcode name(s). +.It Fl o Op Ar hex_value +Decode hex AML opcode. +.It Fl p Op Ar name_prefix +Find/Display ASL predefined method name(s). +.It Fl s Op Ar name_prefix +Find/Display ASL operator name(s). +.It Fl v +Display version information. +.El +.Pp +If neither +.Ar name_prefix +nor +.Ar hex_value +are specified +.Nm +defaults to displaying all information available for the specified option. +.Pp +If a +.Ar name_prefix +but no options are specified +.Nm +defaults to finding ASL operator names if +.Ar name_prefix +does not start with an underscore, and to finding ASL predefined method +names if +.Ar name_prefix +does start with an underscore. +.Sh SEE ALSO +.Xr acpi 4 , +.Xr acpibin 8 , +.Xr acpiconf 8 , +.Xr acpidump 8 , +.Xr acpiexec 8 , +.Xr acpinames 8 , +.Xr acpixtract 8 , +.Xr iasl 8 +.Pp +.Lk https://acpica.org/documentation/ +.Sh AUTHORS +The +.Nm +utility is provided by +.Tn Intel +as part of their +.Sy ACPICA +distribution. +.Pp +This manual page was written by +.An Sascha Wildner . diff --git a/usr.sbin/acpi/acpinames/Makefile b/usr.sbin/acpi/acpinames/Makefile index dccb5ae817..b3547c02c8 100644 --- a/usr.sbin/acpi/acpinames/Makefile +++ b/usr.sbin/acpi/acpinames/Makefile @@ -9,7 +9,7 @@ UTILDIR=${.CURDIR}/../../../sys/contrib/dev/acpica/source/tools/acpinames .PATH: ${UTILDIR} PROG= acpinames -NOMAN= +MAN= acpinames.8 SRCS= \ anmain.c \ diff --git a/usr.sbin/acpi/acpinames/acpinames.8 b/usr.sbin/acpi/acpinames/acpinames.8 new file mode 100644 index 0000000000..6ed738a822 --- /dev/null +++ b/usr.sbin/acpi/acpinames/acpinames.8 @@ -0,0 +1,73 @@ +.\" +.\" Copyright (c) 2014 The DragonFly Project. 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. +.\" 3. Neither the name of The DragonFly Project nor the names of its +.\" contributors may be used to endorse or promote products derived +.\" from this software without specific, prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 +.\" COPYRIGHT HOLDERS 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. +.\" +.Dd April 10, 2014 +.Dt ACPINAMES 8 +.Os +.Sh NAME +.Nm acpinames +.Nd example utility that loads and displays the ACPI namespace +.Sh SYNOPSIS +.Nm +.Op Ar option ... +.Ar aml_file +.Sh DESCRIPTION +The following options are supported: +.Bl -tag -width indent +.It Fl h +Display the help message. +.It Fl \&? +Alias for +.Fl h . +.It Fl v +Display version information. +.El +.Sh SEE ALSO +.Xr acpi 4 , +.Xr acpibin 8 , +.Xr acpiconf 8 , +.Xr acpidump 8 , +.Xr acpiexec 8 , +.Xr acpihelp 8 , +.Xr acpixtract 8 , +.Xr iasl 8 +.Pp +.Lk https://acpica.org/documentation/ +.Sh AUTHORS +The +.Nm +utility is provided by +.Tn Intel +as part of their +.Sy ACPICA +distribution. +.Pp +This manual page was written by +.An Sascha Wildner . diff --git a/usr.sbin/acpi/acpixtract/Makefile b/usr.sbin/acpi/acpixtract/Makefile index 5e30a79888..59cb563ad4 100644 --- a/usr.sbin/acpi/acpixtract/Makefile +++ b/usr.sbin/acpi/acpixtract/Makefile @@ -7,7 +7,7 @@ UTILDIR=${.CURDIR}/../../../sys/contrib/dev/acpica/source/tools/acpixtract .PATH: ${UTILDIR} PROG= acpixtract -NOMAN= +MAN= acpixtract.8 SRCS= \ acpixtract.c \ diff --git a/usr.sbin/acpi/acpixtract/acpixtract.8 b/usr.sbin/acpi/acpixtract/acpixtract.8 new file mode 100644 index 0000000000..3b045550cc --- /dev/null +++ b/usr.sbin/acpi/acpixtract/acpixtract.8 @@ -0,0 +1,75 @@ +.\" +.\" Copyright (c) 2014 The DragonFly Project. 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. +.\" 3. Neither the name of The DragonFly Project nor the names of its +.\" contributors may be used to endorse or promote products derived +.\" from this software without specific, prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 +.\" COPYRIGHT HOLDERS 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. +.\" +.Dd April 10, 2014 +.Dt ACPIXTRACT 8 +.Os +.Sh NAME +.Nm acpixtract +.Nd extract binary ACPI tables from an ASCII acpidump +.Sh SYNOPSIS +.Nm +.Op Ar option ... +.Ar input_file +.Sh DESCRIPTION +The following options are supported: +.Bl -tag -width indent +.It Fl a +Extract all tables, not just DSDT/SSDT. +.It Fl l +List table summaries, do not extract. +.It Fl s Ar signature +Extract all tables with +.Ar signature . +.It v +Display version information. +.El +.Sh SEE ALSO +.Xr acpi 4 , +.Xr acpibin 8 , +.Xr acpiconf 8 , +.Xr acpidump 8 , +.Xr acpiexec 8 , +.Xr acpihelp 8 , +.Xr acpinames 8 , +.Xr iasl 8 +.Pp +.Lk https://acpica.org/documentation/ +.Sh AUTHORS +The +.Nm +utility is provided by +.Tn Intel +as part of their +.Sy ACPICA +distribution. +.Pp +This manual page was written by +.An Sascha Wildner . diff --git a/usr.sbin/acpi/iasl/iasl.8 b/usr.sbin/acpi/iasl/iasl.8 index 98f7ffff07..9f29c1bcb6 100644 --- a/usr.sbin/acpi/iasl/iasl.8 +++ b/usr.sbin/acpi/iasl/iasl.8 @@ -1,129 +1,108 @@ -.\"- -.\" Copyright (c) 2003 Nate Lawson -.\" All rights reserved. +.\" +.\" Copyright (c) 2014 The DragonFly Project. 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 -.\" in this position and unchanged. +.\" 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. -.\" 3. The name of the author may not be used to endorse or promote products -.\" derived from this software without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. +.\" notice, this list of conditions and the following disclaimer in +.\" the documentation and/or other materials provided with the +.\" distribution. +.\" 3. Neither the name of The DragonFly Project nor the names of its +.\" contributors may be used to endorse or promote products derived +.\" from this software without specific, prior written permission. .\" -.\" $FreeBSD: src/usr.sbin/acpi/iasl/iasl.8,v 1.2 2004/06/13 18:03:39 ru Exp $ -.\" $DragonFly: src/usr.sbin/acpi/iasl/iasl.8,v 1.1 2004/07/05 00:22:43 dillon Exp $ +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 +.\" COPYRIGHT HOLDERS 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. .\" -.Dd August 7, 2003 +.Dd April 10, 2014 .Dt IASL 8 .Os .Sh NAME .Nm iasl -.Nd Intel ACPI compiler/decompiler +.Nd ACPI Source Language compiler, ACPI table compiler, and AML disassembler .Sh SYNOPSIS .Nm -.Op Fl cefghl -.Op Fl b Ar type -.Op Fl d Ar file -.Op Fl dc Ar file -.Op Fl hc -.Op Fl hr -.Op Fl i Ar type -.Op Fl ln -.Op Fl ls -.Op Fl oa -.Op Fl of -.Op Fl oi -.Op Fl on -.Op Fl ot -.Op Fl p Ar prefix -.Op Fl s Ar type -.Op Fl t Ar type -.Op Fl vi -.Op Fl vo -.Op Fl vr -.Op Fl vs -.Op Fl x Ar level -.Ar input-file +.Op Ar option ... +.Op Ar file ... .Sh DESCRIPTION -The -.Nm -utility is a compiler/decompiler for ACPI Source Language (ASL) -and ACPI Machine Language (AML). -Major features of -.Nm -include: -.Bl -bullet -offset indent -.It -Full support for the ACPI 2.0b Specification including ASL grammar -elements and operators. -.It -Extensive compiler syntax and semantic error checking, especially in -the area of control methods. -This reduces the number of errors that are -not discovered until the AML code is actually interpreted (i.e., the -compile-time error checking reduces the number of run-time errors). -.It -Multiple types of output files, including formatted listing files with -intermixed source, several types of AML files, and error messages. -.El -.Sh OPTIONS +The following options are supported: .Bl -tag -width indent -.It Fl b Sm Cm p | t | b Sm -Create compiler debug/trace file -.Pq Pa *.txt . -Types: Parse/Tree/Both. -.It Fl c -Parse only, no output generation. -.It Fl d Ar file -Disassemble AML to ASL source code file -.Pq Pa *.dsl . -.It Fl dc Ar file +.It Fl @ Ar file +Specify command file. +.It Fl bf +Create debug file (full tree only) (*.txt). +.It Fl bt +Create debug file (parse tree only) (*.txt). +.It Fl cr +Disable Resource Descriptor error checking. +.It Fl d Ar file1 Op Ar file2 +Disassemble or decode binary ACPI tables to file (*.dsl). +The +.Ar file2 +is optional, file type is automatically detected. +.It Fl D Ar symbol +Define symbol for preprocessor use. +.It Fl da Ar file ... +Disassemble multiple tables from single namespace. +.It Fl db +Do not translate Buffers to Resource Templates. +.It Fl dc Ar file ... Disassemble AML and immediately compile it. -(Obtain DSDT from current system if no input file.) -.It Fl e -Generate -.Fn External -statements for unresolved symbols. +Obtain the DSDT from the current system if no input file has it. +.It Fl e Ar file ... +Include ACPI table(s) for external symbol resolution. .It Fl f Ignore errors, force creation of AML output file(s). -.It Fl g -Get ACPI tables and write to files -.Pq Pa *.dat . +.It Fl fe Ar file +Specify external symbol declaration file. +.It Fl G +Compile custom table that contains generic operators. .It Fl h -Additional help and compiler debug options. +Display the help message. .It Fl hc Display operators allowed in constant expressions. +.It Fl hf +Display help for output filename generation. .It Fl hr Display ACPI reserved method names. -.It Fl i Sm Cm a | c Sm -Create assembler or C include file -.Pa ( *.inc -or -.Pa *.h ) . +.It Fl ht +Display currently supported ACPI table names. +.It Fl I Ar directory +Specify additional include directory. +.It Fl ia +Create include file in assembler (*.inc). +.It Fl ic +Create include file in C (*.h). +.It Fl in +Ignore NoOp opcodes. +.It Fl in +Ignore NoOp operators. .It Fl l -Create mixed listing file (ASL source and AML) -.Pq Pa *.lst . +Create mixed listing file (ASL source and AML) (*.lst). +.It Fl li +Create preprocessed output file (*.i). .It Fl ln -Create namespace file -.Pq Pa *.nsp . +Create namespace file (*.nsp). .It Fl ls -Create combined source file (expanded includes) -.Pq Pa *.src . +Create combined source file (expanded includes) (*.src). +.It Fl m Ar size +Set internal line buffer size (in Kbytes). +.It Fl n +Parse only, no output generation. .It Fl oa Disable all optimizations (compatibility mode). .It Fl of @@ -133,18 +112,36 @@ Disable integer optimization to Zero/One/Ones. .It Fl on Disable named reference string optimization. .It Fl ot -Display compile times. +Display compile times and statistics. +.It Fl P +Preprocess only and create preprocessor output file (*.i). .It Fl p Ar prefix -Specify filename prefix for all output files (including -.Pa .aml ) . -.It Fl s Sm Cm a | c Sm -Create AML in assembler or C source file -.Pa ( *.asm -or -.Pa *.c ) . -.It Fl t Ar a|c -Create AML in assembler or C hex table -.Pq Pa *.hex . +Specify path/filename prefix for all output files. +.It Fl Pn +Disable preprocessor. +.It Fl r Ar revision +Override table header Revision (1-255). +.It Fl sa +Create source file in assembler (*.asm). +.It Fl sc +Create source file in C (*.c). +.It Fl so +Create offset table in C (*.offset.h). +.It Fl T Ar sig | ALL | * +Create table template file for ACPI +.Ar sig . +.It Fl ta +Create hex AML table in assembler (*.hex). +.It Fl tc +Create hex AML table in C (*.hex). +.It Fl ts +Create hex AML table in ASL (*.hex). +.It Fl v +Display compiler version. +.It Fl va +Disable all errors/warnings/remarks. +.It Fl ve +Report only errors (ignore warnings and remarks). .It Fl vi Less verbose errors and warnings for use with IDEs. .It Fl vo @@ -153,23 +150,42 @@ Enable optimization comments. Disable remarks. .It Fl vs Disable signon. +.It Fl vt +Create verbose template files (full disassembly). +.It Fl vt +Dump binary table data in hex format within output file. +.It Fl vw Ar message_id +Disable specific warning or remark. +.It Fl w1 | Fl w2 | Fl w3 +Set warning reporting level. +.It Fl we +Report warnings as errors. .It Fl x Ar level Set debug level for trace output. +.It Fl z +Do not insert new compiler ID for DataTables. .El .Sh SEE ALSO .Xr acpi 4 , -.Xr acpidump 8 -.Sh HISTORY -The -.Nm -utility is provided with Intel ACPI-CA. -It first appeared in -.Fx 5.2 . +.Xr acpibin 8 , +.Xr acpiconf 8 , +.Xr acpidump 8 , +.Xr acpiexec 8 , +.Xr acpihelp 8 , +.Xr acpinames 8 , +.Xr acpixtract 8 +.Pp +.Lk https://acpica.org/documentation/ +.Pp +.Lk https://acpica.org/sites/acpica/files/aslcompiler_5.pdf .Sh AUTHORS -.An -nosplit The .Nm -utility was written by -.An Intel . +utility is provided by +.Tn Intel +as part of their +.Sy ACPICA +distribution. +.Pp This manual page was written by -.An Nate Lawson . +.An Sascha Wildner . -- 2.41.0