NetBSD Problem Report #51564

From www@NetBSD.org  Wed Oct 19 20:26:17 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 8CBDD7A271
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 19 Oct 2016 20:26:17 +0000 (UTC)
Message-Id: <20161019202616.9357E7A2D5@mollari.NetBSD.org>
Date: Wed, 19 Oct 2016 20:26:16 +0000 (UTC)
From: rokuyama@rk.phys.keio.ac.jp
Reply-To: rokuyama@rk.phys.keio.ac.jp
To: gnats-bugs@NetBSD.org
Subject: booke borads like RB800 rebooting intead of halting
X-Send-Pr-Version: www-1.0

>Number:         51564
>Category:       port-evbppc
>Synopsis:       booke borads like RB800 rebooting intead of halting
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    rin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 19 20:30:00 +0000 2016
>Closed-Date:    Tue Dec 06 07:40:56 +0000 2016
>Last-Modified:  Thu Dec 08 02:00: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

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: port-evbppc-maintainer->rin
Responsible-Changed-By: maya@NetBSD.org
Responsible-Changed-When: Sat, 03 Dec 2016 09:53:17 +0000
Responsible-Changed-Why:
hi rin, would you like to commit this yourself?


From: Rin Okuyama <rokuyama@rk.phys.keio.ac.jp>
To: gnats-bugs@NetBSD.org, port-evbppc-maintainer@netbsd.org,
 maya@NetBSD.org, Martin Husemann <martin@duskware.de>,
 Nick Hudson <skrll@netbsd.org>
Cc: 
Subject: Re: port-evbppc/51564 (booke borads like RB800 rebooting intead of
 halting)
Date: Tue, 6 Dec 2016 10:25:11 +0900

 Can I commit this? It works for me, and no side effects are expected.

From: Joerg Sonnenberger <joerg@bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-evbppc/51564 (booke borads like RB800 rebooting intead of
 halting)
Date: Tue, 6 Dec 2016 03:14:48 +0100

 On Tue, Dec 06, 2016 at 01:30:00AM +0000, Rin Okuyama wrote:
 >  Can I commit this? It works for me, and no side effects are expected.

 Sure.

 Joerg

From: "Rin Okuyama" <rin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51564 CVS commit: src/sys/arch/powerpc/booke
Date: Tue, 6 Dec 2016 07:34:22 +0000

 Module Name:	src
 Committed By:	rin
 Date:		Tue Dec  6 07:34:22 UTC 2016

 Modified Files:
 	src/sys/arch/powerpc/booke: booke_machdep.c

 Log Message:
 PR port-evbppc/51564 (myself): wait for console input after halting the machine.
 ok joerg


 To generate a diff of this commit:
 cvs rdiff -u -r1.24 -r1.25 src/sys/arch/powerpc/booke/booke_machdep.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: rin@NetBSD.org
State-Changed-When: Tue, 06 Dec 2016 07:40:56 +0000
State-Changed-Why:
Thanks Joerg. Fix committed.


From: Matt Thomas <matt@3am-software.com>
To: Rin Okuyama <rokuyama@rk.phys.keio.ac.jp>
Cc: gnats-bugs@NetBSD.org,
 port-evbppc-maintainer@netbsd.org,
 maya@NetBSD.org,
 Martin Husemann <martin@duskware.de>,
 Nick Hudson <skrll@netbsd.org>
Subject: Re: port-evbppc/51564 (booke borads like RB800 rebooting intead of
 halting)
Date: Wed, 7 Dec 2016 01:15:25 -0800

 > On Dec 5, 2016, at 5:25 PM, Rin Okuyama <rokuyama@rk.phys.keio.ac.jp> =
 wrote:
 >=20
 > Can I commit this? It works for me, and no side effects are expected.

 Yes.=

From: Rin Okuyama <rokuyama@rk.phys.keio.ac.jp>
To: Matt Thomas <matt@3am-software.com>
Cc: gnats-bugs@NetBSD.org, port-evbppc-maintainer@netbsd.org
Subject: Re: port-evbppc/51564 (booke borads like RB800 rebooting intead of
 halting)
Date: Thu, 8 Dec 2016 10:57:46 +0900

 On 2016/12/07 18:15, Matt Thomas wrote:
 >
 >> On Dec 5, 2016, at 5:25 PM, Rin Okuyama <rokuyama@rk.phys.keio.ac.jp> wrote:
 >>
 >> Can I commit this? It works for me, and no side effects are expected.
 >
 > Yes.

 Thank you for your confirmation. I already committed it.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.