Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/oea When boot up with auto-boot? == true, s...
details: https://anonhg.NetBSD.org/src/rev/1a52d1e713ce
branches: trunk
changeset: 971143:1a52d1e713ce
user: rin <rin%NetBSD.org@localhost>
date: Wed Apr 15 13:33:13 2020 +0000
description:
When boot up with auto-boot? == true, some systems do not provide stdout
if the normal output is screen.
Open screen explicitly as stdout in this case, both for ofwboot and kernel,
which fixes problems with auto-boot? == true for Mac mini G4:
- messages from ofwboot do not appear
- kernel freeze during early boot stage
Taken from OpenBSD:
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/arch/macppc/macppc/ofw_machdep.c#rev1.3
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/arch/macppc/stand/Locore.c#rev1.3
XXX
pullup to netbsd-9 and -8
diffstat:
sys/arch/macppc/stand/ofwboot/Locore.c | 7 ++++++-
sys/arch/powerpc/oea/ofw_consinit.c | 8 ++++++--
2 files changed, 12 insertions(+), 3 deletions(-)
diffs (50 lines):
diff -r 46e5a98e1e9f -r 1a52d1e713ce sys/arch/macppc/stand/ofwboot/Locore.c
--- a/sys/arch/macppc/stand/ofwboot/Locore.c Wed Apr 15 10:21:00 2020 +0000
+++ b/sys/arch/macppc/stand/ofwboot/Locore.c Wed Apr 15 13:33:13 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: Locore.c,v 1.33 2018/11/12 20:00:46 scole Exp $ */
+/* $NetBSD: Locore.c,v 1.34 2020/04/15 13:33:13 rin Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -680,6 +680,11 @@
sizeof(stdout))
OF_exit();
+ if (stdout == 0) {
+ /* screen should be console, but it is not open */
+ stdout = OF_open("screen");
+ }
+
#ifdef HEAP_VARIABLE
uint32_t pvr, vers, hsize = HEAP_SIZE;
diff -r 46e5a98e1e9f -r 1a52d1e713ce sys/arch/powerpc/oea/ofw_consinit.c
--- a/sys/arch/powerpc/oea/ofw_consinit.c Wed Apr 15 10:21:00 2020 +0000
+++ b/sys/arch/powerpc/oea/ofw_consinit.c Wed Apr 15 13:33:13 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ofw_consinit.c,v 1.17 2016/02/14 18:12:30 dholland Exp $ */
+/* $NetBSD: ofw_consinit.c,v 1.18 2020/04/15 13:33:13 rin Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofw_consinit.c,v 1.17 2016/02/14 18:12:30 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_consinit.c,v 1.18 2020/04/15 13:33:13 rin Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -458,6 +458,10 @@
if (OF_getprop(chosen, "stdin", &stdin,
sizeof(stdin)) != sizeof(stdin))
goto nocons;
+ if (stdout == 0) {
+ /* screen should be console, but it is not open */
+ stdout = OF_open("screen");
+ }
node = OF_instance_to_package(stdout);
console_node = node;
console_instance = stdout;
Home |
Main Index |
Thread Index |
Old Index