Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Jan 2008 04:03:36 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 132367 for review
Message-ID:  <200801030403.m0343a1k050417@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=132367

Change 132367 by imp@imp_paco-paco on 2008/01/03 04:03:01

	Adjust mips2-based tick.c to the reality of the jnpr underpinnings.
	Add expected defines in clock.h, although they may ultimately be lame.

Affected files ...

.. //depot/projects/mips2-jnpr/src/sys/mips/include/clock.h#5 edit
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/tick.c#2 edit

Differences ...

==== //depot/projects/mips2-jnpr/src/sys/mips/include/clock.h#5 (text+ko) ====

@@ -32,6 +32,22 @@
 
 extern intrmask_t clockintr(intrmask_t, struct clockframe *);
 
+#define wall_cmos_clock 0
+#define adjkerntz 0
+
+/*
+ * Default is to assume a CPU pipeline clock of 100Mhz, and
+ * that CP0_COUNT increments every 2 cycles.
+ */
+#define MIPS_DEFAULT_HZ		(100 * 1000 * 1000)
+
+void	tick_init_params(uint64_t, int);
+void	tick_init(void);
+int	sysbeep(int pitch, int period);
+
+extern uint64_t	counter_freq;
+extern int	clocks_running;
+
 #endif
 
 #endif /* !_MACHINE_CLOCK_H_ */

==== //depot/projects/mips2-jnpr/src/sys/mips/mips/tick.c#2 (text+ko) ====

@@ -196,10 +196,11 @@
 
 	/*
 	 * Magic.  Setting up with an arg of NULL means we get passed tf.
+	 * XXX this comment and the code don't match.
 	 */
 	tf = arg;
-	usermode = tf->tf_regs[TF_SR] & MIPS_SR_KSU_USER;
-	pc = tf->tf_regs[TF_EPC];
+	usermode = tf->sr & MIPS_SR_KSU_USER;
+	pc = tf->pc;
 
 	if (clocks_running) {
 		hardclock(usermode, pc);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801030403.m0343a1k050417>