clock.h revision 50477
12858Swollman/*
22858Swollman * Kernel interface to machine-dependent clock driver.
32858Swollman * Garrett Wollman, September 1994.
42858Swollman * This file is in the public domain.
512533Swollman *
612533Swollman * $FreeBSD: head/sys/amd64/include/clock.h 50477 1999-08-28 01:08:13Z peter $
72858Swollman */
82858Swollman
92858Swollman#ifndef _MACHINE_CLOCK_H_
104174Sbde#define	_MACHINE_CLOCK_H_
112858Swollman
122858Swollman#ifdef KERNEL
1311452Swollman/*
1411452Swollman * i386 to clock driver interface.
1511452Swollman * XXX large parts of the driver and its interface are misplaced.
1611452Swollman */
1711452Swollmanextern int	adjkerntz;
1811452Swollmanextern int	disable_rtc_set;
1911452Swollmanextern int	statclock_disable;
2011452Swollmanextern u_int	timer_freq;
2111452Swollmanextern int	timer0_max_count;
2211452Swollmanextern u_int	tsc_freq;
2311452Swollmanextern int	tsc_is_broken;
2411452Swollmanextern int	wall_cmos_clock;
252858Swollman#ifdef APIC_IO
262858Swollmanextern int	apic_8254_intr;
2712533Swollman#endif
2811452Swollman
2911452Swollman/*
3011452Swollman * Driver to clock driver interface.
3111452Swollman */
322858Swollmanstruct clockframe;
332858Swollman
342858Swollmanvoid	DELAY __P((int usec));
352858Swollmanint	acquire_timer0 __P((int rate,
362858Swollman			    void (*function)(struct clockframe *frame)));
3711452Swollmanint	acquire_timer2 __P((int mode));
382858Swollmanint	release_timer0 __P((void));
392858Swollmanint	release_timer2 __P((void));
402858Swollman#ifndef PC98
4111452Swollmanint	rtcin __P((int val));
422858Swollman#else
432858Swollmanint	acquire_timer1 __P((int mode));
4412533Swollmanint	release_timer1 __P((void));
4512533Swollman#endif
464174Sbdeint	sysbeep __P((int pitch, int period));
474174Sbde
484174Sbde#endif /* KERNEL */
494174Sbde
504174Sbde#endif /* !_MACHINE_CLOCK_H_ */
514174Sbde