Module Name:    src
Committed By:   cliff
Date:           Sat Feb  5 06:10:29 UTC 2011

Modified Files:
        src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_cpu.c

Log Message:
- include opt_multiprocessor.h for MULTIPROCESSOR dependency
- add suport for MIPS COP0 watchpoint in ddb
- add ci_pmap_asid_cur print in rmixl_cpuinfo_print().
- note rmixl_cpuinfo_print() (or something like it) should eventually get moved
into a md support fn of a (hypothetical) ddb 'show cpu' command.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.16 -r1.1.2.17 src/sys/arch/mips/rmi/rmixl_cpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/mips/rmi/rmixl_cpu.c
diff -u src/sys/arch/mips/rmi/rmixl_cpu.c:1.1.2.16 src/sys/arch/mips/rmi/rmixl_cpu.c:1.1.2.17
--- src/sys/arch/mips/rmi/rmixl_cpu.c:1.1.2.16	Fri Jan  7 00:17:22 2011
+++ src/sys/arch/mips/rmi/rmixl_cpu.c	Sat Feb  5 06:10:29 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_cpu.c,v 1.1.2.16 2011/01/07 00:17:22 cliff Exp $	*/
+/*	$NetBSD: rmixl_cpu.c,v 1.1.2.17 2011/02/05 06:10:29 cliff Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -38,7 +38,10 @@
 #include "locators.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rmixl_cpu.c,v 1.1.2.16 2011/01/07 00:17:22 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rmixl_cpu.c,v 1.1.2.17 2011/02/05 06:10:29 cliff Exp $");
+
+#include "opt_multiprocessor.h"
+#include "opt_ddb.h"
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -60,6 +63,9 @@
 #include <mips/rmi/rmixl_cpuvar.h>
 #include <mips/rmi/rmixl_intr.h>
 #include <mips/rmi/rmixl_fmnvar.h>
+#ifdef DDB
+#include <mips/db_machdep.h>
+#endif
 
 
 static int	cpu_rmixl_match(device_t, cfdata_t, void *);
@@ -91,6 +97,20 @@
 static struct rmixl_cpu_trampoline_args rmixl_cpu_trampoline_args;
 #endif
 
+#if defined(DDB) && defined(MIPS_DDB_WATCH)
+/*
+ * cpu_rmixl_db_watch_init - initialize COP0 watchpoint stuff
+ *
+ * clear IEU_DEFEATURE[DBE] to ensure T_WATCH on watchpoint exception
+ * set COP0 watchhi and watchlo
+ */
+static void
+cpu_rmixl_db_watch_init(void)
+{
+	db_mach_watch_set_all();
+}
+#endif	/* DDB && MIPS_DDB_WATCH */
+
 /*
  * cpu_xls616_erratum
  *
@@ -222,6 +242,10 @@
 		return;
 	once = true;
 
+#if defined(DDB) && defined(MIPS_DDB_WATCH)
+	cpu_rmixl_db_watch_init();
+#endif
+
 	rmixl_fmn_init();
 
 	sc->sc_ih_clk = rmixl_intr_init_clk();
@@ -280,6 +304,10 @@
 #endif
 
 	cpucore_rmixl_hatch(device_parent(sc->sc_dev));
+
+#if defined(DDB) && defined(MIPS_DDB_WATCH)
+	cpu_rmixl_db_watch_init();
+#endif
 }
 
 static int
@@ -422,6 +450,7 @@
 		for (int i=0; i < SOFTINT_COUNT; i++)
 			printf("ci_softlwps[%d] %p\n", i, ci->ci_softlwps[i]);
 		printf("ci_tlb_slot %d\n", ci->ci_tlb_slot);
+		printf("ci_pmap_asid_cur %d\n", ci->ci_pmap_asid_cur);
 		printf("ci_tlb_info %p\n", ci->ci_tlb_info);
 		printf("ci_pmap_seg0tab %p\n", ci->ci_pmap_seg0tab);
 #ifdef _LP64
@@ -441,5 +470,4 @@
 
 	return ci;
 }
-
 #endif	/* DEBUG */

Reply via email to