~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/apm_bios.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /*
  3  * Include file for the interface to an APM BIOS
  4  * Copyright 1994-2001 Stephen Rothwell (sfr@canb.auug.org.au)
  5  */
  6 #ifndef _LINUX_APM_H
  7 #define _LINUX_APM_H
  8 
  9 #include <uapi/linux/apm_bios.h>
 10 
 11 
 12 #define APM_CS          (GDT_ENTRY_APMBIOS_BASE * 8)
 13 #define APM_CS_16       (APM_CS + 8)
 14 #define APM_DS          (APM_CS_16 + 8)
 15 
 16 /* Results of APM Installation Check */
 17 #define APM_16_BIT_SUPPORT      0x0001
 18 #define APM_32_BIT_SUPPORT      0x0002
 19 #define APM_IDLE_SLOWS_CLOCK    0x0004
 20 #define APM_BIOS_DISABLED       0x0008
 21 #define APM_BIOS_DISENGAGED     0x0010
 22 
 23 /*
 24  * Data for APM that is persistent across module unload/load
 25  */
 26 struct apm_info {
 27         struct apm_bios_info    bios;
 28         unsigned short          connection_version;
 29         int                     get_power_status_broken;
 30         int                     get_power_status_swabinminutes;
 31         int                     allow_ints;
 32         int                     forbid_idle;
 33         int                     realmode_power_off;
 34         int                     disabled;
 35 };
 36 
 37 /*
 38  * The APM function codes
 39  */
 40 #define APM_FUNC_INST_CHECK     0x5300
 41 #define APM_FUNC_REAL_CONN      0x5301
 42 #define APM_FUNC_16BIT_CONN     0x5302
 43 #define APM_FUNC_32BIT_CONN     0x5303
 44 #define APM_FUNC_DISCONN        0x5304
 45 #define APM_FUNC_IDLE           0x5305
 46 #define APM_FUNC_BUSY           0x5306
 47 #define APM_FUNC_SET_STATE      0x5307
 48 #define APM_FUNC_ENABLE_PM      0x5308
 49 #define APM_FUNC_RESTORE_BIOS   0x5309
 50 #define APM_FUNC_GET_STATUS     0x530a
 51 #define APM_FUNC_GET_EVENT      0x530b
 52 #define APM_FUNC_GET_STATE      0x530c
 53 #define APM_FUNC_ENABLE_DEV_PM  0x530d
 54 #define APM_FUNC_VERSION        0x530e
 55 #define APM_FUNC_ENGAGE_PM      0x530f
 56 #define APM_FUNC_GET_CAP        0x5310
 57 #define APM_FUNC_RESUME_TIMER   0x5311
 58 #define APM_FUNC_RESUME_ON_RING 0x5312
 59 #define APM_FUNC_TIMER          0x5313
 60 
 61 /*
 62  * Function code for APM_FUNC_RESUME_TIMER
 63  */
 64 #define APM_FUNC_DISABLE_TIMER  0
 65 #define APM_FUNC_GET_TIMER      1
 66 #define APM_FUNC_SET_TIMER      2
 67 
 68 /*
 69  * Function code for APM_FUNC_RESUME_ON_RING
 70  */
 71 #define APM_FUNC_DISABLE_RING   0
 72 #define APM_FUNC_ENABLE_RING    1
 73 #define APM_FUNC_GET_RING       2
 74 
 75 /*
 76  * Function code for APM_FUNC_TIMER_STATUS
 77  */
 78 #define APM_FUNC_TIMER_DISABLE  0
 79 #define APM_FUNC_TIMER_ENABLE   1
 80 #define APM_FUNC_TIMER_GET      2
 81 
 82 /*
 83  * in arch/i386/kernel/setup.c
 84  */
 85 extern struct apm_info  apm_info;
 86 
 87 /*
 88  * This is the "All Devices" ID communicated to the BIOS
 89  */
 90 #define APM_DEVICE_BALL         ((apm_info.connection_version > 0x0100) ? \
 91                                  APM_DEVICE_ALL : APM_DEVICE_OLD_ALL)
 92 #endif  /* LINUX_APM_H */
 93 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php