1139731Simp/*- 22858Swollman * Kernel interface to machine-dependent clock driver. 32858Swollman * Garrett Wollman, September 1994. 42858Swollman * This file is in the public domain. 512533Swollman * 650477Speter * $FreeBSD: releng/10.3/sys/amd64/include/clock.h 249324 2013-04-10 05:59:07Z neel $ 72858Swollman */ 82858Swollman 92858Swollman#ifndef _MACHINE_CLOCK_H_ 104174Sbde#define _MACHINE_CLOCK_H_ 112858Swollman 1255205Speter#ifdef _KERNEL 134174Sbde/* 144174Sbde * i386 to clock driver interface. 1533809Sbde * XXX large parts of the driver and its interface are misplaced. 164174Sbde */ 17122849Speterextern int clkintr_pending; 18177631Sphkextern u_int i8254_freq; 19177631Sphkextern int i8254_max_count; 20110039Sphkextern uint64_t tsc_freq; 21184102Sjkimextern int tsc_is_invariant; 22220580Sjkimextern int tsc_perf_stat; 23249324Sneel#ifdef SMP 24249324Sneelextern int smp_tsc; 25249324Sneel#endif 264174Sbde 27166186Sbdevoid i8254_init(void); 28166186Sbde 294174Sbde/* 304174Sbde * Driver to clock driver interface. 314174Sbde */ 3219172Sbde 33178429Sphkvoid startrtclock(void); 34110370Sphkvoid init_TSC(void); 354174Sbde 36177642Sphk#define HAS_TIMER_SPKR 1 37177642Sphkint timer_spkr_acquire(void); 38177642Sphkint timer_spkr_release(void); 39177642Sphkvoid timer_spkr_setfreq(int freq); 40177642Sphk 4155205Speter#endif /* _KERNEL */ 4219172Sbde 434174Sbde#endif /* !_MACHINE_CLOCK_H_ */ 44