/*
* 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 <fm/topo_mod.h>
#include <libdevinfo.h>
#include <limits.h>
#include <sys/systeminfo.h>
#include <hostbridge.h>
#include <ioboard.h>
#include <did.h>
#include <did_props.h>
#include <util.h>
/*
* Generic code shared by all the ioboard enumerators
*/
topo_instance_t, void *, void *);
nvlist_t **);
extern txprop_t IOB_common_props[];
extern int IOB_propcnt;
{ iob_enum, iob_release };
{ NULL }
};
void
{
/*
* Turn on module debugging output
*/
}
void
{
}
static int
{
if (version > TOPO_METH_LABEL_VERSION)
}
static topo_mod_t *
{
}
return (rp);
}
/*ARGSUSED*/
static int
{
int rv;
"Currently only know how to enumerate %s components.\n",
IOBOARD);
return (0);
}
/*
* Load the hostbridge enumerator, we'll soon need it!
*/
return (-1);
}
if (did_hash_init(mp) != 0)
return (-1);
if (rv < 0)
else
return (0);
}
/*ARGSUSED*/
static void
{
/*
* node private data (did_t) for this node is destroyed in
* did_hash_destroy()
*/
}
static tnode_t *
{
"Unable to make nvlist for %s bind.\n", name);
return (NULL);
}
"topo_node_bind (%s%d/%s%d) failed: %s\n",
name, i,
return (NULL);
}
return (NULL);
}
return (ntn);
}
tnode_t *
{
return (NULL);
return (NULL);
}
/*
* We expect to find host bridges beneath the ioboard.
*/
return (NULL);
}
return (ntn);
}
did_t *
{
char *comma;
char *bac;
char *ba;
int e;
return (NULL);
"Transcribing %s into board, bus, etc.\n", bac);
return (NULL);
}
*comma = '\0';
*comma = ',';
if (e < 0) {
"Trouble interpreting %s before comma.\n", bac);
return (NULL);
}
if (e < 0) {
"Trouble interpreting %s after comma.\n", bac);
return (NULL);
}
return (NULL);
}
}