apm_bios.h (64251) | apm_bios.h (64615) |
---|---|
1/* 2 * APM (Advanced Power Management) BIOS Device Driver 3 * 4 * Copyright (c) 1994-1995 by HOSOKAWA, Tatsumi <hosokawa@mt.cs.keio.ac.jp> 5 * 6 * This software may be used, modified, copied, and distributed, in 7 * both source and binary form provided that the above copyright and 8 * these terms are retained. Under no circumstances is the author 9 * responsible for the proper functioning of this software, nor does 10 * the author assume any responsibility for damages incurred with its 11 * use. 12 * 13 * Aug, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) 14 * | 1/* 2 * APM (Advanced Power Management) BIOS Device Driver 3 * 4 * Copyright (c) 1994-1995 by HOSOKAWA, Tatsumi <hosokawa@mt.cs.keio.ac.jp> 5 * 6 * This software may be used, modified, copied, and distributed, in 7 * both source and binary form provided that the above copyright and 8 * these terms are retained. Under no circumstances is the author 9 * responsible for the proper functioning of this software, nor does 10 * the author assume any responsibility for damages incurred with its 11 * use. 12 * 13 * Aug, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) 14 * |
15 * $FreeBSD: head/sys/i386/include/apm_bios.h 64251 2000-08-04 20:28:53Z iwasaki $ | 15 * $FreeBSD: head/sys/i386/include/apm_bios.h 64615 2000-08-13 17:05:27Z ume $ |
16 */ 17 18#ifndef _MACHINE_APM_BIOS_H_ 19#define _MACHINE_APM_BIOS_H_ 20 21#ifndef _KERNEL 22#include <sys/types.h> 23#endif --- 89 unchanged lines hidden (view full) --- 113#define PMDV_NET0 0x0500 114#define PMDV_NET1 0x0501 115#define PMDV_NET2 0x0502 116#define PMDV_NET3 0x0503 117#define PMDV_PCMCIA0 0x0600 118#define PMDV_PCMCIA1 0x0601 119#define PMDV_PCMCIA2 0x0602 120#define PMDV_PCMCIA3 0x0603 | 16 */ 17 18#ifndef _MACHINE_APM_BIOS_H_ 19#define _MACHINE_APM_BIOS_H_ 20 21#ifndef _KERNEL 22#include <sys/types.h> 23#endif --- 89 unchanged lines hidden (view full) --- 113#define PMDV_NET0 0x0500 114#define PMDV_NET1 0x0501 115#define PMDV_NET2 0x0502 116#define PMDV_NET3 0x0503 117#define PMDV_PCMCIA0 0x0600 118#define PMDV_PCMCIA1 0x0601 119#define PMDV_PCMCIA2 0x0602 120#define PMDV_PCMCIA3 0x0603 |
121/* 0x0700 - 0xdfff Reserved */ | 121/* 0x0700 - 0x7fff Reserved */ 122#define PMDV_BATT_BASE 0x8000 123#define PMDV_BATT0 0x8001 124#define PMDV_BATT1 0x8002 125#define PMDV_BATT_ALL 0x80ff 126/* 0x8100 - 0xdfff Reserved */ |
122/* 0xe000 - 0xefff OEM-defined power device IDs */ 123/* 0xf000 - 0xffff Reserved */ 124 125/* Power state */ 126#define PMST_APMENABLED 0x0000 127#define PMST_STANDBY 0x0001 128#define PMST_SUSPEND 0x0002 129#define PMST_OFF 0x0003 --- 85 unchanged lines hidden (view full) --- 215 u_int ai_batt_life; /* Remaining battery life in percent (0) */ 216 int ai_batt_time; /* Remaining battery time in seconds (0) */ 217 u_int ai_status; /* True if enabled (0) */ 218 u_int ai_batteries; /* Number of batteries (1) */ 219 u_int ai_capabilities;/* APM Capabilities (1) */ 220 u_int ai_spare[6]; /* For future expansion */ 221} *apm_info_t; 222 | 127/* 0xe000 - 0xefff OEM-defined power device IDs */ 128/* 0xf000 - 0xffff Reserved */ 129 130/* Power state */ 131#define PMST_APMENABLED 0x0000 132#define PMST_STANDBY 0x0001 133#define PMST_SUSPEND 0x0002 134#define PMST_OFF 0x0003 --- 85 unchanged lines hidden (view full) --- 220 u_int ai_batt_life; /* Remaining battery life in percent (0) */ 221 int ai_batt_time; /* Remaining battery time in seconds (0) */ 222 u_int ai_status; /* True if enabled (0) */ 223 u_int ai_batteries; /* Number of batteries (1) */ 224 u_int ai_capabilities;/* APM Capabilities (1) */ 225 u_int ai_spare[6]; /* For future expansion */ 226} *apm_info_t; 227 |
228/* Battery flag */ 229#define APM_BATT_HIGH 0x01 230#define APM_BATT_LOW 0x02 231#define APM_BATT_CRITICAL 0x04 232#define APM_BATT_CHARGING 0x08 233#define APM_BATT_NOT_PRESENT 0x10 234#define APM_BATT_NO_SYSTEM 0x80 235 236typedef struct apm_pwstatus { 237 u_int ap_device; /* Device code of battery */ 238 u_int ap_acline; /* AC line status (0) */ 239 u_int ap_batt_stat; /* Battery status (0) */ 240 u_int ap_batt_flag; /* Battery flag (0) */ 241 u_int ap_batt_life; /* Remaining battery life in percent (0) */ 242 int ap_batt_time; /* Remaining battery time in seconds (0) */ 243} *apm_pwstatus_t; 244 |
|
223struct apm_bios_arg { 224 u_long eax; 225 u_long ebx; 226 u_long ecx; 227 u_long edx; 228 u_long esi; 229 u_long edi; 230}; --- 9 unchanged lines hidden (view full) --- 240#define APMIO_ENABLE _IO('P', 5) 241#define APMIO_DISABLE _IO('P', 6) 242#define APMIO_HALTCPU _IO('P', 7) 243#define APMIO_NOTHALTCPU _IO('P', 8) 244#define APMIO_DISPLAY _IOW('P', 9, int) 245#define APMIO_BIOS _IOWR('P', 10, struct apm_bios_arg) 246#define APMIO_GETINFO _IOR('P', 11, struct apm_info) 247#define APMIO_STANDBY _IO('P', 12) | 245struct apm_bios_arg { 246 u_long eax; 247 u_long ebx; 248 u_long ecx; 249 u_long edx; 250 u_long esi; 251 u_long edi; 252}; --- 9 unchanged lines hidden (view full) --- 262#define APMIO_ENABLE _IO('P', 5) 263#define APMIO_DISABLE _IO('P', 6) 264#define APMIO_HALTCPU _IO('P', 7) 265#define APMIO_NOTHALTCPU _IO('P', 8) 266#define APMIO_DISPLAY _IOW('P', 9, int) 267#define APMIO_BIOS _IOWR('P', 10, struct apm_bios_arg) 268#define APMIO_GETINFO _IOR('P', 11, struct apm_info) 269#define APMIO_STANDBY _IO('P', 12) |
270#define APMIO_GETPWSTATUS _IOWR('P', 13, struct apm_pwstatus) |
|
248/* for /dev/apmctl */ 249#define APMIO_NEXTEVENT _IOR('A', 100, struct apm_event_info) 250#define APMIO_REJECTLASTREQ _IO('P', 101) 251 252#endif /* !ASSEMBLER && !INITIALIZER */ 253 254#endif /* !_MACHINE_APM_BIOS_H_ */ | 271/* for /dev/apmctl */ 272#define APMIO_NEXTEVENT _IOR('A', 100, struct apm_event_info) 273#define APMIO_REJECTLASTREQ _IO('P', 101) 274 275#endif /* !ASSEMBLER && !INITIALIZER */ 276 277#endif /* !_MACHINE_APM_BIOS_H_ */ |