xaui.c revision b48b4ad70157f504f1e9b62203d1cc83a5c03104
/*
* 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>
#include "xaui.h"
/*
* xaui.c
* sun4v specific xaui enumerators
*/
#ifdef __cplusplus
extern "C" {
#endif
#define XAUI_VERSION TOPO_VERSION
topo_instance_t, void *, void *);
static const topo_modops_t xaui_ops =
const topo_modinfo_t xaui_info =
static const topo_pgroup_info_t xaui_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
{
int err;
int i, p;
if (Phyxaui_Names == NULL)
return (-1);
if (topo_prop_get_string(node,
}
/*
* Trim SUNW, from the platform name
*/
else
++pp;
for (p = 0; p < Phyxaui_Names->psn_nplats; p++) {
pp) != 0)
continue;
break;
}
}
break;
}
}
}
return (0);
}
/*ARGSUSED*/
static tnode_t *
{
int e;
return (NULL);
}
/* set ASRU to resource fmri */
TOPO_PROP_RESOURCE, &fmri, &e) == 0)
0, XFP_MAX) < 0) {
"failed: %s\n",
return (NULL); /* mod_errno already set */
}
return (ntn);
}
static topo_mod_t *
{
}
return (rp);
}
/*ARGSUSED*/
static int
{
"Currently only know how to enumerate %s components.\n",
XAUI);
return (0);
}
/*
* Load XFP enum
*/
return (-1);
return (-1);
/* set the private data to be the instance number of niufn */
if (topo_mod_enumerate(mod,
}
return (0);
}