PERFORCE change 132367 for review
Warner Losh
imp at FreeBSD.org
Wed Jan 2 20:03:37 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=132367
Change 132367 by imp at 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);
More information about the p4-projects
mailing list