xref: /illumos-gate/usr/src/lib/libprtdiag_psr/sparc/ontario/common/erie.h (revision 1da57d551424de5a9d469760be7c4b4d4f10a755)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 /*
27  * Sun4v Platform header file.
28  *
29  * 	called when :
30  *      machine_type ==  erie
31  *
32  */
33 
34 #ifndef _ERIE_H
35 #define	_ERIE_H
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 #define	ERIE_PLATFORM			"SUNW,Sun-Fire-T1000"
42 #define	ERIE_PLATFORM2			"SUNW,SPARC-Enterprise-T1000"
43 #define	ERIE_PCIE_COMP			8
44 #define	ERIE_PCIX_COMP			20
45 #define	NO_SLOT 			-1
46 #define	NET_COMP_NUM			3
47 #define	IOBOARD				"IOBD"
48 #define	MOTHERBOARD			"MB"
49 #define	OPHIR				"GBE"
50 #define	NETWORK				"network"
51 #define	ERIE_NETWORK_0			"/pci@7c0/pci@0/network@4"
52 #define	ERIE_NETWORK_1			"/pci@7c0/pci@0/network@4,1"
53 #define	ERIE_NETWORK_2			"/pci@7c0/pci@0/pci@8/network@1"
54 #define	ERIE_NETWORK_3			"/pci@7c0/pci@0/pci@8/network@1,1"
55 #define	PCIX_BUS			"/pci@7c0/pci@0/pci@8"
56 #define	PCIE_PCIX			"/pci@7c0/pci@0/pci@8"
57 #define	PCIE_PCIE			"/pci@7c0/pci@0"
58 #define	ERIE_LSI_PATH			"/pci@7c0/pci@0/pci@8/scsi@2"
59 #define	FIRE0   			"/pci@780"
60 #define	FIRE1   			"/pci@7c0"
61 #define	IOBRIDGE			"IO-BRIDGE"
62 #define	PCI_BRIDGE			"PCI-BRIDGE"
63 #define	SAS_SATA_HBA			"SAS-SATA-HBA"
64 
65 
66 
67 /*
68  * Property names
69  */
70 #define	OBP_PROP_REG			"reg"
71 #define	OBP_PROP_CLOCK_FREQ		"clock-frequency"
72 #define	OBP_PROP_BOARD_NUM		"board#"
73 #define	OBP_PROP_REVISION_ID		"revision-id"
74 #define	OBP_PROP_VERSION_NUM		"version#"
75 #define	OBP_PROP_BOARD_TYPE		"board_type"
76 #define	OBP_PROP_ECACHE_SIZE		"ecache-size"
77 #define	OBP_PROP_IMPLEMENTATION		"implementation#"
78 #define	OBP_PROP_MASK			"mask#"
79 #define	OBP_PROP_COMPATIBLE		"compatible"
80 #define	OBP_PROP_BANNER_NAME		"banner-name"
81 #define	OBP_PROP_MODEL			"model"
82 #define	OBP_PROP_66MHZ_CAPABLE		"66mhz-capable"
83 #define	OBP_PROP_FBC_REG_ID		"fbc_reg_id"
84 #define	OBP_PROP_VERSION		"version"
85 #define	OBP_PROP_INSTANCE		"instance"
86 
87 /*
88  * Function Headers
89  */
90 
91 
92 /* local functions */
93 
94 int erie_pci_callback(picl_nodehdl_t pcih, void *args);
95 int erie_hw_rev_callback(picl_nodehdl_t pcih, void *args);
96 int erie_get_first_compatible_value(picl_nodehdl_t nodeh,
97     char **outbuf);
98 int64_t erie_get_int_propval(picl_nodehdl_t modh, char *prop_name,
99     int *ret);
100 void erie_get_bus_type(char path[], char bus_type[]);
101 void erie_get_nac(char bus_type[], char path[], int s,
102     char name[],  char loc[], int size);
103 int erie_get_slot_number(char path[]);
104 int erie_get_network_instance(char path[]);
105 int erie_get_name(picl_nodehdl_t nodeh, char name[], int size);
106 int erie_get_model(picl_nodehdl_t nodeh, char model[], int size);
107 int erie_get_path(picl_nodehdl_t nodeh, char path[], int size);
108 int erie_get_class(picl_nodehdl_t nodeh, char piclclass[], int size);
109 #ifdef __cplusplus
110 }
111 #endif
112 
113 #endif /* _ERIE_H */
114