xref: /onnv-gate/usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_rcid.h (revision 5911:e87a3c39f152)
1*5911Svn83148 /*
2*5911Svn83148  * CDDL HEADER START
3*5911Svn83148  *
4*5911Svn83148  * The contents of this file are subject to the terms of the
5*5911Svn83148  * Common Development and Distribution License (the "License").
6*5911Svn83148  * You may not use this file except in compliance with the License.
7*5911Svn83148  *
8*5911Svn83148  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*5911Svn83148  * or http://www.opensolaris.org/os/licensing.
10*5911Svn83148  * See the License for the specific language governing permissions
11*5911Svn83148  * and limitations under the License.
12*5911Svn83148  *
13*5911Svn83148  * When distributing Covered Code, include this CDDL HEADER in each
14*5911Svn83148  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*5911Svn83148  * If applicable, add the following below this CDDL HEADER, with the
16*5911Svn83148  * fields enclosed by brackets "[]" replaced with your own identifying
17*5911Svn83148  * information: Portions Copyright [yyyy] [name of copyright owner]
18*5911Svn83148  *
19*5911Svn83148  * CDDL HEADER END
20*5911Svn83148  */
21*5911Svn83148 
22*5911Svn83148 /*
23*5911Svn83148  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24*5911Svn83148  * Use is subject to license terms.
25*5911Svn83148  */
26*5911Svn83148 
27*5911Svn83148 #ifndef _HB_RCID_H
28*5911Svn83148 #define	_HB_RCID_H
29*5911Svn83148 
30*5911Svn83148 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31*5911Svn83148 
32*5911Svn83148 #ifdef __cplusplus
33*5911Svn83148 extern "C" {
34*5911Svn83148 #endif
35*5911Svn83148 
36*5911Svn83148 /*
37*5911Svn83148  * Physical information of a root complex (pciexrc)
38*5911Svn83148  */
39*5911Svn83148 typedef struct prc {
40*5911Svn83148 	int id;				/* physical id of a rc */
41*5911Svn83148 	uint64_t ba;			/* bus address */
42*5911Svn83148 } prc_t;
43*5911Svn83148 
44*5911Svn83148 /*
45*5911Svn83148  * A list of rc per platform
46*5911Svn83148  */
47*5911Svn83148 typedef struct pprc {
48*5911Svn83148 	const char *platform;		/* platform on which the names apply */
49*5911Svn83148 	int nrcs;			/* number of pciexrc */
50*5911Svn83148 	struct prc *rcs;		/* array of pciexrc */
51*5911Svn83148 } pprc_t;
52*5911Svn83148 
53*5911Svn83148 /*
54*5911Svn83148  * A list of platforms
55*5911Svn83148  */
56*5911Svn83148 typedef struct pprcs {
57*5911Svn83148 	int nplats;			/* Number of platforms */
58*5911Svn83148 	struct pprc *plats;		/* Array of platforms */
59*5911Svn83148 } pprcs_t;
60*5911Svn83148 
61*5911Svn83148 extern int hb_find_rc_pid(char *platform, uint64_t ba);
62*5911Svn83148 
63*5911Svn83148 #ifdef __cplusplus
64*5911Svn83148 }
65*5911Svn83148 #endif
66*5911Svn83148 
67*5911Svn83148 #endif /* _HB_RCID_H */
68