1*eb00b1c8SRobert Mustacchi /*
2*eb00b1c8SRobert Mustacchi  * This file and its contents are supplied under the terms of the
3*eb00b1c8SRobert Mustacchi  * Common Development and Distribution License ("CDDL"), version 1.0.
4*eb00b1c8SRobert Mustacchi  * You may only use this file in accordance with the terms of version
5*eb00b1c8SRobert Mustacchi  * 1.0 of the CDDL.
6*eb00b1c8SRobert Mustacchi  *
7*eb00b1c8SRobert Mustacchi  * A full copy of the text of the CDDL should have accompanied this
8*eb00b1c8SRobert Mustacchi  * source.  A copy of the CDDL is also available via the Internet at
9*eb00b1c8SRobert Mustacchi  * http://www.illumos.org/license/CDDL.
10*eb00b1c8SRobert Mustacchi  */
11*eb00b1c8SRobert Mustacchi 
12*eb00b1c8SRobert Mustacchi /*
13*eb00b1c8SRobert Mustacchi  * Copyright 2019 Joyent, Inc.
14*eb00b1c8SRobert Mustacchi  */
15*eb00b1c8SRobert Mustacchi 
16*eb00b1c8SRobert Mustacchi #include "imc_test.h"
17*eb00b1c8SRobert Mustacchi 
18*eb00b1c8SRobert Mustacchi /*
19*eb00b1c8SRobert Mustacchi  * This file tests several different miscellaneous failure modes by using
20*eb00b1c8SRobert Mustacchi  * incomplete imc_t and imc_t with bad data.
21*eb00b1c8SRobert Mustacchi  */
22*eb00b1c8SRobert Mustacchi 
23*eb00b1c8SRobert Mustacchi /*
24*eb00b1c8SRobert Mustacchi  * This IMC is a nominally valid IMC; however, it has flags indicate that the
25*eb00b1c8SRobert Mustacchi  * socket has bad data.
26*eb00b1c8SRobert Mustacchi  */
27*eb00b1c8SRobert Mustacchi static const imc_t imc_badsock = {
28*eb00b1c8SRobert Mustacchi 	.imc_gen = IMC_GEN_SANDY,
29*eb00b1c8SRobert Mustacchi 	.imc_nsockets = 1,
30*eb00b1c8SRobert Mustacchi 	.imc_sockets[0] = {
31*eb00b1c8SRobert Mustacchi 		.isock_valid = IMC_SOCKET_V_BAD_NODEID,
32*eb00b1c8SRobert Mustacchi 		.isock_sad = {
33*eb00b1c8SRobert Mustacchi 			.isad_flags = 0,
34*eb00b1c8SRobert Mustacchi 			.isad_valid = IMC_SAD_V_VALID,
35*eb00b1c8SRobert Mustacchi 			.isad_tolm = 0x80000000,	/* 2 GiB */
36*eb00b1c8SRobert Mustacchi 			.isad_tohm = 0x280000000ULL,	/* 10 GiB */
37*eb00b1c8SRobert Mustacchi 			.isad_nrules = 10,
38*eb00b1c8SRobert Mustacchi 			.isad_rules[0] = {
39*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
40*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x80000000,
41*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
42*eb00b1c8SRobert Mustacchi 				.isr_ntargets = IMC_MAX_SAD_INTERLEAVE,
43*eb00b1c8SRobert Mustacchi 				.isr_targets = { 0, 0, 0, 0, 0, 0, 0, 0 }
44*eb00b1c8SRobert Mustacchi 			},
45*eb00b1c8SRobert Mustacchi 			.isad_rules[1] = {
46*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
47*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x280000000ULL,
48*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
49*eb00b1c8SRobert Mustacchi 				.isr_ntargets = IMC_MAX_SAD_INTERLEAVE,
50*eb00b1c8SRobert Mustacchi 				.isr_targets = { 0, 0, 0, 0, 0, 0, 0, 0 }
51*eb00b1c8SRobert Mustacchi 			}
52*eb00b1c8SRobert Mustacchi 		},
53*eb00b1c8SRobert Mustacchi 		.isock_ntad = 1,
54*eb00b1c8SRobert Mustacchi 		.isock_tad[0] = {
55*eb00b1c8SRobert Mustacchi 			.itad_flags = 0,
56*eb00b1c8SRobert Mustacchi 			.itad_nrules = 12,
57*eb00b1c8SRobert Mustacchi 			.itad_rules[0] = {
58*eb00b1c8SRobert Mustacchi 				.itr_base = 0x0,
59*eb00b1c8SRobert Mustacchi 				.itr_limit = 0x80000000,
60*eb00b1c8SRobert Mustacchi 				.itr_sock_way = 1,
61*eb00b1c8SRobert Mustacchi 				.itr_chan_way = 1,
62*eb00b1c8SRobert Mustacchi 				.itr_sock_gran = IMC_TAD_GRAN_64B,
63*eb00b1c8SRobert Mustacchi 				.itr_chan_gran = IMC_TAD_GRAN_64B,
64*eb00b1c8SRobert Mustacchi 				.itr_ntargets = 4,
65*eb00b1c8SRobert Mustacchi 				.itr_targets = { 0, 0, 0, 0 }
66*eb00b1c8SRobert Mustacchi 			},
67*eb00b1c8SRobert Mustacchi 			.itad_rules[1] = {
68*eb00b1c8SRobert Mustacchi 				.itr_base = 0x80000000,
69*eb00b1c8SRobert Mustacchi 				.itr_limit = 0x280000000ULL,
70*eb00b1c8SRobert Mustacchi 				.itr_sock_way = 1,
71*eb00b1c8SRobert Mustacchi 				.itr_chan_way = 1,
72*eb00b1c8SRobert Mustacchi 				.itr_sock_gran = IMC_TAD_GRAN_64B,
73*eb00b1c8SRobert Mustacchi 				.itr_chan_gran = IMC_TAD_GRAN_64B,
74*eb00b1c8SRobert Mustacchi 				.itr_ntargets = 4,
75*eb00b1c8SRobert Mustacchi 				.itr_targets = { 0, 0, 0, 0 }
76*eb00b1c8SRobert Mustacchi 			}
77*eb00b1c8SRobert Mustacchi 		},
78*eb00b1c8SRobert Mustacchi 		.isock_nimc = 1,
79*eb00b1c8SRobert Mustacchi 		.isock_imcs[0] = {
80*eb00b1c8SRobert Mustacchi 			.icn_nchannels = 1,
81*eb00b1c8SRobert Mustacchi 			.icn_dimm_type = IMC_DIMM_DDR3,
82*eb00b1c8SRobert Mustacchi 			.icn_ecc = B_TRUE,
83*eb00b1c8SRobert Mustacchi 			.icn_lockstep = B_FALSE,
84*eb00b1c8SRobert Mustacchi 			.icn_closed = B_FALSE,
85*eb00b1c8SRobert Mustacchi 			.icn_channels[0] = {
86*eb00b1c8SRobert Mustacchi 				.ich_ndimms = 1,
87*eb00b1c8SRobert Mustacchi 				.ich_dimms[0] = {
88*eb00b1c8SRobert Mustacchi 					.idimm_present = B_TRUE,
89*eb00b1c8SRobert Mustacchi 					.idimm_nbanks = 3,
90*eb00b1c8SRobert Mustacchi 					.idimm_width = 8,
91*eb00b1c8SRobert Mustacchi 					.idimm_density = 2,
92*eb00b1c8SRobert Mustacchi 					.idimm_nranks = 2,
93*eb00b1c8SRobert Mustacchi 					.idimm_nrows = 14,
94*eb00b1c8SRobert Mustacchi 					.idimm_ncolumns = 10,
95*eb00b1c8SRobert Mustacchi 					.idimm_size = 0x80000000
96*eb00b1c8SRobert Mustacchi 				},
97*eb00b1c8SRobert Mustacchi 				.ich_ntad_offsets = 12,
98*eb00b1c8SRobert Mustacchi 				.ich_tad_offsets = { 0, 0x80000000, 0, 0, 0, 0,
99*eb00b1c8SRobert Mustacchi 				    0, 0, 0, 0, 0 },
100*eb00b1c8SRobert Mustacchi 				.ich_nrankileaves = 8,
101*eb00b1c8SRobert Mustacchi 				.ich_rankileaves[0] = {
102*eb00b1c8SRobert Mustacchi 					.irle_enabled = B_TRUE,
103*eb00b1c8SRobert Mustacchi 					.irle_nways = 2,
104*eb00b1c8SRobert Mustacchi 					.irle_nwaysbits = 1,
105*eb00b1c8SRobert Mustacchi 					.irle_limit = 0x200000000ULL,
106*eb00b1c8SRobert Mustacchi 					.irle_nentries = 5,
107*eb00b1c8SRobert Mustacchi 					.irle_entries[0] = { 0x0, 0x0 },
108*eb00b1c8SRobert Mustacchi 					.irle_entries[1] = { 0x1, 0x0 }
109*eb00b1c8SRobert Mustacchi 				}
110*eb00b1c8SRobert Mustacchi 			}
111*eb00b1c8SRobert Mustacchi 		}
112*eb00b1c8SRobert Mustacchi 	}
113*eb00b1c8SRobert Mustacchi };
114*eb00b1c8SRobert Mustacchi 
115*eb00b1c8SRobert Mustacchi static const imc_t imc_invalid_sad = {
116*eb00b1c8SRobert Mustacchi 	.imc_gen = IMC_GEN_SANDY,
117*eb00b1c8SRobert Mustacchi 	.imc_nsockets = 1,
118*eb00b1c8SRobert Mustacchi 	.imc_sockets[0] = {
119*eb00b1c8SRobert Mustacchi 		.isock_valid = 0,
120*eb00b1c8SRobert Mustacchi 		.isock_sad = {
121*eb00b1c8SRobert Mustacchi 			.isad_flags = 0,
122*eb00b1c8SRobert Mustacchi 			.isad_valid = IMC_SAD_V_BAD_DRAM_ATTR,
123*eb00b1c8SRobert Mustacchi 			.isad_tolm = 0x80000000,	/* 2 GiB */
124*eb00b1c8SRobert Mustacchi 			.isad_tohm = 0x280000000ULL,	/* 10 GiB */
125*eb00b1c8SRobert Mustacchi 			.isad_nrules = 10,
126*eb00b1c8SRobert Mustacchi 			.isad_rules[0] = {
127*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
128*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x80000000,
129*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
130*eb00b1c8SRobert Mustacchi 				.isr_ntargets = IMC_MAX_SAD_INTERLEAVE,
131*eb00b1c8SRobert Mustacchi 				.isr_targets = { 0, 0, 0, 0, 0, 0, 0, 0 }
132*eb00b1c8SRobert Mustacchi 			},
133*eb00b1c8SRobert Mustacchi 			.isad_rules[1] = {
134*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
135*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x280000000ULL,
136*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
137*eb00b1c8SRobert Mustacchi 				.isr_ntargets = IMC_MAX_SAD_INTERLEAVE,
138*eb00b1c8SRobert Mustacchi 				.isr_targets = { 0, 0, 0, 0, 0, 0, 0, 0 }
139*eb00b1c8SRobert Mustacchi 			}
140*eb00b1c8SRobert Mustacchi 		}
141*eb00b1c8SRobert Mustacchi 	}
142*eb00b1c8SRobert Mustacchi };
143*eb00b1c8SRobert Mustacchi 
144*eb00b1c8SRobert Mustacchi static const imc_t imc_invalid_sad_rule = {
145*eb00b1c8SRobert Mustacchi 	.imc_gen = IMC_GEN_SANDY,
146*eb00b1c8SRobert Mustacchi 	.imc_nsockets = 1,
147*eb00b1c8SRobert Mustacchi 	.imc_sockets[0] = {
148*eb00b1c8SRobert Mustacchi 		.isock_valid = 0,
149*eb00b1c8SRobert Mustacchi 		.isock_sad = {
150*eb00b1c8SRobert Mustacchi 			.isad_flags = 0,
151*eb00b1c8SRobert Mustacchi 			.isad_valid = IMC_SAD_V_VALID,
152*eb00b1c8SRobert Mustacchi 			.isad_tolm = 0x80000000,	/* 2 GiB */
153*eb00b1c8SRobert Mustacchi 			.isad_tohm = 0x280000000ULL,	/* 10 GiB */
154*eb00b1c8SRobert Mustacchi 			.isad_nrules = 10,
155*eb00b1c8SRobert Mustacchi 			.isad_rules[0] = {
156*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
157*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x34,
158*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
159*eb00b1c8SRobert Mustacchi 				.isr_ntargets = IMC_MAX_SAD_INTERLEAVE,
160*eb00b1c8SRobert Mustacchi 				.isr_targets = { 0, 0, 0, 0, 0, 0, 0, 0 }
161*eb00b1c8SRobert Mustacchi 			},
162*eb00b1c8SRobert Mustacchi 			.isad_rules[1] = {
163*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
164*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x42,
165*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
166*eb00b1c8SRobert Mustacchi 				.isr_ntargets = IMC_MAX_SAD_INTERLEAVE,
167*eb00b1c8SRobert Mustacchi 				.isr_targets = { 0, 0, 0, 0, 0, 0, 0, 0 }
168*eb00b1c8SRobert Mustacchi 			}
169*eb00b1c8SRobert Mustacchi 		}
170*eb00b1c8SRobert Mustacchi 	}
171*eb00b1c8SRobert Mustacchi };
172*eb00b1c8SRobert Mustacchi 
173*eb00b1c8SRobert Mustacchi static const imc_t imc_invalid_sad_interleave = {
174*eb00b1c8SRobert Mustacchi 	.imc_gen = IMC_GEN_SANDY,
175*eb00b1c8SRobert Mustacchi 	.imc_nsockets = 1,
176*eb00b1c8SRobert Mustacchi 	.imc_sockets[0] = {
177*eb00b1c8SRobert Mustacchi 		.isock_valid = 0,
178*eb00b1c8SRobert Mustacchi 		.isock_sad = {
179*eb00b1c8SRobert Mustacchi 			.isad_flags = 0,
180*eb00b1c8SRobert Mustacchi 			.isad_valid = IMC_SAD_V_VALID,
181*eb00b1c8SRobert Mustacchi 			.isad_tolm = 0x80000000,	/* 2 GiB */
182*eb00b1c8SRobert Mustacchi 			.isad_tohm = 0x280000000ULL,	/* 10 GiB */
183*eb00b1c8SRobert Mustacchi 			.isad_nrules = 10,
184*eb00b1c8SRobert Mustacchi 			.isad_rules[0] = {
185*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
186*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x80000000,
187*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
188*eb00b1c8SRobert Mustacchi 				.isr_ntargets = 0
189*eb00b1c8SRobert Mustacchi 			},
190*eb00b1c8SRobert Mustacchi 			.isad_rules[1] = {
191*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
192*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x280000000ULL,
193*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
194*eb00b1c8SRobert Mustacchi 				.isr_ntargets = 0
195*eb00b1c8SRobert Mustacchi 			}
196*eb00b1c8SRobert Mustacchi 		}
197*eb00b1c8SRobert Mustacchi 	}
198*eb00b1c8SRobert Mustacchi };
199*eb00b1c8SRobert Mustacchi 
200*eb00b1c8SRobert Mustacchi static const imc_t imc_invalid_sad_target = {
201*eb00b1c8SRobert Mustacchi 	.imc_gen = IMC_GEN_SANDY,
202*eb00b1c8SRobert Mustacchi 	.imc_nsockets = 1,
203*eb00b1c8SRobert Mustacchi 	.imc_sockets[0] = {
204*eb00b1c8SRobert Mustacchi 		.isock_valid = 0,
205*eb00b1c8SRobert Mustacchi 		.isock_sad = {
206*eb00b1c8SRobert Mustacchi 			.isad_flags = 0,
207*eb00b1c8SRobert Mustacchi 			.isad_valid = IMC_SAD_V_VALID,
208*eb00b1c8SRobert Mustacchi 			.isad_tolm = 0x80000000,	/* 2 GiB */
209*eb00b1c8SRobert Mustacchi 			.isad_tohm = 0x280000000ULL,	/* 10 GiB */
210*eb00b1c8SRobert Mustacchi 			.isad_nrules = 10,
211*eb00b1c8SRobert Mustacchi 			.isad_rules[0] = {
212*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
213*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x80000000,
214*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
215*eb00b1c8SRobert Mustacchi 				.isr_ntargets = IMC_MAX_SAD_INTERLEAVE,
216*eb00b1c8SRobert Mustacchi 				.isr_targets = { 9, 9, 9, 9, 9, 9, 9, 9 }
217*eb00b1c8SRobert Mustacchi 			},
218*eb00b1c8SRobert Mustacchi 			.isad_rules[1] = {
219*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
220*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x280000000ULL,
221*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
222*eb00b1c8SRobert Mustacchi 				.isr_ntargets = IMC_MAX_SAD_INTERLEAVE,
223*eb00b1c8SRobert Mustacchi 				.isr_targets = { 0, 0, 0, 0, 0, 0, 0, 0 }
224*eb00b1c8SRobert Mustacchi 			}
225*eb00b1c8SRobert Mustacchi 		}
226*eb00b1c8SRobert Mustacchi 	}
227*eb00b1c8SRobert Mustacchi };
228*eb00b1c8SRobert Mustacchi 
229*eb00b1c8SRobert Mustacchi static const imc_t imc_bad_tad_rule = {
230*eb00b1c8SRobert Mustacchi 	.imc_gen = IMC_GEN_SANDY,
231*eb00b1c8SRobert Mustacchi 	.imc_nsockets = 1,
232*eb00b1c8SRobert Mustacchi 	.imc_sockets[0] = {
233*eb00b1c8SRobert Mustacchi 		.isock_valid = IMC_SOCKET_V_VALID,
234*eb00b1c8SRobert Mustacchi 		.isock_sad = {
235*eb00b1c8SRobert Mustacchi 			.isad_flags = 0,
236*eb00b1c8SRobert Mustacchi 			.isad_valid = IMC_SAD_V_VALID,
237*eb00b1c8SRobert Mustacchi 			.isad_tolm = 0x80000000,	/* 2 GiB */
238*eb00b1c8SRobert Mustacchi 			.isad_tohm = 0x280000000ULL,	/* 10 GiB */
239*eb00b1c8SRobert Mustacchi 			.isad_nrules = 10,
240*eb00b1c8SRobert Mustacchi 			.isad_rules[0] = {
241*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
242*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x80000000,
243*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
244*eb00b1c8SRobert Mustacchi 				.isr_ntargets = IMC_MAX_SAD_INTERLEAVE,
245*eb00b1c8SRobert Mustacchi 				.isr_targets = { 0, 0, 0, 0, 0, 0, 0, 0 }
246*eb00b1c8SRobert Mustacchi 			},
247*eb00b1c8SRobert Mustacchi 			.isad_rules[1] = {
248*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
249*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x280000000ULL,
250*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
251*eb00b1c8SRobert Mustacchi 				.isr_ntargets = IMC_MAX_SAD_INTERLEAVE,
252*eb00b1c8SRobert Mustacchi 				.isr_targets = { 0, 0, 0, 0, 0, 0, 0, 0 }
253*eb00b1c8SRobert Mustacchi 			}
254*eb00b1c8SRobert Mustacchi 		},
255*eb00b1c8SRobert Mustacchi 		.isock_ntad = 1,
256*eb00b1c8SRobert Mustacchi 		.isock_tad[0] = {
257*eb00b1c8SRobert Mustacchi 			.itad_flags = 0,
258*eb00b1c8SRobert Mustacchi 			.itad_nrules = 12,
259*eb00b1c8SRobert Mustacchi 			.itad_rules[0] = {
260*eb00b1c8SRobert Mustacchi 				.itr_base = 0x0,
261*eb00b1c8SRobert Mustacchi 				.itr_limit = 0x2,
262*eb00b1c8SRobert Mustacchi 				.itr_sock_way = 1,
263*eb00b1c8SRobert Mustacchi 				.itr_chan_way = 1,
264*eb00b1c8SRobert Mustacchi 				.itr_sock_gran = IMC_TAD_GRAN_64B,
265*eb00b1c8SRobert Mustacchi 				.itr_chan_gran = IMC_TAD_GRAN_64B,
266*eb00b1c8SRobert Mustacchi 				.itr_ntargets = 4,
267*eb00b1c8SRobert Mustacchi 				.itr_targets = { 0, 0, 0, 0 }
268*eb00b1c8SRobert Mustacchi 			},
269*eb00b1c8SRobert Mustacchi 			.itad_rules[1] = {
270*eb00b1c8SRobert Mustacchi 				.itr_base = 0x277777777ULL,
271*eb00b1c8SRobert Mustacchi 				.itr_limit = 0x280000000ULL,
272*eb00b1c8SRobert Mustacchi 				.itr_sock_way = 1,
273*eb00b1c8SRobert Mustacchi 				.itr_chan_way = 1,
274*eb00b1c8SRobert Mustacchi 				.itr_sock_gran = IMC_TAD_GRAN_64B,
275*eb00b1c8SRobert Mustacchi 				.itr_chan_gran = IMC_TAD_GRAN_64B,
276*eb00b1c8SRobert Mustacchi 				.itr_ntargets = 4,
277*eb00b1c8SRobert Mustacchi 				.itr_targets = { 0, 0, 0, 0 }
278*eb00b1c8SRobert Mustacchi 			}
279*eb00b1c8SRobert Mustacchi 		}
280*eb00b1c8SRobert Mustacchi 	}
281*eb00b1c8SRobert Mustacchi };
282*eb00b1c8SRobert Mustacchi 
283*eb00b1c8SRobert Mustacchi static const imc_t imc_bad_tad_3way = {
284*eb00b1c8SRobert Mustacchi 	.imc_gen = IMC_GEN_SANDY,
285*eb00b1c8SRobert Mustacchi 	.imc_nsockets = 1,
286*eb00b1c8SRobert Mustacchi 	.imc_sockets[0] = {
287*eb00b1c8SRobert Mustacchi 		.isock_valid = IMC_SOCKET_V_VALID,
288*eb00b1c8SRobert Mustacchi 		.isock_sad = {
289*eb00b1c8SRobert Mustacchi 			.isad_flags = 0,
290*eb00b1c8SRobert Mustacchi 			.isad_valid = IMC_SAD_V_VALID,
291*eb00b1c8SRobert Mustacchi 			.isad_tolm = 0x80000000,	/* 2 GiB */
292*eb00b1c8SRobert Mustacchi 			.isad_tohm = 0x280000000ULL,	/* 10 GiB */
293*eb00b1c8SRobert Mustacchi 			.isad_nrules = 10,
294*eb00b1c8SRobert Mustacchi 			.isad_rules[0] = {
295*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
296*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x80000000,
297*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
298*eb00b1c8SRobert Mustacchi 				.isr_ntargets = IMC_MAX_SAD_INTERLEAVE,
299*eb00b1c8SRobert Mustacchi 				.isr_targets = { 0, 0, 0, 0, 0, 0, 0, 0 }
300*eb00b1c8SRobert Mustacchi 			},
301*eb00b1c8SRobert Mustacchi 			.isad_rules[1] = {
302*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
303*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x280000000ULL,
304*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
305*eb00b1c8SRobert Mustacchi 				.isr_ntargets = IMC_MAX_SAD_INTERLEAVE,
306*eb00b1c8SRobert Mustacchi 				.isr_targets = { 0, 0, 0, 0, 0, 0, 0, 0 }
307*eb00b1c8SRobert Mustacchi 			}
308*eb00b1c8SRobert Mustacchi 		},
309*eb00b1c8SRobert Mustacchi 		.isock_ntad = 1,
310*eb00b1c8SRobert Mustacchi 		.isock_tad[0] = {
311*eb00b1c8SRobert Mustacchi 			.itad_flags = 0,
312*eb00b1c8SRobert Mustacchi 			.itad_nrules = 12,
313*eb00b1c8SRobert Mustacchi 			.itad_rules[0] = {
314*eb00b1c8SRobert Mustacchi 				.itr_base = 0x0,
315*eb00b1c8SRobert Mustacchi 				.itr_limit = 0x80000000,
316*eb00b1c8SRobert Mustacchi 				.itr_sock_way = 1,
317*eb00b1c8SRobert Mustacchi 				.itr_chan_way = 3,
318*eb00b1c8SRobert Mustacchi 				.itr_sock_gran = IMC_TAD_GRAN_64B,
319*eb00b1c8SRobert Mustacchi 				.itr_chan_gran = IMC_TAD_GRAN_64B,
320*eb00b1c8SRobert Mustacchi 				.itr_ntargets = 4,
321*eb00b1c8SRobert Mustacchi 				.itr_targets = { 0, 0, 0, 0 }
322*eb00b1c8SRobert Mustacchi 			},
323*eb00b1c8SRobert Mustacchi 			.itad_rules[1] = {
324*eb00b1c8SRobert Mustacchi 				.itr_base = 0x80000000,
325*eb00b1c8SRobert Mustacchi 				.itr_limit = 0x280000000ULL,
326*eb00b1c8SRobert Mustacchi 				.itr_sock_way = 1,
327*eb00b1c8SRobert Mustacchi 				.itr_chan_way = 3,
328*eb00b1c8SRobert Mustacchi 				.itr_sock_gran = IMC_TAD_GRAN_64B,
329*eb00b1c8SRobert Mustacchi 				.itr_chan_gran = IMC_TAD_GRAN_64B,
330*eb00b1c8SRobert Mustacchi 				.itr_ntargets = 4,
331*eb00b1c8SRobert Mustacchi 				.itr_targets = { 0, 0, 0, 0 }
332*eb00b1c8SRobert Mustacchi 			}
333*eb00b1c8SRobert Mustacchi 		}
334*eb00b1c8SRobert Mustacchi 	}
335*eb00b1c8SRobert Mustacchi };
336*eb00b1c8SRobert Mustacchi 
337*eb00b1c8SRobert Mustacchi static const imc_t imc_bad_tad_target = {
338*eb00b1c8SRobert Mustacchi 	.imc_gen = IMC_GEN_SANDY,
339*eb00b1c8SRobert Mustacchi 	.imc_nsockets = 1,
340*eb00b1c8SRobert Mustacchi 	.imc_sockets[0] = {
341*eb00b1c8SRobert Mustacchi 		.isock_valid = IMC_SOCKET_V_VALID,
342*eb00b1c8SRobert Mustacchi 		.isock_sad = {
343*eb00b1c8SRobert Mustacchi 			.isad_flags = 0,
344*eb00b1c8SRobert Mustacchi 			.isad_valid = IMC_SAD_V_VALID,
345*eb00b1c8SRobert Mustacchi 			.isad_tolm = 0x80000000,	/* 2 GiB */
346*eb00b1c8SRobert Mustacchi 			.isad_tohm = 0x280000000ULL,	/* 10 GiB */
347*eb00b1c8SRobert Mustacchi 			.isad_nrules = 10,
348*eb00b1c8SRobert Mustacchi 			.isad_rules[0] = {
349*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
350*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x80000000,
351*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
352*eb00b1c8SRobert Mustacchi 				.isr_ntargets = IMC_MAX_SAD_INTERLEAVE,
353*eb00b1c8SRobert Mustacchi 				.isr_targets = { 0, 0, 0, 0, 0, 0, 0, 0 }
354*eb00b1c8SRobert Mustacchi 			},
355*eb00b1c8SRobert Mustacchi 			.isad_rules[1] = {
356*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
357*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x280000000ULL,
358*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
359*eb00b1c8SRobert Mustacchi 				.isr_ntargets = IMC_MAX_SAD_INTERLEAVE,
360*eb00b1c8SRobert Mustacchi 				.isr_targets = { 0, 0, 0, 0, 0, 0, 0, 0 }
361*eb00b1c8SRobert Mustacchi 			}
362*eb00b1c8SRobert Mustacchi 		},
363*eb00b1c8SRobert Mustacchi 		.isock_ntad = 1,
364*eb00b1c8SRobert Mustacchi 		.isock_tad[0] = {
365*eb00b1c8SRobert Mustacchi 			.itad_flags = 0,
366*eb00b1c8SRobert Mustacchi 			.itad_nrules = 12,
367*eb00b1c8SRobert Mustacchi 			.itad_rules[0] = {
368*eb00b1c8SRobert Mustacchi 				.itr_base = 0x0,
369*eb00b1c8SRobert Mustacchi 				.itr_limit = 0x80000000,
370*eb00b1c8SRobert Mustacchi 				.itr_sock_way = 1,
371*eb00b1c8SRobert Mustacchi 				.itr_chan_way = 1,
372*eb00b1c8SRobert Mustacchi 				.itr_sock_gran = IMC_TAD_GRAN_64B,
373*eb00b1c8SRobert Mustacchi 				.itr_chan_gran = IMC_TAD_GRAN_64B,
374*eb00b1c8SRobert Mustacchi 				.itr_ntargets = 0,
375*eb00b1c8SRobert Mustacchi 				.itr_targets = { 0, 0, 0, 0 }
376*eb00b1c8SRobert Mustacchi 			},
377*eb00b1c8SRobert Mustacchi 			.itad_rules[1] = {
378*eb00b1c8SRobert Mustacchi 				.itr_base = 0x80000000,
379*eb00b1c8SRobert Mustacchi 				.itr_limit = 0x280000000ULL,
380*eb00b1c8SRobert Mustacchi 				.itr_sock_way = 1,
381*eb00b1c8SRobert Mustacchi 				.itr_chan_way = 1,
382*eb00b1c8SRobert Mustacchi 				.itr_sock_gran = IMC_TAD_GRAN_64B,
383*eb00b1c8SRobert Mustacchi 				.itr_chan_gran = IMC_TAD_GRAN_64B,
384*eb00b1c8SRobert Mustacchi 				.itr_ntargets = 0,
385*eb00b1c8SRobert Mustacchi 				.itr_targets = { 0, 0, 0, 0 }
386*eb00b1c8SRobert Mustacchi 			}
387*eb00b1c8SRobert Mustacchi 		}
388*eb00b1c8SRobert Mustacchi 	}
389*eb00b1c8SRobert Mustacchi };
390*eb00b1c8SRobert Mustacchi 
391*eb00b1c8SRobert Mustacchi static const imc_t imc_bad_tad_channelid = {
392*eb00b1c8SRobert Mustacchi 	.imc_gen = IMC_GEN_SANDY,
393*eb00b1c8SRobert Mustacchi 	.imc_nsockets = 1,
394*eb00b1c8SRobert Mustacchi 	.imc_sockets[0] = {
395*eb00b1c8SRobert Mustacchi 		.isock_valid = IMC_SOCKET_V_VALID,
396*eb00b1c8SRobert Mustacchi 		.isock_sad = {
397*eb00b1c8SRobert Mustacchi 			.isad_flags = 0,
398*eb00b1c8SRobert Mustacchi 			.isad_valid = IMC_SAD_V_VALID,
399*eb00b1c8SRobert Mustacchi 			.isad_tolm = 0x80000000,	/* 2 GiB */
400*eb00b1c8SRobert Mustacchi 			.isad_tohm = 0x280000000ULL,	/* 10 GiB */
401*eb00b1c8SRobert Mustacchi 			.isad_nrules = 10,
402*eb00b1c8SRobert Mustacchi 			.isad_rules[0] = {
403*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
404*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x80000000,
405*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
406*eb00b1c8SRobert Mustacchi 				.isr_ntargets = IMC_MAX_SAD_INTERLEAVE,
407*eb00b1c8SRobert Mustacchi 				.isr_targets = { 0, 0, 0, 0, 0, 0, 0, 0 }
408*eb00b1c8SRobert Mustacchi 			},
409*eb00b1c8SRobert Mustacchi 			.isad_rules[1] = {
410*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
411*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x280000000ULL,
412*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
413*eb00b1c8SRobert Mustacchi 				.isr_ntargets = IMC_MAX_SAD_INTERLEAVE,
414*eb00b1c8SRobert Mustacchi 				.isr_targets = { 0, 0, 0, 0, 0, 0, 0, 0 }
415*eb00b1c8SRobert Mustacchi 			}
416*eb00b1c8SRobert Mustacchi 		},
417*eb00b1c8SRobert Mustacchi 		.isock_ntad = 1,
418*eb00b1c8SRobert Mustacchi 		.isock_tad[0] = {
419*eb00b1c8SRobert Mustacchi 			.itad_flags = 0,
420*eb00b1c8SRobert Mustacchi 			.itad_nrules = 12,
421*eb00b1c8SRobert Mustacchi 			.itad_rules[0] = {
422*eb00b1c8SRobert Mustacchi 				.itr_base = 0x0,
423*eb00b1c8SRobert Mustacchi 				.itr_limit = 0x80000000,
424*eb00b1c8SRobert Mustacchi 				.itr_sock_way = 1,
425*eb00b1c8SRobert Mustacchi 				.itr_chan_way = 1,
426*eb00b1c8SRobert Mustacchi 				.itr_sock_gran = IMC_TAD_GRAN_64B,
427*eb00b1c8SRobert Mustacchi 				.itr_chan_gran = IMC_TAD_GRAN_64B,
428*eb00b1c8SRobert Mustacchi 				.itr_ntargets = 4,
429*eb00b1c8SRobert Mustacchi 				.itr_targets = { 17, 23, 42, 167 }
430*eb00b1c8SRobert Mustacchi 			},
431*eb00b1c8SRobert Mustacchi 			.itad_rules[1] = {
432*eb00b1c8SRobert Mustacchi 				.itr_base = 0x80000000,
433*eb00b1c8SRobert Mustacchi 				.itr_limit = 0x280000000ULL,
434*eb00b1c8SRobert Mustacchi 				.itr_sock_way = 1,
435*eb00b1c8SRobert Mustacchi 				.itr_chan_way = 1,
436*eb00b1c8SRobert Mustacchi 				.itr_sock_gran = IMC_TAD_GRAN_64B,
437*eb00b1c8SRobert Mustacchi 				.itr_chan_gran = IMC_TAD_GRAN_64B,
438*eb00b1c8SRobert Mustacchi 				.itr_ntargets = 4,
439*eb00b1c8SRobert Mustacchi 				.itr_targets = { 17, 23, 42, 167 }
440*eb00b1c8SRobert Mustacchi 			}
441*eb00b1c8SRobert Mustacchi 		},
442*eb00b1c8SRobert Mustacchi 		.isock_nimc = 1,
443*eb00b1c8SRobert Mustacchi 		.isock_imcs[0] = {
444*eb00b1c8SRobert Mustacchi 			.icn_nchannels = 1,
445*eb00b1c8SRobert Mustacchi 			.icn_dimm_type = IMC_DIMM_DDR3,
446*eb00b1c8SRobert Mustacchi 			.icn_ecc = B_TRUE,
447*eb00b1c8SRobert Mustacchi 			.icn_lockstep = B_FALSE,
448*eb00b1c8SRobert Mustacchi 			.icn_closed = B_FALSE,
449*eb00b1c8SRobert Mustacchi 			.icn_channels[0] = {
450*eb00b1c8SRobert Mustacchi 				.ich_ndimms = 1,
451*eb00b1c8SRobert Mustacchi 				.ich_dimms[0] = {
452*eb00b1c8SRobert Mustacchi 					.idimm_present = B_TRUE,
453*eb00b1c8SRobert Mustacchi 					.idimm_nbanks = 3,
454*eb00b1c8SRobert Mustacchi 					.idimm_width = 8,
455*eb00b1c8SRobert Mustacchi 					.idimm_density = 2,
456*eb00b1c8SRobert Mustacchi 					.idimm_nranks = 2,
457*eb00b1c8SRobert Mustacchi 					.idimm_nrows = 14,
458*eb00b1c8SRobert Mustacchi 					.idimm_ncolumns = 10,
459*eb00b1c8SRobert Mustacchi 					.idimm_size = 0x80000000
460*eb00b1c8SRobert Mustacchi 				},
461*eb00b1c8SRobert Mustacchi 				.ich_ntad_offsets = 12,
462*eb00b1c8SRobert Mustacchi 				.ich_tad_offsets = { 0, 0x80000000, 0, 0, 0, 0,
463*eb00b1c8SRobert Mustacchi 				    0, 0, 0, 0, 0 },
464*eb00b1c8SRobert Mustacchi 				.ich_nrankileaves = 8,
465*eb00b1c8SRobert Mustacchi 				.ich_rankileaves[0] = {
466*eb00b1c8SRobert Mustacchi 					.irle_enabled = B_TRUE,
467*eb00b1c8SRobert Mustacchi 					.irle_nways = 2,
468*eb00b1c8SRobert Mustacchi 					.irle_nwaysbits = 1,
469*eb00b1c8SRobert Mustacchi 					.irle_limit = 0x200000000ULL,
470*eb00b1c8SRobert Mustacchi 					.irle_nentries = 5,
471*eb00b1c8SRobert Mustacchi 					.irle_entries[0] = { 0x0, 0x0 },
472*eb00b1c8SRobert Mustacchi 					.irle_entries[1] = { 0x1, 0x0 }
473*eb00b1c8SRobert Mustacchi 				}
474*eb00b1c8SRobert Mustacchi 			}
475*eb00b1c8SRobert Mustacchi 		}
476*eb00b1c8SRobert Mustacchi 	}
477*eb00b1c8SRobert Mustacchi };
478*eb00b1c8SRobert Mustacchi 
479*eb00b1c8SRobert Mustacchi static const imc_t imc_bad_channel_offset = {
480*eb00b1c8SRobert Mustacchi 	.imc_gen = IMC_GEN_SANDY,
481*eb00b1c8SRobert Mustacchi 	.imc_nsockets = 1,
482*eb00b1c8SRobert Mustacchi 	.imc_sockets[0] = {
483*eb00b1c8SRobert Mustacchi 		.isock_valid = IMC_SOCKET_V_VALID,
484*eb00b1c8SRobert Mustacchi 		.isock_sad = {
485*eb00b1c8SRobert Mustacchi 			.isad_flags = 0,
486*eb00b1c8SRobert Mustacchi 			.isad_valid = IMC_SAD_V_VALID,
487*eb00b1c8SRobert Mustacchi 			.isad_tolm = 0x80000000,	/* 2 GiB */
488*eb00b1c8SRobert Mustacchi 			.isad_tohm = 0x280000000ULL,	/* 10 GiB */
489*eb00b1c8SRobert Mustacchi 			.isad_nrules = 10,
490*eb00b1c8SRobert Mustacchi 			.isad_rules[0] = {
491*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
492*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x80000000,
493*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
494*eb00b1c8SRobert Mustacchi 				.isr_ntargets = IMC_MAX_SAD_INTERLEAVE,
495*eb00b1c8SRobert Mustacchi 				.isr_targets = { 0, 0, 0, 0, 0, 0, 0, 0 }
496*eb00b1c8SRobert Mustacchi 			},
497*eb00b1c8SRobert Mustacchi 			.isad_rules[1] = {
498*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
499*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x280000000ULL,
500*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
501*eb00b1c8SRobert Mustacchi 				.isr_ntargets = IMC_MAX_SAD_INTERLEAVE,
502*eb00b1c8SRobert Mustacchi 				.isr_targets = { 0, 0, 0, 0, 0, 0, 0, 0 }
503*eb00b1c8SRobert Mustacchi 			}
504*eb00b1c8SRobert Mustacchi 		},
505*eb00b1c8SRobert Mustacchi 		.isock_ntad = 1,
506*eb00b1c8SRobert Mustacchi 		.isock_tad[0] = {
507*eb00b1c8SRobert Mustacchi 			.itad_flags = 0,
508*eb00b1c8SRobert Mustacchi 			.itad_nrules = 12,
509*eb00b1c8SRobert Mustacchi 			.itad_rules[0] = {
510*eb00b1c8SRobert Mustacchi 				.itr_base = 0x0,
511*eb00b1c8SRobert Mustacchi 				.itr_limit = 0x80000000,
512*eb00b1c8SRobert Mustacchi 				.itr_sock_way = 1,
513*eb00b1c8SRobert Mustacchi 				.itr_chan_way = 1,
514*eb00b1c8SRobert Mustacchi 				.itr_sock_gran = IMC_TAD_GRAN_64B,
515*eb00b1c8SRobert Mustacchi 				.itr_chan_gran = IMC_TAD_GRAN_64B,
516*eb00b1c8SRobert Mustacchi 				.itr_ntargets = 4,
517*eb00b1c8SRobert Mustacchi 				.itr_targets = { 0, 0, 0, 0 }
518*eb00b1c8SRobert Mustacchi 			},
519*eb00b1c8SRobert Mustacchi 			.itad_rules[1] = {
520*eb00b1c8SRobert Mustacchi 				.itr_base = 0x80000000,
521*eb00b1c8SRobert Mustacchi 				.itr_limit = 0x280000000ULL,
522*eb00b1c8SRobert Mustacchi 				.itr_sock_way = 1,
523*eb00b1c8SRobert Mustacchi 				.itr_chan_way = 1,
524*eb00b1c8SRobert Mustacchi 				.itr_sock_gran = IMC_TAD_GRAN_64B,
525*eb00b1c8SRobert Mustacchi 				.itr_chan_gran = IMC_TAD_GRAN_64B,
526*eb00b1c8SRobert Mustacchi 				.itr_ntargets = 4,
527*eb00b1c8SRobert Mustacchi 				.itr_targets = { 0, 0, 0, 0 }
528*eb00b1c8SRobert Mustacchi 			}
529*eb00b1c8SRobert Mustacchi 		},
530*eb00b1c8SRobert Mustacchi 		.isock_nimc = 1,
531*eb00b1c8SRobert Mustacchi 		.isock_imcs[0] = {
532*eb00b1c8SRobert Mustacchi 			.icn_nchannels = 1,
533*eb00b1c8SRobert Mustacchi 			.icn_dimm_type = IMC_DIMM_DDR3,
534*eb00b1c8SRobert Mustacchi 			.icn_ecc = B_TRUE,
535*eb00b1c8SRobert Mustacchi 			.icn_lockstep = B_FALSE,
536*eb00b1c8SRobert Mustacchi 			.icn_closed = B_FALSE,
537*eb00b1c8SRobert Mustacchi 			.icn_channels[0] = {
538*eb00b1c8SRobert Mustacchi 				.ich_ndimms = 1,
539*eb00b1c8SRobert Mustacchi 				.ich_dimms[0] = {
540*eb00b1c8SRobert Mustacchi 					.idimm_present = B_TRUE,
541*eb00b1c8SRobert Mustacchi 					.idimm_nbanks = 3,
542*eb00b1c8SRobert Mustacchi 					.idimm_width = 8,
543*eb00b1c8SRobert Mustacchi 					.idimm_density = 2,
544*eb00b1c8SRobert Mustacchi 					.idimm_nranks = 2,
545*eb00b1c8SRobert Mustacchi 					.idimm_nrows = 14,
546*eb00b1c8SRobert Mustacchi 					.idimm_ncolumns = 10,
547*eb00b1c8SRobert Mustacchi 					.idimm_size = 0x80000000
548*eb00b1c8SRobert Mustacchi 				},
549*eb00b1c8SRobert Mustacchi 				.ich_ntad_offsets = 0,
550*eb00b1c8SRobert Mustacchi 				.ich_tad_offsets = { 0, 0x80000000, 0, 0, 0, 0,
551*eb00b1c8SRobert Mustacchi 				    0, 0, 0, 0, 0 },
552*eb00b1c8SRobert Mustacchi 				.ich_nrankileaves = 8,
553*eb00b1c8SRobert Mustacchi 				.ich_rankileaves[0] = {
554*eb00b1c8SRobert Mustacchi 					.irle_enabled = B_TRUE,
555*eb00b1c8SRobert Mustacchi 					.irle_nways = 2,
556*eb00b1c8SRobert Mustacchi 					.irle_nwaysbits = 1,
557*eb00b1c8SRobert Mustacchi 					.irle_limit = 0x200000000ULL,
558*eb00b1c8SRobert Mustacchi 					.irle_nentries = 5,
559*eb00b1c8SRobert Mustacchi 					.irle_entries[0] = { 0x0, 0x0 },
560*eb00b1c8SRobert Mustacchi 					.irle_entries[1] = { 0x1, 0x0 }
561*eb00b1c8SRobert Mustacchi 				}
562*eb00b1c8SRobert Mustacchi 			}
563*eb00b1c8SRobert Mustacchi 		}
564*eb00b1c8SRobert Mustacchi 	}
565*eb00b1c8SRobert Mustacchi };
566*eb00b1c8SRobert Mustacchi 
567*eb00b1c8SRobert Mustacchi static const imc_t imc_bad_rir_rule = {
568*eb00b1c8SRobert Mustacchi 	.imc_gen = IMC_GEN_SANDY,
569*eb00b1c8SRobert Mustacchi 	.imc_nsockets = 1,
570*eb00b1c8SRobert Mustacchi 	.imc_sockets[0] = {
571*eb00b1c8SRobert Mustacchi 		.isock_valid = IMC_SOCKET_V_VALID,
572*eb00b1c8SRobert Mustacchi 		.isock_sad = {
573*eb00b1c8SRobert Mustacchi 			.isad_flags = 0,
574*eb00b1c8SRobert Mustacchi 			.isad_valid = IMC_SAD_V_VALID,
575*eb00b1c8SRobert Mustacchi 			.isad_tolm = 0x80000000,	/* 2 GiB */
576*eb00b1c8SRobert Mustacchi 			.isad_tohm = 0x280000000ULL,	/* 10 GiB */
577*eb00b1c8SRobert Mustacchi 			.isad_nrules = 10,
578*eb00b1c8SRobert Mustacchi 			.isad_rules[0] = {
579*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
580*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x80000000,
581*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
582*eb00b1c8SRobert Mustacchi 				.isr_ntargets = IMC_MAX_SAD_INTERLEAVE,
583*eb00b1c8SRobert Mustacchi 				.isr_targets = { 0, 0, 0, 0, 0, 0, 0, 0 }
584*eb00b1c8SRobert Mustacchi 			},
585*eb00b1c8SRobert Mustacchi 			.isad_rules[1] = {
586*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
587*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x280000000ULL,
588*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
589*eb00b1c8SRobert Mustacchi 				.isr_ntargets = IMC_MAX_SAD_INTERLEAVE,
590*eb00b1c8SRobert Mustacchi 				.isr_targets = { 0, 0, 0, 0, 0, 0, 0, 0 }
591*eb00b1c8SRobert Mustacchi 			}
592*eb00b1c8SRobert Mustacchi 		},
593*eb00b1c8SRobert Mustacchi 		.isock_ntad = 1,
594*eb00b1c8SRobert Mustacchi 		.isock_tad[0] = {
595*eb00b1c8SRobert Mustacchi 			.itad_flags = 0,
596*eb00b1c8SRobert Mustacchi 			.itad_nrules = 12,
597*eb00b1c8SRobert Mustacchi 			.itad_rules[0] = {
598*eb00b1c8SRobert Mustacchi 				.itr_base = 0x0,
599*eb00b1c8SRobert Mustacchi 				.itr_limit = 0x80000000,
600*eb00b1c8SRobert Mustacchi 				.itr_sock_way = 1,
601*eb00b1c8SRobert Mustacchi 				.itr_chan_way = 1,
602*eb00b1c8SRobert Mustacchi 				.itr_sock_gran = IMC_TAD_GRAN_64B,
603*eb00b1c8SRobert Mustacchi 				.itr_chan_gran = IMC_TAD_GRAN_64B,
604*eb00b1c8SRobert Mustacchi 				.itr_ntargets = 4,
605*eb00b1c8SRobert Mustacchi 				.itr_targets = { 0, 0, 0, 0 }
606*eb00b1c8SRobert Mustacchi 			},
607*eb00b1c8SRobert Mustacchi 			.itad_rules[1] = {
608*eb00b1c8SRobert Mustacchi 				.itr_base = 0x80000000,
609*eb00b1c8SRobert Mustacchi 				.itr_limit = 0x280000000ULL,
610*eb00b1c8SRobert Mustacchi 				.itr_sock_way = 1,
611*eb00b1c8SRobert Mustacchi 				.itr_chan_way = 1,
612*eb00b1c8SRobert Mustacchi 				.itr_sock_gran = IMC_TAD_GRAN_64B,
613*eb00b1c8SRobert Mustacchi 				.itr_chan_gran = IMC_TAD_GRAN_64B,
614*eb00b1c8SRobert Mustacchi 				.itr_ntargets = 4,
615*eb00b1c8SRobert Mustacchi 				.itr_targets = { 0, 0, 0, 0 }
616*eb00b1c8SRobert Mustacchi 			}
617*eb00b1c8SRobert Mustacchi 		},
618*eb00b1c8SRobert Mustacchi 		.isock_nimc = 1,
619*eb00b1c8SRobert Mustacchi 		.isock_imcs[0] = {
620*eb00b1c8SRobert Mustacchi 			.icn_nchannels = 1,
621*eb00b1c8SRobert Mustacchi 			.icn_dimm_type = IMC_DIMM_DDR3,
622*eb00b1c8SRobert Mustacchi 			.icn_ecc = B_TRUE,
623*eb00b1c8SRobert Mustacchi 			.icn_lockstep = B_FALSE,
624*eb00b1c8SRobert Mustacchi 			.icn_closed = B_FALSE,
625*eb00b1c8SRobert Mustacchi 			.icn_channels[0] = {
626*eb00b1c8SRobert Mustacchi 				.ich_ndimms = 1,
627*eb00b1c8SRobert Mustacchi 				.ich_dimms[0] = {
628*eb00b1c8SRobert Mustacchi 					.idimm_present = B_TRUE,
629*eb00b1c8SRobert Mustacchi 					.idimm_nbanks = 3,
630*eb00b1c8SRobert Mustacchi 					.idimm_width = 8,
631*eb00b1c8SRobert Mustacchi 					.idimm_density = 2,
632*eb00b1c8SRobert Mustacchi 					.idimm_nranks = 2,
633*eb00b1c8SRobert Mustacchi 					.idimm_nrows = 14,
634*eb00b1c8SRobert Mustacchi 					.idimm_ncolumns = 10,
635*eb00b1c8SRobert Mustacchi 					.idimm_size = 0x80000000
636*eb00b1c8SRobert Mustacchi 				},
637*eb00b1c8SRobert Mustacchi 				.ich_ntad_offsets = 12,
638*eb00b1c8SRobert Mustacchi 				.ich_tad_offsets = { 0, 0x80000000, 0, 0, 0, 0,
639*eb00b1c8SRobert Mustacchi 				    0, 0, 0, 0, 0 },
640*eb00b1c8SRobert Mustacchi 				.ich_nrankileaves = 8,
641*eb00b1c8SRobert Mustacchi 				.ich_rankileaves[0] = {
642*eb00b1c8SRobert Mustacchi 					.irle_enabled = B_TRUE,
643*eb00b1c8SRobert Mustacchi 					.irle_nways = 2,
644*eb00b1c8SRobert Mustacchi 					.irle_nwaysbits = 1,
645*eb00b1c8SRobert Mustacchi 					.irle_limit = 0x1,
646*eb00b1c8SRobert Mustacchi 					.irle_nentries = 5,
647*eb00b1c8SRobert Mustacchi 					.irle_entries[0] = { 0x0, 0x0 },
648*eb00b1c8SRobert Mustacchi 					.irle_entries[1] = { 0x1, 0x0 }
649*eb00b1c8SRobert Mustacchi 				}
650*eb00b1c8SRobert Mustacchi 			}
651*eb00b1c8SRobert Mustacchi 		}
652*eb00b1c8SRobert Mustacchi 	}
653*eb00b1c8SRobert Mustacchi };
654*eb00b1c8SRobert Mustacchi 
655*eb00b1c8SRobert Mustacchi static const imc_t imc_bad_rir_ileave = {
656*eb00b1c8SRobert Mustacchi 	.imc_gen = IMC_GEN_SANDY,
657*eb00b1c8SRobert Mustacchi 	.imc_nsockets = 1,
658*eb00b1c8SRobert Mustacchi 	.imc_sockets[0] = {
659*eb00b1c8SRobert Mustacchi 		.isock_valid = IMC_SOCKET_V_VALID,
660*eb00b1c8SRobert Mustacchi 		.isock_sad = {
661*eb00b1c8SRobert Mustacchi 			.isad_flags = 0,
662*eb00b1c8SRobert Mustacchi 			.isad_valid = IMC_SAD_V_VALID,
663*eb00b1c8SRobert Mustacchi 			.isad_tolm = 0x80000000,	/* 2 GiB */
664*eb00b1c8SRobert Mustacchi 			.isad_tohm = 0x280000000ULL,	/* 10 GiB */
665*eb00b1c8SRobert Mustacchi 			.isad_nrules = 10,
666*eb00b1c8SRobert Mustacchi 			.isad_rules[0] = {
667*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
668*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x80000000,
669*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
670*eb00b1c8SRobert Mustacchi 				.isr_ntargets = IMC_MAX_SAD_INTERLEAVE,
671*eb00b1c8SRobert Mustacchi 				.isr_targets = { 0, 0, 0, 0, 0, 0, 0, 0 }
672*eb00b1c8SRobert Mustacchi 			},
673*eb00b1c8SRobert Mustacchi 			.isad_rules[1] = {
674*eb00b1c8SRobert Mustacchi 				.isr_enable = B_TRUE,
675*eb00b1c8SRobert Mustacchi 				.isr_limit = 0x280000000ULL,
676*eb00b1c8SRobert Mustacchi 				.isr_imode = IMC_SAD_IMODE_8t6,
677*eb00b1c8SRobert Mustacchi 				.isr_ntargets = IMC_MAX_SAD_INTERLEAVE,
678*eb00b1c8SRobert Mustacchi 				.isr_targets = { 0, 0, 0, 0, 0, 0, 0, 0 }
679*eb00b1c8SRobert Mustacchi 			}
680*eb00b1c8SRobert Mustacchi 		},
681*eb00b1c8SRobert Mustacchi 		.isock_ntad = 1,
682*eb00b1c8SRobert Mustacchi 		.isock_tad[0] = {
683*eb00b1c8SRobert Mustacchi 			.itad_flags = 0,
684*eb00b1c8SRobert Mustacchi 			.itad_nrules = 12,
685*eb00b1c8SRobert Mustacchi 			.itad_rules[0] = {
686*eb00b1c8SRobert Mustacchi 				.itr_base = 0x0,
687*eb00b1c8SRobert Mustacchi 				.itr_limit = 0x80000000,
688*eb00b1c8SRobert Mustacchi 				.itr_sock_way = 1,
689*eb00b1c8SRobert Mustacchi 				.itr_chan_way = 1,
690*eb00b1c8SRobert Mustacchi 				.itr_sock_gran = IMC_TAD_GRAN_64B,
691*eb00b1c8SRobert Mustacchi 				.itr_chan_gran = IMC_TAD_GRAN_64B,
692*eb00b1c8SRobert Mustacchi 				.itr_ntargets = 4,
693*eb00b1c8SRobert Mustacchi 				.itr_targets = { 0, 0, 0, 0 }
694*eb00b1c8SRobert Mustacchi 			},
695*eb00b1c8SRobert Mustacchi 			.itad_rules[1] = {
696*eb00b1c8SRobert Mustacchi 				.itr_base = 0x80000000,
697*eb00b1c8SRobert Mustacchi 				.itr_limit = 0x280000000ULL,
698*eb00b1c8SRobert Mustacchi 				.itr_sock_way = 1,
699*eb00b1c8SRobert Mustacchi 				.itr_chan_way = 1,
700*eb00b1c8SRobert Mustacchi 				.itr_sock_gran = IMC_TAD_GRAN_64B,
701*eb00b1c8SRobert Mustacchi 				.itr_chan_gran = IMC_TAD_GRAN_64B,
702*eb00b1c8SRobert Mustacchi 				.itr_ntargets = 4,
703*eb00b1c8SRobert Mustacchi 				.itr_targets = { 0, 0, 0, 0 }
704*eb00b1c8SRobert Mustacchi 			}
705*eb00b1c8SRobert Mustacchi 		},
706*eb00b1c8SRobert Mustacchi 		.isock_nimc = 1,
707*eb00b1c8SRobert Mustacchi 		.isock_imcs[0] = {
708*eb00b1c8SRobert Mustacchi 			.icn_nchannels = 1,
709*eb00b1c8SRobert Mustacchi 			.icn_dimm_type = IMC_DIMM_DDR3,
710*eb00b1c8SRobert Mustacchi 			.icn_ecc = B_TRUE,
711*eb00b1c8SRobert Mustacchi 			.icn_lockstep = B_FALSE,
712*eb00b1c8SRobert Mustacchi 			.icn_closed = B_FALSE,
713*eb00b1c8SRobert Mustacchi 			.icn_channels[0] = {
714*eb00b1c8SRobert Mustacchi 				.ich_ndimms = 1,
715*eb00b1c8SRobert Mustacchi 				.ich_dimms[0] = {
716*eb00b1c8SRobert Mustacchi 					.idimm_present = B_TRUE,
717*eb00b1c8SRobert Mustacchi 					.idimm_nbanks = 3,
718*eb00b1c8SRobert Mustacchi 					.idimm_width = 8,
719*eb00b1c8SRobert Mustacchi 					.idimm_density = 2,
720*eb00b1c8SRobert Mustacchi 					.idimm_nranks = 2,
721*eb00b1c8SRobert Mustacchi 					.idimm_nrows = 14,
722*eb00b1c8SRobert Mustacchi 					.idimm_ncolumns = 10,
723*eb00b1c8SRobert Mustacchi 					.idimm_size = 0x80000000
724*eb00b1c8SRobert Mustacchi 				},
725*eb00b1c8SRobert Mustacchi 				.ich_ntad_offsets = 12,
726*eb00b1c8SRobert Mustacchi 				.ich_tad_offsets = { 0, 0x80000000, 0, 0, 0, 0,
727*eb00b1c8SRobert Mustacchi 				    0, 0, 0, 0, 0 },
728*eb00b1c8SRobert Mustacchi 				.ich_nrankileaves = 8,
729