summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2008-07-04 17:20:27 +0000
committerkettenis <kettenis@openbsd.org>2008-07-04 17:20:27 +0000
commita42faf19bc6bec1bcba2bc85b521700388cec8f2 (patch)
tree2771ebe1782a3180a0ae08def5940c7b8794601e
parentRemove unused NQNFS #define (diff)
downloadwireguard-openbsd-a42faf19bc6bec1bcba2bc85b521700388cec8f2.tar.xz
wireguard-openbsd-a42faf19bc6bec1bcba2bc85b521700388cec8f2.zip
Add support for ssm nodes as found on the v1280 and bigger machines. For now,
we pretend that ssm is mainbus. Perhaps I'l turn it into a real bus driver later.
-rw-r--r--sys/arch/sparc64/sparc64/autoconf.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/sys/arch/sparc64/sparc64/autoconf.c b/sys/arch/sparc64/sparc64/autoconf.c
index aa7cfa89884..0cdff89424e 100644
--- a/sys/arch/sparc64/sparc64/autoconf.c
+++ b/sys/arch/sparc64/sparc64/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.91 2008/06/10 16:49:01 kettenis Exp $ */
+/* $OpenBSD: autoconf.c,v 1.92 2008/07/04 17:20:27 kettenis Exp $ */
/* $NetBSD: autoconf.c,v 1.51 2001/07/24 19:32:11 eeh Exp $ */
/*
@@ -784,6 +784,14 @@ extern bus_space_tag_t mainbus_space_tag;
/* We configure the CPUs first. */
node = findroot();
+ for (node0 = OF_child(node); node0; node0 = OF_peer(node0)) {
+ if (OF_getprop(node0, "name", buf, sizeof(buf)) <= 0)
+ continue;
+ if (strcmp(buf, "ssm") == 0) {
+ node = node0;
+ break;
+ }
+ }
for (node = OF_child(node); node; node = OF_peer(node)) {
if (!checkstatus(node))
@@ -829,12 +837,21 @@ extern bus_space_tag_t mainbus_space_tag;
if (optionsnode == 0)
panic("no options in OPENPROM");
+ for (node0 = OF_child(node); node0; node0 = OF_peer(node0)) {
+ if (OF_getprop(node0, "name", buf, sizeof(buf)) <= 0)
+ continue;
+ if (strcmp(buf, "ssm") == 0) {
+ node = node0;
+ break;
+ }
+ }
+
/*
* Configure the devices, in PROM order. Skip
* PROM entries that are not for devices, or which must be
* done before we get here.
*/
- for (node = node0; node; node = OF_peer(node)) {
+ for (node = OF_child(node); node; node = OF_peer(node)) {
int portid;
DPRINTF(ACDB_PROBE, ("Node: %x", node));