PERFORCE change 101570 for review
Bruce M Simpson
bms at FreeBSD.org
Fri Jul 14 16:17:54 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=101570
Change 101570 by bms at bms_montagne on 2006/07/14 16:17:47
Add a basic timecounter wrapper for the MIPS32
Count register so we can tell the time.
Depends on a deterministic DELAY()
for calibration, which I haven't done yet.
While we're here update clock.h to what is needed for mips.
Affected files ...
.. //depot/projects/mips2/src/sys/mips/include/clock.h#2 edit
.. //depot/projects/mips2/src/sys/mips/mips/tick.c#1 add
Differences ...
==== //depot/projects/mips2/src/sys/mips/include/clock.h#2 (text+ko) ====
@@ -1,42 +1,38 @@
/*-
- * Kernel interface to machine-dependent clock driver.
- * Garrett Wollman, September 1994.
- * This file is in the public domain.
+ * Copyright (c) 2006 Bruce M. Simpson
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/include/clock.h,v 1.51 2005/12/22 22:16:05 jhb Exp $
+ * $FreeBSD$
*/
#ifndef _MACHINE_CLOCK_H_
#define _MACHINE_CLOCK_H_
-#ifdef _KERNEL
-/*
- * i386 to clock driver interface.
- * XXX large parts of the driver and its interface are misplaced.
- */
-extern int adjkerntz;
-extern int clkintr_pending;
-extern int disable_rtc_set;
-extern int pscnt;
-extern int psdiv;
-extern int statclock_disable;
-extern u_int timer_freq;
-extern int timer0_max_count;
-extern uint64_t tsc_freq;
-extern int tsc_is_broken;
-extern int wall_cmos_clock;
+#define wall_cmos_clock 0
+#define adjkerntz 0
-/*
- * Driver to clock driver interface.
- */
-
-int acquire_timer2(int mode);
-int release_timer2(void);
-int rtcin(int val);
+void tick_init(void);
int sysbeep(int pitch, int period);
-void init_TSC(void);
-void init_TSC_tc(void);
-
-#endif /* _KERNEL */
#endif /* !_MACHINE_CLOCK_H_ */
More information about the p4-projects
mailing list