/*
* 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
*/
/*
*/
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <fm/topo_mod.h>
#include <libdevinfo.h>
#include <limits.h>
#include <sys/systeminfo.h>
#include <assert.h>
#include <sys/systeminfo.h>
#include <fm/fmd_fmri.h>
/*
* sun4v specific motherboard enumerators
*/
#ifdef __cplusplus
extern "C" {
#endif
topo_instance_t, void *, void *);
1
};
1
};
/*ARGSUSED*/
void
{
/*
* Turn on module debugging output
*/
return; /* mod errno already set */
}
}
void
{
}
static void *
{
}
static void
{
}
static int
char **psnp)
{
return (-1);
}
isa);
return (-1);
}
if ((type & LDOM_TYPE_CONTROL) != 0) {
} else {
}
if (bufsize < 1) {
bufsize);
return (-1);
}
return (-1);
}
return (-1);
}
if (nfrus <= 0) {
return (-1);
}
for (i = 0; i < nfrus; i++) {
/* systemboard/motherboard component */
"serial_number", &sn) < 0)
"part_number", &pn) < 0)
"dash_number", &dn) < 0)
"serial_number", &psn) < 0)
}
}
/* redefined access method for chassis serial number */
"serial_number", &csn) < 0)
}
}
}
pstr = mb_topo_alloc(i);
mb_topo_free(pstr, i);
return (0);
}
static void
{
int err;
if (err != ETOPO_PROP_DEFD)
return;
}
/* chassis */
&err);
&calias) == 0)
if (err != ETOPO_PROP_DEFD)
return;
}
isa[0] = '\0';
}
static tnode_t *
{
/*
* Get System Serial Number, Chassis Serial Number, MB Serial Number
* and MB Part Number from PRI.
*/
csn) != 0) {
"failed to add chassis-sn to auth");
return (NULL);
}
}
"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);
}
/*ARGSUSED*/
static tnode_t *
{
int err;
return (NULL);
/* Set FRU */
return (NULL);
}
/* Label is MB */
}
return (ntn);
}
/*ARGSUSED*/
static int
{
"Currently only know how to enumerate %s components.\n",
return (0);
}
mb_mod_hdl = mod;
"failed: %s\n",
return (-1); /* mod_errno already set */
}
return (0);
}