1 .\" LP (Laptop Package)
3 .\" Copyright (c) 1994 by HOSOKAWA, Tatsumi <hosokawa@mt.cs.keio.ac.jp>
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
19 .Nd APM BIOS interface
22 .Sh DEPRECATION NOTICE
23 This driver is scheduled for removal prior to the release of
27 is an interface to the Intel / Microsoft APM (Advanced Power Management) BIOS
31 provides the following power management functions.
32 .Bl -enum -offset indent
34 When the system wakes up from suspended mode,
36 adjusts the system clock to RTC.
38 When the system wakes up from suspended mode,
42 comprising of system wakeup time and elapsed time during suspended mode.
45 slows CPU clock when there are no system activities (runnable processes,
47 This function is available only on systems whose APM
51 exports an application interface as a character device.
53 can control APM, or retrieve APM status information via this interface.
55 exports the following interfaces.
56 These symbols are defined in
57 .In machine/apm_bios.h .
58 .Bl -tag -width 4n -offset indent
62 Get power management information.
65 Enable / Disable power management.
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.
72 Some APM implementations execute the HLT
73 (Halt CPU until an interrupt occurs)
76 call, while others do not.
77 Thus enabling this may result in
78 redundant HLT executions because
80 is called from the kernel context switch routine that inherently executes
82 This may reduce peak system performance.
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
88 On some implementations that do not support CPU clock slowdown, APM
89 might not execute HLT.
93 operation on such machines.
95 The current version of
99 from the kernel context switch routine if clock slowdown is not supported,
100 and it executes HLT instruction by default.
102 no need to use these two operations in most cases.
105 These interfaces are used by
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"
127 .An Tatsumi Hosokawa Aq Mt hosokawa@jp.FreeBSD.org
130 Many, if not most, of the implementations of APM-bios in laptops
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.)
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.
140 We are very interested in getting this code working, so please send your
141 observations of any anomalous behavior to us.
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.
149 Some APM implementations cannot handle events such as pushing the
150 power button or closing the cover.
151 On such implementations, the system
160 Disk spin-down, LCD backlight control, and power on demand have not
161 been supported on the current version.