xref: /onnv-gate/usr/src/lib/fm/topo/modules/common/hostbridge/hostbridge.h (revision 10187:ad62e2dfbe0c)
13062Scindi /*
23062Scindi  * CDDL HEADER START
33062Scindi  *
43062Scindi  * The contents of this file are subject to the terms of the
53062Scindi  * Common Development and Distribution License (the "License").
63062Scindi  * You may not use this file except in compliance with the License.
73062Scindi  *
83062Scindi  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
93062Scindi  * or http://www.opensolaris.org/os/licensing.
103062Scindi  * See the License for the specific language governing permissions
113062Scindi  * and limitations under the License.
123062Scindi  *
133062Scindi  * When distributing Covered Code, include this CDDL HEADER in each
143062Scindi  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
153062Scindi  * If applicable, add the following below this CDDL HEADER, with the
163062Scindi  * fields enclosed by brackets "[]" replaced with your own identifying
173062Scindi  * information: Portions Copyright [yyyy] [name of copyright owner]
183062Scindi  *
193062Scindi  * CDDL HEADER END
203062Scindi  */
213062Scindi 
223062Scindi /*
23*10187SKrishna.Elango@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
243062Scindi  * Use is subject to license terms.
253062Scindi  */
263062Scindi 
273062Scindi #ifndef _HOSTBRIDGE_H
283062Scindi #define	_HOSTBRIDGE_H
293062Scindi 
303062Scindi #include <libdevinfo.h>
313062Scindi 
323062Scindi #ifdef __cplusplus
333062Scindi extern "C" {
343062Scindi #endif
353062Scindi 
363062Scindi #define	HB_ENUMR_VERS	1
373062Scindi 
383062Scindi #define	MAX_HBS	255
393062Scindi 
403062Scindi /*
413062Scindi  * Solaris Drivers for hostbridge ASICs.
423062Scindi  */
433062Scindi #define	SCHIZO		"pcisch"
443062Scindi #define	PSYCHO		"pcipsy"
453062Scindi #define	NPE		"npe"
46*10187SKrishna.Elango@Sun.COM #define	PCIEB		"pcieb"
473062Scindi #define	PCI_PCI		"pci_pci"
483062Scindi #define	PCI		"pci"
493062Scindi #define	PX		"px"
503062Scindi 
513062Scindi /*
523062Scindi  * These #defines are special values of bus and root complex instance
533062Scindi  * numbers, used in calls to did_create().  They're here because it's
543062Scindi  * the hostbridge enumerator that generally establishes the did_t values
553062Scindi  * at the top level.
563062Scindi  */
573062Scindi #define	TRUST_BDF	(-1)	/* Believe the bus value in the reg property */
583062Scindi #define	NO_RC		(-2)	/* Not a pci-express bus, so no root complex */
593062Scindi 
603062Scindi /*
613062Scindi  * PCI-express bridges to PCI, root complex instance is set to
623062Scindi  * (instance of the PCI-express side root complex - TO_PCI)
633062Scindi  */
643062Scindi #define	TO_PCI		(1000)
653062Scindi 
663062Scindi extern tnode_t *pcihostbridge_declare(topo_mod_t *, tnode_t *, di_node_t,
673062Scindi     topo_instance_t);
683062Scindi extern tnode_t *pciexhostbridge_declare(topo_mod_t *, tnode_t *, di_node_t,
693062Scindi     topo_instance_t);
703062Scindi extern tnode_t *pciexrc_declare(topo_mod_t *, tnode_t *, di_node_t,
713062Scindi     topo_instance_t);
723062Scindi 
733062Scindi #ifdef __cplusplus
743062Scindi }
753062Scindi #endif
763062Scindi 
773062Scindi #endif /* _HOSTBRIDGE_H */
78