Module Name: src
Committed By: jakllsch
Date: Sun Jan 22 17:27:31 UTC 2017
Modified Files:
src/sys/arch/shark/ofw: igsfb_ofbus.c
Log Message:
Call OF to bring up the CyberPro if it's not the console.
Avoids igsfb crash later with serial console due to
inaccessible hardware.
To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/shark/ofw/igsfb_ofbus.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/shark/ofw/igsfb_ofbus.c
diff -u src/sys/arch/shark/ofw/igsfb_ofbus.c:1.16 src/sys/arch/shark/ofw/igsfb_ofbus.c:1.17
--- src/sys/arch/shark/ofw/igsfb_ofbus.c:1.16 Tue Jun 30 03:52:54 2015
+++ src/sys/arch/shark/ofw/igsfb_ofbus.c Sun Jan 22 17:27:31 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: igsfb_ofbus.c,v 1.16 2015/06/30 03:52:54 macallan Exp $ */
+/* $NetBSD: igsfb_ofbus.c,v 1.17 2017/01/22 17:27:31 jakllsch Exp $ */
/*
* Copyright (c) 2006 Michael Lorenz
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: igsfb_ofbus.c,v 1.16 2015/06/30 03:52:54 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: igsfb_ofbus.c,v 1.17 2017/01/22 17:27:31 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -133,8 +133,17 @@ igsfb_ofbus_cnattach(bus_space_tag_t iot
stdout_ihandle = of_decode_int((void *)&stdout_ihandle);
stdout_phandle = OF_instance_to_package(stdout_ihandle);
- if (stdout_phandle != igs_node)
+ if (stdout_phandle != igs_node) {
+ /*
+ * If we aren't the boot console, the CyberPro probably
+ * hasn't been brought up yet. Bring it up now, it's
+ * still early enough to do so.
+ */
+ const int handle = OF_open("/vlbus/display");
+ if (handle != -1)
+ OF_close(handle);
return ENXIO;
+ }
/* ok, now setup and attach the console */
dc = &igsfb_console_dc;