hb_mdesc.c revision 25351652d920ae27c5a56c199da581033ce763f6
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <string.h>
#include <strings.h>
#include <umem.h>
#include <sys/systeminfo.h>
#include <hb_mdesc.h>
#include "hb_rcid.h"
static void *
{
}
static void
{
}
/*
* hb_find_hb()
* Description:
* Return the pointer of hostbridge entry
*/
md_hb_t *
int i;
/* search the processor based on the physical id */
return (phb);
}
}
return (NULL);
}
/*
* hb_rc_init()
* Description:
* Read the hostbridge/pciexrc information from the MD
* The hostbridge/pciexrc information is not specified in the PRI of
* the existing sun4v platforms, the enumerator assumes there is only
* one hostbridge and its physical id is 0. It will create all the
* pciexrc nodes under the topo node hostbridge=0.
*/
static int
{
int i, rc;
char *s = NULL;
uint64_t x;
char platform[MAXNAMELEN];
/* find the pciex bus nodes */
listp);
if (nio <= 0) {
return (-1);
}
nrcs++;
}
if (nrcs == 0) {
return (-1);
}
platform[0] = '\0';
/*
* All existing sun4v platforms have only one hostdridge.
*/
continue;
/* bus address */
nrcs++;
continue;
}
/* Assign the physical id of the pciexrc */
else
nrcs++;
}
return (0);
}
/*
*/
int
{
int rc = -1;
}
if ((type & LDOM_TYPE_CONTROL) != 0) {
} else {
}
if (bufsiz <= 0) {
return (-1);
}
md_node_count(mdp) <= 0) {
return (-1);
}
return (rc);
}
void
{
int i;
return;
continue;
}
}