diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-03-15 20:50:36 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-03-15 20:50:36 +0000 |
commit | 177c3f7790be67ce20d3f9d6d69bd32a1dd2aa52 (patch) | |
tree | 3060f34be18990bebc7f894a6c5b7a563529306d | |
parent | d1963fa3ff77aa61f235c58bf76c45beecabed13 (diff) |
Make sure we find the OpenFirmware node for UltraSPARC-IV cpus.
-rw-r--r-- | sys/arch/sparc64/sparc64/autoconf.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/arch/sparc64/sparc64/autoconf.c b/sys/arch/sparc64/sparc64/autoconf.c index f893839679f..c02f7279d1b 100644 --- a/sys/arch/sparc64/sparc64/autoconf.c +++ b/sys/arch/sparc64/sparc64/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.59 2007/02/12 19:53:36 gwk Exp $ */ +/* $OpenBSD: autoconf.c,v 1.60 2007/03/15 20:50:35 kettenis Exp $ */ /* $NetBSD: autoconf.c,v 1.51 2001/07/24 19:32:11 eeh Exp $ */ /* @@ -1056,6 +1056,25 @@ extern bus_space_tag_t mainbus_space_tag; bootpath_store(1, bootpath); /* the first early device to be configured is the cpu */ + + { + /* + * UltraSPARC-IV cpus appear as two "cpu" nodes below + * a "cmp" node. Lookup the first "cmp" node, such + * that we find the "cpu" node in the code below. + */ + + for (node = OF_child(node); node; node = OF_peer(node)) { + if (OF_getprop(node, "name", buf, sizeof(buf)) <= 0) + continue; + if (strcmp(buf, "cmp") == 0) + break; + } + + if (node == 0) + node = findroot(); + } + { /* XXX - what to do on multiprocessor machines? */ |