1139790Simp/*- 251850Snsayer * APM (Advanced Power Management) BIOS Device Driver 351850Snsayer * 451850Snsayer * Copyright (c) 1994 UKAI, Fumitoshi. 551850Snsayer * Copyright (c) 1994-1995 by HOSOKAWA, Tatsumi <hosokawa@jp.FreeBSD.org> 651850Snsayer * Copyright (c) 1996 Nate Williams <nate@FreeBSD.org> 751850Snsayer * Copyright (c) 1997 Poul-Henning Kamp <phk@FreeBSD.org> 851850Snsayer * 951850Snsayer * This software may be used, modified, copied, and distributed, in 1051850Snsayer * both source and binary form provided that the above copyright and 1151850Snsayer * these terms are retained. Under no circumstances is the author 1251850Snsayer * responsible for the proper functioning of this software, nor does 1351850Snsayer * the author assume any responsibility for damages incurred with its 1451850Snsayer * use. 1551850Snsayer * 1651850Snsayer * Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) 1751850Snsayer * 1851850Snsayer * $FreeBSD$ 1951850Snsayer */ 2051850Snsayer 21183328Sjhb#ifndef __APM_H__ 22183328Sjhb#define __APM_H__ 23183328Sjhb 2451850Snsayer#define APM_NEVENTS 16 2551850Snsayer#define APM_NPMEV 13 26130605Simp#define APM_UNKNOWN 0xff 2751850Snsayer 2851850Snsayer/* static data */ 2951850Snsayerstruct apm_softc { 30112590Smdodd#ifdef PC98 31112590Smdodd bus_space_tag_t sc_iot; 32112590Smdodd bus_space_handle_t sc_ioh; 33112590Smdodd struct resource *sc_res; 34112590Smdodd#endif 35158922Simp struct mtx mtx; 36158922Simp struct cv cv; 37158922Simp struct proc *event_thread; 38158922Simp int initialized, active, running, bios_busy; 3951850Snsayer int always_halt_cpu, slow_idle_cpu; 4051850Snsayer int disabled, disengaged; 4165865Siwasaki int suspending; 4251850Snsayer int standby_countdown, suspend_countdown; 4351850Snsayer u_int minorversion, majorversion; 4451850Snsayer u_int intversion, connectmode; 4551850Snsayer u_int standbys, suspends; 4651850Snsayer struct bios_args bios; 4751850Snsayer struct apmhook sc_suspend; 4851850Snsayer struct apmhook sc_resume; 4951850Snsayer struct selinfo sc_rsel; 5051850Snsayer int sc_flags; 5151850Snsayer int event_count; 5251850Snsayer int event_ptr; 5351850Snsayer struct apm_event_info event_list[APM_NEVENTS]; 5451850Snsayer u_char event_filter[APM_NPMEV]; 5551850Snsayer}; 5651850Snsayer 57183328Sjhb#endif /* !__APM_H__ */ 58