• Home
  • Raw
  • Download

Lines Matching full:apm

3  * APM BIOS driver for Linux
13 * Make /proc/apm easy to format (bump driver version)
15 * Prohibit APM BIOS calls unless apm_enabled.
38 * 0.7: changed /proc/apm format, Linux 1.3.58
41 * 1.0: use fixed device number, consolidate /proc/apm into this file,
50 * levels to the printk calls. APM is not defined for SMP machines.
54 * 1.4: Upgraded to support APM 1.2. Integrated ThinkPad suspend patch by
62 * Fix OOPS at power off with no APM BIOS by Jan Echternach
66 * to reflect current state of APM BIOS.
72 * Allow boot time disabling of APM
94 * Remove APM dependencies in arch/i386/kernel/process.c
95 * Remove APM dependencies in drivers/char/sysrq.c
102 * 1.11: Remove APM dependencies in drivers/char/console.c
121 * "apm=power-off" on the kernel command line. Suggested
124 * Register the /proc/apm entry even on SMP so that
154 * broken APM (Alan Cox <alan@lxorguk.ukuu.org.uk>).
157 * If an APM idle fails log it and idle sensibly
171 * Change name of kernel apm daemon (as it no longer idles) (sfr).
173 * make _all_ APM calls on the CPU#0. Fix unsafe sign bug.
176 * APM 1.1 Reference:
179 * (APM) BIOS Interface Specification, Revision 1.1, September 1993.
187 * APM 1.2 Reference:
189 * (APM) BIOS Interface Specification, Revision 1.2, February 1996.
195 #define pr_fmt(fmt) "apm: " fmt
243 * apm=on/off enable/disable APM
250 * [no-]smp Use apm even on an SMP box
254 * make APM BIOS idle calls. Set it to
263 * U: TI 4000M TravelMate: BIOS is *NOT* APM compliant
265 * ?: ACER 486DX4/75: uses dseg 0040, in violation of APM specification
271 * ?: AcerNote-950: oops on reading /proc/apm - workaround is a WIP
274 * Legend: U = unusable with APM patches
275 * P = partially usable with APM patches
279 * Define as 1 to make the driver always call the APM BIOS busy
286 * Define to make the APM BIOS calls zero all data segment registers (so
292 #include <asm/apm.h>
308 * Need to poll the APM BIOS every second
323 * The per-file APM data
365 { /* entry 1 is for APM idle */
366 .name = "APM",
367 .desc = "APM idle",
430 * APM event names taken from the APM 1.2 specification. These are
476 { APM_NOT_PRESENT, "No APM present" }
481 * apm_error - display an APM error
483 * @err: APM BIOS return code
486 * an APM error. Note that this also handles (negative) kernel errors.
574 * __apm_bios_call - Make an APM BIOS 32bit call
577 * Make an APM call using the 32bit protected mode interface. The
578 * caller is responsible for knowing if APM BIOS is configured and
642 * apm_bios_call - Make an APM BIOS 32bit call (on CPU 0)
653 * __apm_bios_call_simple - Make an APM BIOS 32bit call (on CPU 0)
694 * apm_bios_call_simple - make a simple APM BIOS 32bit call
695 * @func: APM function to invoke
724 * apm_driver_version - APM driver version
725 * @val: loaded with the APM version on return
727 * Retrieve the APM version supported by the BIOS. This is only
728 * supported for APM 1.1 or higher. An error indicates APM 1.0 is
731 * On entry val should point to a value indicating the APM driver
751 * apm_get_event - get an APM event from the BIOS
755 * The APM BIOS provides a polled information for event
763 * that APM 1.2 is in use. If no messges are pending the value 0x80
789 * Request an APM change of state for one or more system devices. The
812 * Transition the entire system into a new APM power state.
887 * apm_cpu_idle - cpu idling for APM capable Linux
889 * This is the idling function the kernel executes when APM is available. It
969 * bugs we support real mode APM BIOS power off calls. We also make
988 * apm_enable_power_management - enable BIOS APM power management
991 * Enable or disable the APM BIOS power services.
1018 * Obtain the current power status from the APM BIOS. We return a
1323 printk(KERN_DEBUG "apm: received %s notify\n", in check_events()
1326 printk(KERN_DEBUG "apm: received unknown " in check_events()
1413 printk(KERN_DEBUG "apm: setting state busy\n"); in apm_event_handler()
1424 * This is the APM thread main loop.
1661 1) APM BIOS Version. Usually 1.0, 1.1 or 1.2. in proc_apm_show()
1662 2) APM flags from APM Installation Check (0x00): in proc_apm_show()
1710 static int apm(void *unused) in apm() function
1721 * on SMP systems in case of "apm=power-off" mode. Seen on ASUS A7M266D. in apm()
1739 /* Fall back to an APM 1.0 connection. */ in apm()
1746 printk(KERN_INFO "apm: Connection version %d.%d\n", in apm()
1777 printk(KERN_INFO "apm: power status not available\n"); in apm()
1811 "apm: AC %s, battery status %s, battery life ", in apm()
1819 "apm: battery flag 0x%02x, battery life ", in apm()
1896 __setup("apm=", apm_setup);
1945 /* Some laptops require interrupts to be enabled during APM calls */
1951 "Enabling interrupts during APM calls.\n", d->ident); in set_apm_ints()
1956 /* Some APM bioses corrupt memory or just plain do not work */
1962 "Disabling APM.\n", d->ident); in apm_is_horked()
1972 "Disabling APM.\n", d->ident); in apm_is_horked_d850md()
1979 /* Some APM bioses hang on APM idle calls */
1985 "Disabling APM idle calls.\n", d->ident); in apm_likes_to_melt()
2008 printk(KERN_WARNING "BIOS strings suggest APM bugs, " in broken_apm_power()
2014 * This bios swaps the APM minute reporting bytes over (Many sony laptops
2020 printk(KERN_WARNING "BIOS strings suggest APM reports battery life " in swab_apm_power_in_minutes()
2028 KERN_WARNING "IBM T23 - BIOS 1.03b+ and controller firmware 1.02+ may be needed for Linux APM.",
2032 { /* Handle problems with APM on the C600 */
2042 { /* APM crashes */
2054 { /* Handle problems with APM on Inspiron 5000e */
2060 { /* Handle problems with APM on Inspiron 2500 */
2066 { /* APM crashes */
2080 { /* Allow interrupts during APM or the clock goes slow */
2085 { /* APM blows on shutdown */
2090 { /* APM crashes */
2095 { /* APM crashes */
2100 { /* APM crashes */
2105 { /* APM crashes */
2110 { /* APM crashes */
2116 { /* APM crashes */
2123 { /* APM crashes */
2130 { /* APM idle hangs */
2135 { /* APM idle hangs */
2140 { /* Handle problems with APM on Sony Vaio PCG-N505X(DE) */
2146 { /* Handle problems with APM on Sony Vaio PCG-N505VX */
2152 { /* Handle problems with APM on Sony Vaio PCG-XG29 */
2158 { /* Handle problems with APM on Sony Vaio PCG-Z600NE */
2164 { /* Handle problems with APM on Sony Vaio PCG-Z600NE */
2170 { /* Handle problems with APM on Sony Vaio PCG-Z600LEK(DE) */
2176 { /* Handle problems with APM on Sony Vaio PCG-Z505LS */
2182 { /* Handle problems with APM on Sony Vaio PCG-Z505LS */
2188 { /* Handle problems with APM on Sony Vaio PCG-Z505LS (with updated BIOS) */
2194 { /* Handle problems with APM on Sony Vaio PCG-F104K */
2201 { /* Handle problems with APM on Sony Vaio PCG-C1VN/C1VE */
2207 { /* Handle problems with APM on Sony Vaio PCG-C1VE */
2213 { /* Handle problems with APM on Sony Vaio PCG-C1VE */
2226 /* Generic per vendor APM settings */
2237 * Just start the APM thread. We do NOT want to do APM BIOS
2238 * calls from anything but the APM thread, if for no other reason
2239 * than the fact that we don't trust the APM BIOS. This way,
2240 * most common APM BIOS problems that lead to protection errors
2244 * of just killing the apm thread..
2254 printk(KERN_INFO "apm: BIOS not found.\n"); in apm_init()
2258 "apm: BIOS version %d.%d Flags 0x%02x (Driver version %s)\n", in apm_init()
2264 printk(KERN_INFO "apm: no 32 bit BIOS support\n"); in apm_init()
2290 printk(KERN_INFO "apm: entry %x:%x cseg16 %x dseg %x", in apm_init()
2307 pr_notice("disabled - APM is not SMP safe.\n"); in apm_init()
2318 * Set up the long jump entry point to the APM BIOS, which is called in apm_init()
2325 * The APM 1.1 BIOS is supposed to provide limit information that it in apm_init()
2331 * Note we only set APM segments on CPU zero, since we pin the APM in apm_init()
2342 proc_create_single("apm", 0, NULL, proc_apm_show); in apm_init()
2344 kapmd_task = kthread_create(apm, NULL, "kapmd"); in apm_init()
2349 remove_proc_entry("apm", NULL); in apm_init()
2356 "apm: disabled - APM is not SMP safe (power off active).\n"); in apm_init()
2366 printk(KERN_WARNING "apm: Could not register misc device.\n"); in apm_init()
2394 remove_proc_entry("apm", NULL); in apm_exit()
2425 "System idle percentage above which to make APM BIOS idle calls");
2431 "Set this to enable APM use on an SMP platform. Use with caution on older systems");