xfp.c revision ee5416c9d7e449233197d5d20bc6b81e4ff091b2
/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <string.h>
#include <fm/topo_mod.h>
/*
* xfp.c
* sun4v specific xfp enumerators
*/
#ifdef __cplusplus
extern "C" {
#endif
#define XFP_VERSION TOPO_VERSION
topo_instance_t, void *, void *);
static const topo_modops_t xfp_ops =
const topo_modinfo_t xfp_info =
static const topo_pgroup_info_t xfp_auth_pgroup = {
1
};
/*ARGSUSED*/
void
{
/*
* Turn on module debugging output
*/
return; /* mod errno already set */
}
}
void
{
}
static tnode_t *
{
int err;
"Unable to make nvlist for %s bind: %s.\n",
return (NULL);
}
"topo_node_bind (%s%d/%s%d) failed: %s\n",
name, i,
return (NULL);
}
}
return (ntn);
}
static int
{
int err, e;
}
if (e < 0)
return (0);
}
static int
{
const char *xfplabel = "/XFP";
return (-1);
}
&err) != 0) {
}
}
return (0);
}
/*ARGSUSED*/
static tnode_t *
{
int e;
return (NULL);
}
/* set ASRU to resource fmri */
TOPO_PROP_RESOURCE, &fmri, &e) == 0)
return (ntn);
}
/*ARGSUSED*/
static int
{
"Currently only know how to enumerate %s components.\n",
XFP);
return (0);
}
return (-1);
return (0);
}