Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/landisk/landisk PR 51724 - landisk fails to reboot.
details: https://anonhg.NetBSD.org/src/rev/66b7b8aea5fb
branches: trunk
changeset: 349637:66b7b8aea5fb
user: uwe <uwe%NetBSD.org@localhost>
date: Sat Dec 17 01:32:22 2016 +0000
description:
PR 51724 - landisk fails to reboot.
machine_reset() - instead of trying to cause an invalid data access
that gcc will optimize away, just use "trapa" instruction.
G/c assignment to EXPEVT, it will be set by the actual reset. That
assignment has been probably cargo-culted from cpu_reset() that
manually jumps to 0xa0000000 (the reset address) instead of triggering
a reset.
TODO: This code should be SuperH generic cpu_reset().
diffstat:
sys/arch/landisk/landisk/machdep.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (28 lines):
diff -r 21f3b362a210 -r 66b7b8aea5fb sys/arch/landisk/landisk/machdep.c
--- a/sys/arch/landisk/landisk/machdep.c Sat Dec 17 01:10:38 2016 +0000
+++ b/sys/arch/landisk/landisk/machdep.c Sat Dec 17 01:32:22 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.19 2016/12/17 01:10:38 uwe Exp $ */
+/* $NetBSD: machdep.c,v 1.20 2016/12/17 01:32:22 uwe Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.19 2016/12/17 01:10:38 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.20 2016/12/17 01:32:22 uwe Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -375,8 +375,7 @@
{
_cpu_exception_suspend();
- _reg_write_4(SH_(EXPEVT), EXPEVT_RESET_MANUAL);
- (void)*(volatile uint32_t *)0x80000001; /* CPU shutdown */
+ asm("trapa #0");
/*NOTREACHED*/
for (;;) {
Home |
Main Index |
Thread Index |
Old Index