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/c02c98299d50
branches:  trunk
changeset: 982799:c02c98299d50
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 89daa2a41adc -r c02c98299d50 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