summaryrefslogtreecommitdiff
path: root/sys/arch/loongson
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2019-04-01 07:00:53 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2019-04-01 07:00:53 +0000
commit3e0f9ec2650b32f581c7589e8e950b36c494c1b5 (patch)
tree09b3436602bf1901aa426b1226acf7b67d69035d /sys/arch/loongson
parent52d8a07269c95d9dbed740844a748788d1dfdb23 (diff)
fast track ddb> reboot command to skip anything which might panic again.
ok deraadt
Diffstat (limited to 'sys/arch/loongson')
-rw-r--r--sys/arch/loongson/loongson/machdep.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/loongson/loongson/machdep.c b/sys/arch/loongson/loongson/machdep.c
index f7074a8c817..3e7d797f10b 100644
--- a/sys/arch/loongson/loongson/machdep.c
+++ b/sys/arch/loongson/loongson/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.85 2019/03/17 05:06:36 visa Exp $ */
+/* $OpenBSD: machdep.c,v 1.86 2019/04/01 07:00:52 tedu Exp $ */
/*
* Copyright (c) 2009, 2010, 2014 Miodrag Vallat.
@@ -1050,6 +1050,9 @@ int waittime = -1;
__dead void
boot(int howto)
{
+ if ((howto & RB_RESET) != 0)
+ goto doreset;
+
if (curproc)
savectx(curproc->p_addr, 0);
@@ -1095,6 +1098,7 @@ haltsys:
} else
printf("System Halt.\n");
} else {
+doreset:
void (*__reset)(void) = (void (*)(void))RESET_EXC_VEC;
printf("System restart.\n");
if (sys_platform->reset != NULL)