2005-01-05 15:17:21 -05:00
|
|
|
/*-
|
1994-09-18 16:40:01 -04:00
|
|
|
* Kernel interface to machine-dependent clock driver.
|
|
|
|
|
* Garrett Wollman, September 1994.
|
|
|
|
|
* This file is in the public domain.
|
1995-11-29 14:57:22 -05:00
|
|
|
*
|
1999-08-27 21:08:13 -04:00
|
|
|
* $FreeBSD$
|
1994-09-18 16:40:01 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef _MACHINE_CLOCK_H_
|
1994-11-05 17:51:17 -05:00
|
|
|
#define _MACHINE_CLOCK_H_
|
1994-09-18 16:40:01 -04:00
|
|
|
|
1999-12-28 23:46:21 -05:00
|
|
|
#ifdef _KERNEL
|
1994-11-05 17:51:17 -05:00
|
|
|
/*
|
|
|
|
|
* i386 to clock driver interface.
|
1998-02-24 21:20:30 -05:00
|
|
|
* XXX large parts of the driver and its interface are misplaced.
|
1994-11-05 17:51:17 -05:00
|
|
|
*/
|
2003-11-17 03:58:16 -05:00
|
|
|
extern int clkintr_pending;
|
2003-02-03 12:53:15 -05:00
|
|
|
extern int pscnt;
|
|
|
|
|
extern int psdiv;
|
1997-12-28 08:36:09 -05:00
|
|
|
extern int statclock_disable;
|
|
|
|
|
extern u_int timer_freq;
|
|
|
|
|
extern int timer0_max_count;
|
2003-01-29 06:36:39 -05:00
|
|
|
extern uint64_t tsc_freq;
|
1999-05-29 02:57:55 -04:00
|
|
|
extern int tsc_is_broken;
|
2007-01-23 03:01:20 -05:00
|
|
|
|
|
|
|
|
void i8254_init(void);
|
1994-11-05 17:51:17 -05:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Driver to clock driver interface.
|
|
|
|
|
*/
|
1996-10-25 09:01:56 -04:00
|
|
|
|
2003-09-30 02:38:11 -04:00
|
|
|
int acquire_timer2(int mode);
|
2002-03-20 00:48:58 -05:00
|
|
|
int release_timer2(void);
|
|
|
|
|
int rtcin(int val);
|
|
|
|
|
int sysbeep(int pitch, int period);
|
2003-02-05 04:20:40 -05:00
|
|
|
void init_TSC(void);
|
2003-09-22 19:02:24 -04:00
|
|
|
void init_TSC_tc(void);
|
1994-11-05 17:51:17 -05:00
|
|
|
|
1999-12-28 23:46:21 -05:00
|
|
|
#endif /* _KERNEL */
|
1994-11-05 17:51:17 -05:00
|
|
|
|
|
|
|
|
#endif /* !_MACHINE_CLOCK_H_ */
|