xref: /titanic_50/usr/src/uts/sun4u/io/px/oberon_regs.h (revision ff3124eff995e6cd8ebd8c6543648e0670920034)
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 2007 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef _SYS_OBERON_REGS_H
27 #define	_SYS_OBERON_REGS_H
28 
29 #pragma ident	"%Z%%M%	%I%	%E% SMI"
30 
31 #ifdef	__cplusplus
32 extern "C" {
33 #endif
34 
35 
36 #define	UBC_ERROR_LOG_ENABLE			0x471000
37 #define	UBC_ERROR_STATUS_CLEAR			0x471018
38 #define	UBC_INTERRUPT_ENABLE			0x471008
39 #define	UBC_INTERRUPT_STATUS			0x471010
40 #define	UBC_INTERRUPT_STATUS_DMARDUEA_P		0
41 #define	UBC_INTERRUPT_STATUS_DMAWTUEA_P		1
42 #define	UBC_INTERRUPT_STATUS_MEMRDAXA_P		2
43 #define	UBC_INTERRUPT_STATUS_MEMWTAXA_P		3
44 #define	UBC_INTERRUPT_STATUS_DMARDUEB_P		8
45 #define	UBC_INTERRUPT_STATUS_DMAWTUEB_P		9
46 #define	UBC_INTERRUPT_STATUS_MEMRDAXB_P		10
47 #define	UBC_INTERRUPT_STATUS_MEMWTAXB_P		11
48 #define	UBC_INTERRUPT_STATUS_PIOWTUE_P		16
49 #define	UBC_INTERRUPT_STATUS_PIOWBEUE_P		17
50 #define	UBC_INTERRUPT_STATUS_PIORBEUE_P		18
51 #define	UBC_INTERRUPT_STATUS_DMARDUEA_S		32
52 #define	UBC_INTERRUPT_STATUS_DMAWTUEA_S		33
53 #define	UBC_INTERRUPT_STATUS_MEMRDAXA_S		34
54 #define	UBC_INTERRUPT_STATUS_MEMWTAXA_S		35
55 #define	UBC_INTERRUPT_STATUS_DMARDUEB_S		40
56 #define	UBC_INTERRUPT_STATUS_DMAWTUEB_S		41
57 #define	UBC_INTERRUPT_STATUS_MEMRDAXB_S		42
58 #define	UBC_INTERRUPT_STATUS_MEMWTAXB_S		43
59 #define	UBC_INTERRUPT_STATUS_PIOWTUE_S		48
60 #define	UBC_INTERRUPT_STATUS_PIOWBEUE_S		49
61 #define	UBC_INTERRUPT_STATUS_PIORBEUE_S		50
62 #define	UBC_ERROR_STATUS_SET			0x471020
63 #define	UBC_PERFORMANCE_COUNTER_SELECT		0x472000
64 #define	UBC_PERFORMANCE_COUNTER_ZERO		0x472008
65 #define	UBC_PERFORMANCE_COUNTER_ONE		0x472010
66 #define	UBC_PERFORMANCE_COUNTER_SEL_MASKS	0x3f3f
67 #define	UBC_MEMORY_UE_LOG			0x471028
68 #define	UBC_MEMORY_UE_LOG_EID			60
69 #define	UBC_MEMORY_UE_LOG_EID_MASK		0x3
70 #define	UBC_MEMORY_UE_LOG_MARKED		48
71 #define	UBC_MEMORY_UE_LOG_MARKED_MASK		0x3fff
72 #define	UBC_MARKED_MAX_CPUID_MASK		0x1ff
73 /*
74  * Class qualifiers on errors for which EID is valid.
75  */
76 #define	UBC_EID_MEM	0
77 #define	UBC_EID_CHANNEL	1
78 #define	UBC_EID_CPU	2
79 #define	UBC_EID_PATH	3
80 /*
81  * Mask within UBC_INTERRUPT_STATUS for Leaf-A errors
82  */
83 #define	UBC_INTERRUPT_STATUS_LEAFA	\
84 	((1UL << UBC_INTERRUPT_STATUS_DMARDUEA_P) |\
85 	(1UL << UBC_INTERRUPT_STATUS_DMAWTUEA_P) |\
86 	(1UL << UBC_INTERRUPT_STATUS_MEMRDAXA_P) |\
87 	(1UL << UBC_INTERRUPT_STATUS_MEMWTAXA_P) |\
88 	(1UL << UBC_INTERRUPT_STATUS_DMARDUEA_S) |\
89 	(1UL << UBC_INTERRUPT_STATUS_DMAWTUEA_S) |\
90 	(1UL << UBC_INTERRUPT_STATUS_MEMRDAXA_S) |\
91 	(1UL << UBC_INTERRUPT_STATUS_MEMWTAXA_S))
92 /*
93  * Mask within UBC_INTERRUPT_STATUS for Leaf-B errors
94  */
95 #define	UBC_INTERRUPT_STATUS_LEAFB	\
96 	((1UL << UBC_INTERRUPT_STATUS_DMARDUEB_P) |\
97 	(1UL << UBC_INTERRUPT_STATUS_DMAWTUEB_P) |\
98 	(1UL << UBC_INTERRUPT_STATUS_MEMRDAXB_P) |\
99 	(1UL << UBC_INTERRUPT_STATUS_MEMWTAXB_P) |\
100 	(1UL << UBC_INTERRUPT_STATUS_DMARDUEB_S) |\
101 	(1UL << UBC_INTERRUPT_STATUS_DMAWTUEB_S) |\
102 	(1UL << UBC_INTERRUPT_STATUS_MEMRDAXB_S) |\
103 	(1UL << UBC_INTERRUPT_STATUS_MEMWTAXB_S))
104 
105 #define	OBERON_UBC_ID_MAX		64
106 #define	OBERON_UBC_ID_IOC		0
107 #define	OBERON_UBC_ID_LSB		2
108 
109 #define	OBERON_PORT_ID_LEAF		0
110 #define	OBERON_PORT_ID_LEAF_MASK	0x1
111 #define	OBERON_PORT_ID_IOC		1
112 #define	OBERON_PORT_ID_IOC_MASK		0x03
113 #define	OBERON_PORT_ID_LSB		4
114 #define	OBERON_PORT_ID_LSB_MASK		0x0F
115 
116 /* values for OBERON_PORT_ID_LEAF field */
117 #define	OBERON_PORT_ID_LEAF_A		0
118 #define	OBERON_PORT_ID_LEAF_B		1
119 
120 #define	INTERRUPT_MAPPING_ENTRIES_T_DESTID	21
121 #define	INTERRUPT_MAPPING_ENTRIES_T_DESTID_MASK	0x3ff
122 
123 #define	OBERON_TLU_CONTROL_DRN_TR_DIS		35
124 #define	OBERON_TLU_CONTROL_CPLEP_DEN		34
125 #define	OBERON_TLU_CONTROL_ECRCCHK_DIS		33
126 #define	OBERON_TLU_CONTROL_ECRCGEN_DIS		32
127 
128 #define	TLU_SLOT_CAPABILITIES_HP		6
129 #define	TLU_SLOT_CAPABILITIES_HPSUP		5
130 #define	TLU_SLOT_CAPABILITIES_PWINDP		4
131 #define	TLU_SLOT_CAPABILITIES_ATINDP		3
132 #define	TLU_SLOT_CAPABILITIES_MRLSP		2
133 #define	TLU_SLOT_CAPABILITIES_PWCNTLP		1
134 #define	TLU_SLOT_CAPABILITIES_ATBTNP		0
135 
136 #define	DLU_INTERRUPT_MASK					0xe2048
137 #define	DLU_INTERRUPT_MASK_MSK_INTERRUPT_EN			31
138 #define	DLU_INTERRUPT_MASK_MSK_LINK_LAYER			5
139 #define	DLU_INTERRUPT_MASK_MSK_PHY_ERROR			4
140 #define	DLU_LINK_LAYER_CONFIG					0xe2200
141 #define	DLU_LINK_LAYER_CONFIG_VC0_EN				8
142 #define	DLU_LINK_LAYER_CONFIG_TLP_XMIT_FC_EN			3
143 #define	DLU_LINK_LAYER_CONFIG_FREQ_ACK_ENABLE			2
144 #define	DLU_LINK_LAYER_CONFIG_RETRY_DISABLE			1
145 #define	DLU_LINK_LAYER_STATUS					0xe2208
146 #define	DLU_LINK_LAYER_STATUS_LNK_STATE_MACH_STS_MASK		0x7
147 #define	DLU_LINK_LAYER_STATUS_LNK_STATE_MACH_STS_DL_INACTIVE	0x1
148 #define	DLU_LINK_LAYER_STATUS_LNK_STATE_MACH_STS_DL_INIT	0x2
149 #define	DLU_LINK_LAYER_STATUS_LNK_STATE_MACH_STS_DL_ACTIVE	0x4
150 #define	DLU_LINK_LAYER_STATUS_DLUP_STS				3
151 #define	DLU_LINK_LAYER_STATUS_INIT_FC_SM_STS			4
152 #define	DLU_LINK_LAYER_STATUS_INIT_FC_SM_STS_MASK		0x3
153 #define	DLU_LINK_LAYER_STATUS_INIT_FC_SM_STS_FC_IDLE		0x0
154 #define	DLU_LINK_LAYER_STATUS_INIT_FC_SM_STS_FC_INIT_1		0x1
155 #define	DLU_LINK_LAYER_STATUS_INIT_FC_SM_STS_FC_INIT_2		0x3
156 #define	DLU_LINK_LAYER_STATUS_INIT_FC_SM_STS_FC_INIT_DONE	0x2
157 #define	DLU_LINK_LAYER_INTERRUPT_AND_STATUS			0xe2210
158 #define	DLU_LINK_LAYER_INTERRUPT_AND_STATUS_INT_LINK_ERR_ACT	31
159 #define	DLU_LINK_LAYER_INTERRUPT_AND_STATUS_INT_PARABUS_PE	23
160 #define	DLU_LINK_LAYER_INTERRUPT_AND_STATUS_INT_UNSPRTD_DLLP	22
161 #define	DLU_LINK_LAYER_INTERRUPT_AND_STATUS_INT_SRC_ERR_TLP	17
162 #define	DLU_LINK_LAYER_INTERRUPT_MASK				0xe2220
163 #define	DLU_LINK_LAYER_INTERRUPT_MASK_MSK_LINK_ERR_ACT		31
164 #define	DLU_LINK_LAYER_INTERRUPT_MASK_MSK_PARABUS_PE		23
165 #define	DLU_LINK_LAYER_INTERRUPT_MASK_MSK_UNSPRTD_DLLP		22
166 #define	DLU_LINK_LAYER_INTERRUPT_MASK_MSK_SRC_ERR_TLP		17
167 #define	DLU_FLOW_CONTROL_UPDATE_CONTROL				0xe2240
168 #define	DLU_FLOW_CONTROL_UPDATE_CONTROL_FC0_U_C_EN		2
169 #define	DLU_FLOW_CONTROL_UPDATE_CONTROL_FC0_U_NP_EN		1
170 #define	DLU_FLOW_CONTROL_UPDATE_CONTROL_FC0_U_P_EN		0
171 #define	DLU_TXLINK_REPLAY_TIMER_THRESHOLD			0xe2410
172 #define	DLU_TXLINK_REPLAY_TIMER_THRESHOLD_RPLAY_TMR_THR		0
173 #define	DLU_TXLINK_REPLAY_TIMER_THRESHOLD_RPLAY_TMR_THR_MASK	0xfffff
174 #define	DLU_TXLINK_REPLAY_TIMER_THRESHOLD_DEFAULT		0xc9
175 #define	DLU_PORT_CONTROL					0xe2b00
176 #define	DLU_PORT_CONTROL_CK_EN					0
177 #define	DLU_PORT_STATUS						0xe2b08
178 
179 #define	MMU_INTERRUPT_STATUS_TTC_DUE_P				8
180 #define	MMU_INTERRUPT_STATUS_TTC_DUE_S				40
181 #define	ILU_INTERRUPT_STATUS_IHB_UE_P				4
182 #define	ILU_INTERRUPT_STATUS_IHB_UE_S				36
183 #define	TLU_UNCORRECTABLE_ERROR_STATUS_CLEAR_ECRC_P		19
184 #define	TLU_UNCORRECTABLE_ERROR_STATUS_CLEAR_ECRC_S		51
185 #define	TLU_UNCORRECTABLE_ERROR_STATUS_CLEAR_POIS_P		12
186 #define	TLU_UNCORRECTABLE_ERROR_STATUS_CLEAR_POIS_S		44
187 #define	TLU_OTHER_EVENT_STATUS_CLEAR_EIUE_P			0
188 #define	TLU_OTHER_EVENT_STATUS_CLEAR_EIUE_S			32
189 #define	TLU_OTHER_EVENT_STATUS_CLEAR_ERBUE_P			1
190 #define	TLU_OTHER_EVENT_STATUS_CLEAR_ERBUE_S			33
191 #define	TLU_OTHER_EVENT_STATUS_CLEAR_TLUEITMO_P			7
192 #define	TLU_OTHER_EVENT_STATUS_CLEAR_TLUEITMO_S			39
193 #define	TLU_OTHER_EVENT_STATUS_CLEAR_EHBUE_P			12
194 #define	TLU_OTHER_EVENT_STATUS_CLEAR_EHBUE_S			44
195 #define	TLU_OTHER_EVENT_STATUS_CLEAR_EDBUE_P			12
196 #define	TLU_OTHER_EVENT_STATUS_CLEAR_EDBUE_S			44
197 
198 #define	TLU_CONTROL_DRN_TR_DIS					35
199 
200 #define	TLU_SLOT_CONTROL					0x90038
201 #define	TLU_SLOT_CONTROL_PWFDEN					1
202 #define	TLU_SLOT_STATUS						0x90040
203 #define	TLU_SLOT_STATUS_PSD					6
204 #define	TLU_SLOT_STATUS_MRLS					5
205 #define	TLU_SLOT_STATUS_CMDCPLT					4
206 #define	TLU_SLOT_STATUS_PSDC					3
207 #define	TLU_SLOT_STATUS_MRLC					2
208 #define	TLU_SLOT_STATUS_PWFD					1
209 #define	TLU_SLOT_STATUS_ABTN					0
210 
211 #define	FLP_PORT_LINK_CONTROL					0xe5008
212 #define	FLP_PORT_LINK_CONTROL_RETRAIN				5
213 
214 #define	FLP_PORT_CONTROL					0xe5200
215 #define	FLP_PORT_CONTROL_PORT_DIS				0
216 
217 #define	FLP_PORT_ACTIVE_STATUS					0xe5240
218 #define	FLP_PORT_ACTIVE_STATUS_TRAIN_ERROR			1
219 
220 #define	HOTPLUG_CONTROL						0x88000
221 #define	HOTPLUG_CONTROL_SLOTPON					3
222 #define	HOTPLUG_CONTROL_PWREN					2
223 #define	HOTPLUG_CONTROL_CLKEN					1
224 #define	HOTPLUG_CONTROL_N_PERST					0
225 
226 #define	DRAIN_CONTROL_STATUS					0x51100
227 #define	DRAIN_CONTROL_STATUS_DRAIN				0
228 
229 #define	PX_PCIEHP_PIL (LOCK_LEVEL - 1)
230 #ifdef	__cplusplus
231 }
232 #endif
233 
234 #endif	/* _SYS_OBERON_REGS_H */
235