1994-09-18 20:40:01 +00:00
|
|
|
/*
|
|
|
|
* Kernel interface to machine-dependent clock driver.
|
|
|
|
* Garrett Wollman, September 1994.
|
|
|
|
* This file is in the public domain.
|
1995-11-29 19:57:22 +00:00
|
|
|
*
|
1999-08-28 01:08:13 +00:00
|
|
|
* $FreeBSD$
|
1994-09-18 20:40:01 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _MACHINE_CLOCK_H_
|
1994-11-05 22:51:17 +00:00
|
|
|
#define _MACHINE_CLOCK_H_
|
1994-09-18 20:40:01 +00:00
|
|
|
|
1996-10-25 13:01:56 +00:00
|
|
|
#ifdef KERNEL
|
1994-11-05 22:51:17 +00:00
|
|
|
/*
|
|
|
|
* i386 to clock driver interface.
|
1998-02-25 02:20:30 +00:00
|
|
|
* XXX large parts of the driver and its interface are misplaced.
|
1994-11-05 22:51:17 +00:00
|
|
|
*/
|
|
|
|
extern int adjkerntz;
|
|
|
|
extern int disable_rtc_set;
|
1997-12-28 13:36:09 +00:00
|
|
|
extern int statclock_disable;
|
|
|
|
extern u_int timer_freq;
|
|
|
|
extern int timer0_max_count;
|
1997-12-26 20:42:37 +00:00
|
|
|
extern u_int tsc_freq;
|
1999-05-29 06:57:55 +00:00
|
|
|
extern int tsc_is_broken;
|
1996-10-17 17:31:25 +00:00
|
|
|
extern int wall_cmos_clock;
|
1998-03-05 21:45:53 +00:00
|
|
|
#ifdef APIC_IO
|
|
|
|
extern int apic_8254_intr;
|
|
|
|
#endif
|
1994-11-05 22:51:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Driver to clock driver interface.
|
|
|
|
*/
|
1996-10-25 13:01:56 +00:00
|
|
|
struct clockframe;
|
|
|
|
|
1994-11-05 22:51:17 +00:00
|
|
|
void DELAY __P((int usec));
|
|
|
|
int acquire_timer0 __P((int rate,
|
|
|
|
void (*function)(struct clockframe *frame)));
|
|
|
|
int acquire_timer2 __P((int mode));
|
|
|
|
int release_timer0 __P((void));
|
|
|
|
int release_timer2 __P((void));
|
1996-06-14 11:02:28 +00:00
|
|
|
#ifndef PC98
|
1996-03-31 04:05:36 +00:00
|
|
|
int rtcin __P((int val));
|
1996-06-14 11:02:28 +00:00
|
|
|
#else
|
|
|
|
int acquire_timer1 __P((int mode));
|
|
|
|
int release_timer1 __P((void));
|
|
|
|
#endif
|
1994-11-05 22:51:17 +00:00
|
|
|
int sysbeep __P((int pitch, int period));
|
|
|
|
|
1996-10-25 13:01:56 +00:00
|
|
|
#endif /* KERNEL */
|
1994-11-05 22:51:17 +00:00
|
|
|
|
|
|
|
#endif /* !_MACHINE_CLOCK_H_ */
|