Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/booke PR port-evbppc/51564 (myself): wait f...



details:   https://anonhg.NetBSD.org/src/rev/1fe764b26d6f
branches:  trunk
changeset: 349318:1fe764b26d6f
user:      rin <rin%NetBSD.org@localhost>
date:      Tue Dec 06 07:34:22 2016 +0000

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

diffstat:

 sys/arch/powerpc/booke/booke_machdep.c |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (42 lines):

diff -r 535ffb7436cd -r 1fe764b26d6f sys/arch/powerpc/booke/booke_machdep.c
--- a/sys/arch/powerpc/booke/booke_machdep.c    Tue Dec 06 07:09:38 2016 +0000
+++ b/sys/arch/powerpc/booke/booke_machdep.c    Tue Dec 06 07:34:22 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: booke_machdep.c,v 1.24 2016/07/11 16:06:52 matt Exp $  */
+/*     $NetBSD: booke_machdep.c,v 1.25 2016/12/06 07:34:22 rin Exp $   */
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -38,7 +38,7 @@
 #define        _POWERPC_BUS_DMA_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: booke_machdep.c,v 1.24 2016/07/11 16:06:52 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: booke_machdep.c,v 1.25 2016/12/06 07:34:22 rin Exp $");
 
 #include "opt_modular.h"
 
@@ -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