NetBSD-Bugs archive

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

port-evbppc/51564: booke borads like RB800 rebooting intead of halting



>Number:         51564
>Category:       port-evbppc
>Synopsis:       booke borads like RB800 rebooting intead of halting
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-evbppc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 19 20:30:00 +0000 2016
>Originator:     Rin Okuyama
>Release:        7.99.39
>Organization:
Faculty of Science and Technology, Keio University
>Environment:
NetBSD rb800 7.99.39 NetBSD 7.99.39 (RB800_RO) #0: Thu Oct 20 05:14:02 JST 2016  rin@xxx:xxx evbppc
>Description:
Boards based on powerpc/booke like RB800 reboot immediately when they halt.
>How-To-Repeat:
Do halt, e.g., RB800.
>Fix:
Poll and get from console before rebooting.

--- src/sys/arch/powerpc/booke/booke_machdep.c.orig	2016-10-20 05:02:17.799376838 +0900
+++ src/sys/arch/powerpc/booke/booke_machdep.c	2016-10-20 05:13:05.548947384 +0900
@@ -55,6 +55,8 @@
 
 #include <uvm/uvm_extern.h>
 
+#include <dev/cons.h>
+
 #include <powerpc/pcb.h>
 #include <powerpc/spr.h>
 #include <powerpc/booke/spr.h>
@@ -275,8 +277,13 @@
 	}
 
 	if (howto & RB_HALT) {
-		printf("halted\n\n");
+		printf("The operating system has halted.\n"
+		    "Press any key to reboot.\n\n");
+		cnpollc(1);	/* For proper keyboard command handling */
+		cngetc();
+		cnpollc(0);
 
+		printf("rebooting...\n\n");
 		goto reboot;	/* XXX for now... */
 
 #ifdef DDB



Home | Main Index | Thread Index | Old Index