/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* 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
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <string.h>
#include <strings.h>
#include <libdevinfo.h>
#include <fm/topo_mod.h>
#include "opl_topo.h"
/*
* Check the root complex device node for a slot-names property.
*/
const char *
{
return (NULL);
pp != DI_PROM_PROP_NIL;
continue;
return ((const char *)&buf[4]);
}
}
return (NULL);
}
static tnode_t *
void *priv)
{
return (NULL);
}
/* Create FMRI */
return (NULL);
}
/* Create and bind node */
return (NULL); /* mod_errno already set */
}
return (node);
}
/*
* Create a root complex node.
*/
static tnode_t *
{
int err;
const char *slot_name;
char *dnpath;
return (NULL);
}
/*
* If this root complex connects to a slot, it will have a
* slot-names property.
*/
if (slot_name) {
/* Add FRU fmri */
}
/* Add label */
} else {
/* Inherit parent FRU's label */
}
/*
* Set ASRU to be the dev-scheme ASRU
*/
"dev:///%s fmri creation failed.\n",
dnpath);
return (NULL);
}
return (NULL);
}
} else {
}
/*
* Set pciexrc properties for root complex nodes
*/
/* Add the io and pci property groups */
return (NULL);
}
return (NULL);
}
/* Add the devfs path property */
if (dnpath) {
}
}
/* Oberon device type is always "pciex" */
}
/* Oberon driver is always "px" */
}
}
/* This is a PCIEX Root Complex */
}
/* BDF of Oberon root complex is constant */
}
/* Make room for children */
return (rcn);
}
/*
* Create a hostbridge node.
*/
static tnode_t *
{
int err;
return (NULL);
}
/* Inherit parent FRU's label */
/* Make room for children */
return (hbn);
}
/*
* opl_hb_enum gets the ioboard instance passed in, and determines the
* hostbridge and root complex instances numbers based on the bus addresses.
*/
int
int brd)
{
int hb;
int rc;
di_node_t p;
/* Load the pcibus module. We'll need it later. */
return (-1);
}
/* For each hostbridge on an ioboard... */
/* For each root complex in a hostbridge... */
/* If no root complex, continue */
if (p == DI_NODE_NIL) {
continue;
}
/* The root complex exists! */
"/chassis=0/ioboard=%d/hostbridge=%d/pciexrc=%d\n",
/*
* If we haven't created a hostbridge node yet, do it
* now.
*/
"unable to create hbnode: %s\n",
return (-1);
}
}
/* Create the root complex node */
"unable to create rcnode: %s\n",
return (-1);
}
/* Enumerate pcibus nodes under the root complex */
"error enumerating pcibus: %s\n",
return (-1);
}
}
}
return (0);
}