kernel - Handle spinlock indefinite wait edge case
[dragonfly.git] / usr.sbin / acpi / acpicall / acpicall.8
blobdface170672fb1becc284046d9a024e45292eb6e
1 .\"
2 .\" Copyright (c) 2015 The DragonFly Project.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\"
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in
12 .\"    the documentation and/or other materials provided with the
13 .\"    distribution.
14 .\" 3. Neither the name of The DragonFly Project nor the names of its
15 .\"    contributors may be used to endorse or promote products derived
16 .\"    from this software without specific, prior written permission.
17 .\"
18 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21 .\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
22 .\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23 .\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
24 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
28 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 .\" SUCH DAMAGE.
30 .\"
31 .Dd September 1, 2015
32 .Dt ACPICALL 8
33 .Os
34 .Sh NAME
35 .Nm acpicall
36 .Nd call ACPI methods
37 .Sh SYNOPSIS
38 .Nm
39 .Op Fl v
40 .Op Fl b Ar hexstring
41 .Op Fl d Ar file
42 .Op Fl i Ar number
43 .Op Fl o Ar i | s | b | o
44 .Op Fl s Ar string
45 .Op Fl U Ar uuid
46 .Ar path
47 .Sh DESCRIPTION
48 The
49 .Nm
50 utility calls the ACPI method
51 .Ar path
52 with the arguments specified by any
53 .Fl b ,
54 .Fl i ,
55 .Fl o ,
56 .Fl s ,
57 and
58 .Fl U
59 options.
60 The
61 .Ar path
62 argument must be a full ACPI namespace path such as
63 .Pa \e_SB.PCI0.PEGR.GFX0._DSM .
64 .Pp
65 Note that in order to be able to use the
66 .Nm
67 utility, the
68 .Va debug.acpi.allow_method_calls
69 loader tunable must be specified in
70 .Pa /boot/loader.conf .
71 .Pp
72 The following options are supported:
73 .Bl -tag -width indent
74 .It Fl b Ar hexstring
75 Pass
76 .Ar hexstring
77 as a buffer argument.
78 .It Fl d Ar file
79 Specify the path of the ACPI control device.
80 The default is
81 .Pa /dev/acpi .
82 .It Fl i Ar number
83 Pass
84 .Ar number
85 as an integer argument.
86 .It Fl o Ar i | s | b | o
87 Choose the format to print the result in:
88 .Ar ( i ) Ns nteger ,
89 .Ar ( s ) Ns tring ,
90 .Ar ( b ) Ns uffer ,
92 .Ar ( o ) Ns bject .
93 .It Fl s Ar string
94 Pass
95 .Ar string
96 as a string argument.
97 .It Fl U Ar uuid
98 Pass
99 .Ar uuid
100 as a buffer argument.
101 .It Fl v
102 Increase verbosity.
104 .Sh EXAMPLES
105 Note that many ACPI methods are specific to the BIOS and machine in
106 question, so it is impossible to present any generic examples that will
107 work everywhere.
108 Some familiarity with ASL and the DSDT code of the specific machine to
109 be tweaked is highly recommended.
111 The following calls were successfully used to turn off the discrete
112 .Tn NVIDIA
113 GPU on the
114 .Tn Optimus
115 based
116 .Tn Asus K53SV
117 laptop:
118 .Bd -literal
119 acpicall -U a486d8f8-0bda-471b-a72b-6042a6b5bee0 \e
120          -i 256 -i 26 -b 01000003 "\e_SB.PCI0.PEGR.GFX0._DSM"
122 acpicall "\e_SB.PCI0.PEGR.GFX0._PS3"
124 .Sh SEE ALSO
125 .Xr acpi 4 ,
126 .Xr acpibin 8 ,
127 .Xr acpiconf 8 ,
128 .Xr acpidump 8 ,
129 .Xr acpiexec 8 ,
130 .Xr acpihelp 8 ,
131 .Xr acpinames 8 ,
132 .Xr acpixtract 8 ,
133 .Xr iasl 8
134 .Sh AUTHORS
136 is based on the
137 .Nm acpi_call
138 utility by
139 .An Maxim Ignatenko Aq Mt gelraen.ua@gmail.com .
140 This manual page was written by
141 .An Sascha Wildner .