Module Name:    src
Committed By:   cliff
Date:           Sat Feb  5 06:02:52 UTC 2011

Modified Files:
        src/sys/arch/evbmips/rmixl [matt-nb5-mips64]: machdep.c

Log Message:
- include opt_multiprocessor.h for MULTIPROCESSOR dependency
- in rmixl_pcr_init_core(), ifdef MIPS_DDB_WATCH, clear IEU_DEFEATURE
so we can get T_WATCH execeptions if/when we set COP0 watchpoint


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.32 -r1.1.2.33 src/sys/arch/evbmips/rmixl/machdep.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/evbmips/rmixl/machdep.c
diff -u src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.32 src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.33
--- src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.32	Fri Jan  7 00:17:42 2011
+++ src/sys/arch/evbmips/rmixl/machdep.c	Sat Feb  5 06:02:51 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.1.2.32 2011/01/07 00:17:42 cliff Exp $	*/
+/*	$NetBSD: machdep.c,v 1.1.2.33 2011/02/05 06:02:51 cliff Exp $	*/
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -112,10 +112,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.1.2.32 2011/01/07 00:17:42 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.1.2.33 2011/02/05 06:02:51 cliff Exp $");
 
 #define __INTR_PRIVATE
 
+#include "opt_multiprocessor.h"
 #include "opt_ddb.h"
 #include "opt_com.h"
 #include "opt_execfmt.h"
@@ -488,6 +489,17 @@
 	r = rmixl_mfcr(RMIXL_PCR_L1D_CONFIG0);
 	r &= ~__BIT(14);			/* disable Unaligned Access */
 	rmixl_mtcr(RMIXL_PCR_L1D_CONFIG0, r);
+
+#if defined(DDB) && defined(MIPS_DDB_WATCH)
+	/*
+	 * clear IEU_DEFEATURE[DBE]
+	 * this enables COP0 watchpoint to trigger T_WATCH exception
+	 * instead of signaling JTAG.
+	 */
+	r = rmixl_mfcr(RMIXL_PCR_IEU_DEFEATURE);
+	r &= ~__BIT(7);
+	rmixl_mtcr(RMIXL_PCR_IEU_DEFEATURE, r);
+#endif
 }
 
 #ifdef MULTIPROCESSOR

Reply via email to