/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* sun4v root nexus driver
*/
#include <sys/ddi_subrdefs.h>
/* Useful debugging Stuff */
#include <sys/nexusdebug.h>
extern uint_t root_phys_addr_lo_mask;
};
/*
* config information
*/
int
int
int
/*
* rootnex_add_intr_impl:
*/
/*ARGSUSED*/
int
{
return (i_ddi_add_ivintr(hdlp));
}
/*
* rootnex_remove_intr_impl:
*/
/*ARGSUSED*/
int
{
return (DDI_SUCCESS);
}
/*
* rootnex_get_intr_pri:
*/
/*ARGSUSED*/
int
{
}
int
{
char *p = buf;
p += strlen(p);
if (sparc_pd_getnreg(dev) > 0) {
(void) strcpy(p, ": ");
p += strlen(p);
p += strlen(p);
}
/*
* This is where we need to print out the interrupt specifications
* for the FFB device and any UPA add-on devices. Not sure how to
* do this yet?
*/
return (DDI_SUCCESS);
}
int
{
extern uint_t root_phys_addr_lo_mask;
extern void make_ddi_ppd(
dev_info_t *, struct ddi_parent_private_data **);
/*
* Fill in parent-private data and this function returns to us
* an indication if it used "registers" to fill in the data.
*/
}
/*
* No reg property, return null string as address (e.g. pseudo)
*/
name[0] = '\0';
if (sparc_pd_getnreg(child) == 0) {
return (DDI_SUCCESS);
}
/*
* Name node on behalf of child nexus.
*/
return (DDI_SUCCESS);
}
/*
* On sun4v, the 'name' of a root node device depends upon
* the first reg property, which contains two 32-bit address
* cells as follows:
*
* bit# 63-32: ssss.hhhh.hhhh.hhhh.hhhh.hhhh.hhhh.hhhh
* bit# 31-00: llll.llll.llll.llll.llll.llll.llll.llll
*
* where 'ssss' defines the address type and naming convention
* as follows:
*
* 0000 -> cacheable address space
* foo@m<high-addr>[,<low-addr>]
* 1000 -> non-cacheable IO address space
* foo@i<high-addr>[,<low-addr>]
* 1100 -> non-cacheable configuration address space
* foo@<high-addr>
*
* where <hish-addr> is hex-ASCII reprensation of the hh...hh
* bits and <low-addr> is hex-ASCII represenation of the
* ll...ll bits.
*
* Note that the leading zeros are omitted here. Also, if the
* <low-addr> bits are zero, then the trailing component is
* omitted as well.
*/
else
return (DDI_SUCCESS);
}
int
{
/* Name the child */
/*
* Try to merge .conf node. If merge is successful, return
* DDI_FAILURE to allow caller to remove this node.
*/
if (ndi_dev_is_persistent_node(dip) == 0 &&
(void) rootnex_ctl_uninitchild(dip);
return (DDI_FAILURE);
}
/*
* If there are no "reg"s in the child node, return.
*/
return (DDI_SUCCESS);
return (DDI_SUCCESS);
}
/*ARGSUSED*/
void
{
}