--- a/usr/src/psm/promif/ieee1275/common/prom_fb.c Thu Mar 29 19:46:53 2007 -0700
+++ b/usr/src/psm/promif/ieee1275/common/prom_fb.c Thu Mar 29 21:54:29 2007 -0700
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -29,14 +29,28 @@
#include <sys/promif.h>
#include <sys/promimpl.h>
+/*
+ * Because kmdb links prom_stdout_is_framebuffer into its own
+ * module and coherent console adds "device-type=console" for
+ * /os-io node, we also check if the device-type is "console",
+ * (if not "display"), so that prom_stdout_is_framebuffer still
+ * works corrrectly after /os-io node is registered into OBP.
+ */
int
prom_stdout_is_framebuffer(void)
{
static int remember = -1;
- if (remember == -1)
+ if (remember != -1)
+ return (remember);
+
+ remember = prom_devicetype((pnode_t)prom_stdout_node(),
+ OBP_DISPLAY);
+
+ if (remember == 0)
remember = prom_devicetype((pnode_t)prom_stdout_node(),
- OBP_DISPLAY);
+ OBP_DISPLAY_CONSOLE);
+
return (remember);
}
--- a/usr/src/uts/sun/sys/obpdefs.h Thu Mar 29 19:46:53 2007 -0700
+++ b/usr/src/uts/sun/sys/obpdefs.h Thu Mar 29 21:54:29 2007 -0700
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -66,6 +65,7 @@
#define OBP_DEVICETYPE "device_type"
#define OBP_DISPLAY "display"
+#define OBP_DISPLAY_CONSOLE "console"
#define OBP_NETWORK "network"
#define OBP_BYTE "byte"
#define OBP_BLOCK "block"
--- a/usr/src/uts/sun4/os/startup.c Thu Mar 29 19:46:53 2007 -0700
+++ b/usr/src/uts/sun4/os/startup.c Thu Mar 29 21:54:29 2007 -0700
@@ -3041,18 +3041,20 @@
prom_interpret("' unix-tte is va>tte-data", 0, 0, 0, 0, 0);
}
-
/*
- * Because kmdb links prom_stdout_is_framebuffer into its own
- * module, we add "device-type=display" here for /os-io node, so that
- * prom_stdout_is_framebuffer still works corrrectly after /os-io node
- * is registered into OBP.
+ * Here we add "device-type=console" for /os-io node, for currently
+ * our kernel console output only supports displaying text and
+ * performing cursor-positioning operations (through kernel framebuffer
+ * driver) and it doesn't support other functionalities required for a
+ * standard "display" device as specified in 1275 spec. The main missing
+ * interface defined by the 1275 spec is "draw-logo".
+ * also see the comments above prom_stdout_is_framebuffer().
*/
static char *create_node =
"\" /\" find-device "
"new-device "
"\" os-io\" device-name "
- "\" display\" device-type "
+ "\" "OBP_DISPLAY_CONSOLE"\" device-type "
": cb-r/w ( adr,len method$ -- #read/#written ) "
" 2>r swap 2 2r> ['] $callback catch if "
" 2drop 3drop 0 "