Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sgimips/dev if ddb is enabled set cpu_reset_address...



details:   https://anonhg.NetBSD.org/src/rev/93eb5eda0247
branches:  trunk
changeset: 961983:93eb5eda0247
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Apr 26 17:07:17 2021 +0000

description:
if ddb is enabled set cpu_reset_address to crime_reboot.
'mach reset' works from ddb now.

diffstat:

 sys/arch/sgimips/dev/crime.c |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (42 lines):

diff -r 7ee380618926 -r 93eb5eda0247 sys/arch/sgimips/dev/crime.c
--- a/sys/arch/sgimips/dev/crime.c      Mon Apr 26 16:35:54 2021 +0000
+++ b/sys/arch/sgimips/dev/crime.c      Mon Apr 26 17:07:17 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: crime.c,v 1.38 2015/02/18 16:47:58 macallan Exp $      */
+/*     $NetBSD: crime.c,v 1.39 2021/04/26 17:07:17 mrg Exp $   */
 
 /*
  * Copyright (c) 2004 Christopher SEKIYA
@@ -38,7 +38,9 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: crime.c,v 1.38 2015/02/18 16:47:58 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: crime.c,v 1.39 2021/04/26 17:07:17 mrg Exp $");
+
+#include "opt_ddb.h"
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -57,6 +59,10 @@
 #include <sgimips/dev/crimereg.h>
 #include <sgimips/mace/macevar.h>
 
+#if defined(DDB)
+#include <machine/db_machdep.h>
+#endif
+
 #include "locators.h"
 
 #define DISABLE_CRIME_WATCHDOG
@@ -107,6 +113,10 @@
        uint64_t baseline, endline;
        uint32_t startctr, endctr, cps;
 
+#if defined(DDB)
+       cpu_reset_address = crime_reboot;
+#endif
+
        sc->sc_dev = self;
        crm_iot = normal_memt;
 



Home | Main Index | Thread Index | Old Index