2005-01-06 22:18:23 +00:00
|
|
|
/*-
|
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
|
|
|
|
1999-12-29 04:46:21 +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;
|
2003-11-12 18:13:57 +00:00
|
|
|
extern int clkintr_pending;
|
1994-11-05 22:51:17 +00:00
|
|
|
extern int disable_rtc_set;
|
2003-02-03 17:53:15 +00:00
|
|
|
extern int pscnt;
|
|
|
|
extern int psdiv;
|
1997-12-28 13:36:09 +00:00
|
|
|
extern int statclock_disable;
|
|
|
|
extern u_int timer_freq;
|
|
|
|
extern int timer0_max_count;
|
2003-01-29 11:36:39 +00:00
|
|
|
extern uint64_t 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;
|
2006-05-19 18:53:50 +00:00
|
|
|
extern struct mtx clock_lock;
|
1994-11-05 22:51:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Driver to clock driver interface.
|
|
|
|
*/
|
1996-10-25 13:01:56 +00:00
|
|
|
|
2002-03-20 05:48:58 +00:00
|
|
|
int acquire_timer2(int mode);
|
|
|
|
int release_timer2(void);
|
|
|
|
int rtcin(int val);
|
|
|
|
int sysbeep(int pitch, int period);
|
|
|
|
void timer_restore(void);
|
2003-02-05 09:20:40 +00:00
|
|
|
void init_TSC(void);
|
2003-08-06 15:05:27 +00:00
|
|
|
void init_TSC_tc(void);
|
1994-11-05 22:51:17 +00:00
|
|
|
|
1999-12-29 04:46:21 +00:00
|
|
|
#endif /* _KERNEL */
|
1994-11-05 22:51:17 +00:00
|
|
|
|
|
|
|
#endif /* !_MACHINE_CLOCK_H_ */
|