]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/man4.i386/apm.4
MFV: xz 5.4.2.
[FreeBSD/FreeBSD.git] / share / man / man4 / man4.i386 / apm.4
1 .\" LP (Laptop Package)
2 .\"
3 .\" Copyright (c) 1994 by HOSOKAWA, Tatsumi <hosokawa@mt.cs.keio.ac.jp>
4 .\"
5 .\" This software may be used, modified, copied, and distributed, in
6 .\" both source and binary form provided that the above copyright and
7 .\" these terms are retained. Under no circumstances is the author
8 .\" responsible for the proper functioning of this software, nor does
9 .\" the author assume any responsibility for damages incurred with its
10 .\" use.
11 .\"
12 .\" $FreeBSD$
13 .\"
14 .Dd November 1, 1994
15 .Dt APM 4 i386
16 .Os
17 .Sh NAME
18 .Nm apm
19 .Nd APM BIOS interface
20 .Sh SYNOPSIS
21 .Cd device apm
22 .Sh DEPRECATION NOTICE
23 This driver is scheduled for removal prior to the release of
24 .Fx 13.0 .
25 .Sh DESCRIPTION
26 .Nm
27 is an interface to the Intel / Microsoft APM (Advanced Power Management) BIOS
28 on laptop PCs.
29 .Pp
30 .Nm
31 provides the following power management functions.
32 .Bl -enum -offset indent
33 .It
34 When the system wakes up from suspended mode,
35 .Nm
36 adjusts the system clock to RTC.
37 .It
38 When the system wakes up from suspended mode,
39 .Nm
40 passes a message to
41 .Xr syslogd 8
42 comprising of system wakeup time and elapsed time during suspended mode.
43 .It
44 .Nm
45 slows CPU clock when there are no system activities (runnable processes,
46 interrupts, etc.).
47 This function is available only on systems whose APM
48 supports CPU idling.
49 .It
50 .Nm
51 exports an application interface as a character device.
52 Applications
53 can control APM, or retrieve APM status information via this interface.
54 .Nm
55 exports the following interfaces.
56 These symbols are defined in
57 .In machine/apm_bios.h .
58 .Bl -tag -width 4n -offset indent
59 .It Sy APMIO_SUSPEND
60 Suspend system.
61 .It Sy APMIO_GET
62 Get power management information.
63 .It Sy APMIO_ENABLE
64 .It Sy APMIO_DISABLE
65 Enable / Disable power management.
66 .It Sy APMIO_HALTCPU
67 .It Sy APMIO_NOTHALTCPU
68 Control execution of HLT in the kernel context switch routine.
69 .It Sy APMIO_GETPWSTATUS
70 Get per battery information.
71 .Pp
72 Some APM implementations execute the HLT
73 (Halt CPU until an interrupt occurs)
74 instruction in the
75 .Dq Em Idle CPU
76 call, while others do not.
77 Thus enabling this may result in
78 redundant HLT executions because
79 .Dq Em Idle CPU
80 is called from the kernel context switch routine that inherently executes
81 HLT.
82 This may reduce peak system performance.
83 .Pp
84 Also the system hangs up if HLT instruction is disabled in the kernel
85 context switch routine, and if the APM implementation of the machine
86 does not execute HLT in
87 .Dq Em Idle CPU .
88 On some implementations that do not support CPU clock slowdown, APM
89 might not execute HLT.
90 .Nm
91 disables
92 .Sy APMIO_NOTHALTCPU
93 operation on such machines.
94 .Pp
95 The current version of
96 .Nm
97 does not call
98 .Dq Em Idle CPU
99 from the kernel context switch routine if clock slowdown is not supported,
100 and it executes HLT instruction by default.
101 Therefore, there is
102 no need to use these two operations in most cases.
103 .El
104 .Pp
105 These interfaces are used by
106 .Xr apm 8 .
107 .It
108 .Nm
109 polls APM events and handles the following events.
110 .Bl -column "xxxxxxxxxxxxxxxxx" "xxxxxxxxxxxxx" "xxxxxxxx"
111 .It Sy "Name" Ta Sy "Action" Ta Sy "Description"
112 .It Dv "PMEV_STANDBYREQ" Ta No "suspend system" Ta "standby request"
113 .It Dv "PMEV_SUSPENDREQ" Ta No "suspend system" Ta "suspend request"
114 .It Dv "PMEV_USERSUSPENDREQ" Ta No "suspend system" Ta "user suspend request"
115 .It Dv "PMEV_CRITSUSPEND" Ta No "suspend system" Ta "critical suspend request"
116 .It Dv "PMEV_NORMRESUME" Ta No "resume system" Ta "normal resume"
117 .It Dv "PMEV_CRITRESUME" Ta No "resume system" Ta "critical resume"
118 .It Dv "PMEV_STANDBYRESUME" Ta No "resume system" Ta "standby resume"
119 .It Dv "PMEV_BATTERYLOW" Ta No "notify message" Ta "battery low"
120 .It Dv "PMEV_UPDATETIME" Ta No "adjust clock" Ta "update time"
121 .El
122 .El
123 .Sh SEE ALSO
124 .Xr apm 8 ,
125 .Xr zzz 8
126 .Sh AUTHORS
127 .An Tatsumi Hosokawa Aq Mt hosokawa@jp.FreeBSD.org
128 .Sh BUGS
129 WARNING!
130 Many, if not most, of the implementations of APM-bios in laptops
131 today are buggy.
132 You may be putting your LCD-display and batteries at
133 a risk by using this interface.
134 (The reason this is not a problem for
135 MS-Windows is that they use the real-mode interface.)
136 If you see any
137 weird behavior from your system with this code in use, unplug the
138 power and batteries ASAP, if not immediately, and disable this code.
139 .Pp
140 We are very interested in getting this code working, so please send your
141 observations of any anomalous behavior to us.
142 .Pp
143 When
144 .Nm
145 is active, calling the BIOS setup routine by using hot-keys,
146 may cause serious trouble when resuming the system.
147 BIOS setup programs should be called during bootstrap, or from DOS.
148 .Pp
149 Some APM implementations cannot handle events such as pushing the
150 power button or closing the cover.
151 On such implementations, the system
152 .Ar must
153 be suspended
154 .Ar only
155 by using
156 .Xr apm 8
157 or
158 .Xr zzz 8 .
159 .Pp
160 Disk spin-down, LCD backlight control, and power on demand have not
161 been supported on the current version.