summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2008-10-15 03:38:03 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2008-10-15 03:38:03 +0000
commite5b69cb78e39e1043228664f5667e46f361af000 (patch)
tree79194b425964ea6d34e987b0c2453e00d9d37ff8 /sys/powerpc
parent5854d5bf4f648b16ad411e6e515f762ad67c773c (diff)
downloadFreeBSD-src-e5b69cb78e39e1043228664f5667e46f361af000.zip
FreeBSD-src-e5b69cb78e39e1043228664f5667e46f361af000.tar.gz
Prevent the OF syscons module from trying to attach to real devices on the
nexus by only attaching to a device with no OF node.
Diffstat (limited to 'sys/powerpc')
-rw-r--r--sys/powerpc/ofw/ofw_syscons.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/powerpc/ofw/ofw_syscons.c b/sys/powerpc/ofw/ofw_syscons.c
index 99c5119..373ba11 100644
--- a/sys/powerpc/ofw/ofw_syscons.c
+++ b/sys/powerpc/ofw/ofw_syscons.c
@@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$");
#include <dev/syscons/syscons.h>
#include <dev/ofw/openfirm.h>
+#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_pci.h>
#include <powerpc/ofw/ofw_syscons.h>
@@ -845,6 +846,10 @@ ofwfb_scidentify(driver_t *driver, device_t parent)
static int
ofwfb_scprobe(device_t dev)
{
+ /* This is a fake device, so make sure there is no OF node for it */
+ if (ofw_bus_get_node(dev) != -1)
+ return ENXIO;
+
device_set_desc(dev, "System console");
return (sc_probe_unit(device_get_unit(dev),
device_get_flags(dev) | SC_AUTODETECT_KBD));
OpenPOWER on IntegriCloud