150 int nb5000_reset_cor_pex = 0;
151 uint_t nb5000_mask_cor_pex = 0xffffffff;
152 uint32_t nb5000_rp_pex = 0x1;
153
154 int nb_mask_mc_set;
155
156 typedef struct find_dimm_label {
157 void (*label_function)(int, char *, int);
158 } find_dimm_label_t;
159
160 static void x8450_dimm_label(int, char *, int);
161 static void cp3250_dimm_label(int, char *, int);
162
163 static struct platform_label {
164 const char *sys_vendor; /* SMB_TYPE_SYSTEM vendor prefix */
165 const char *sys_product; /* SMB_TYPE_SYSTEM product prefix */
166 find_dimm_label_t dimm_label;
167 int dimms_per_channel;
168 } platform_label[] = {
169 { "SUN MICROSYSTEMS", "SUN BLADE X8450 SERVER MODULE",
170 x8450_dimm_label, 8 },
171 { "MiTAC,Shunde", "CP3250", cp3250_dimm_label, 0 },
172 { NULL, NULL, NULL, 0 }
173 };
174
175 static unsigned short
176 read_spd(int bus)
177 {
178 unsigned short rt = 0;
179 int branch = bus >> 1;
180 int channel = bus & 1;
181
182 rt = SPD_RD(branch, channel);
183
184 return (rt);
185 }
186
187 static void
188 write_spdcmd(int bus, uint32_t val)
189 {
190 int branch = bus >> 1;
191 int channel = bus & 1;
192 SPDCMD_WR(branch, channel, val);
|
150 int nb5000_reset_cor_pex = 0;
151 uint_t nb5000_mask_cor_pex = 0xffffffff;
152 uint32_t nb5000_rp_pex = 0x1;
153
154 int nb_mask_mc_set;
155
156 typedef struct find_dimm_label {
157 void (*label_function)(int, char *, int);
158 } find_dimm_label_t;
159
160 static void x8450_dimm_label(int, char *, int);
161 static void cp3250_dimm_label(int, char *, int);
162
163 static struct platform_label {
164 const char *sys_vendor; /* SMB_TYPE_SYSTEM vendor prefix */
165 const char *sys_product; /* SMB_TYPE_SYSTEM product prefix */
166 find_dimm_label_t dimm_label;
167 int dimms_per_channel;
168 } platform_label[] = {
169 { "SUN MICROSYSTEMS", "SUN BLADE X8450 SERVER MODULE",
170 { x8450_dimm_label }, 8 },
171 { "MiTAC,Shunde", "CP3250", { cp3250_dimm_label }, 0 },
172 { NULL, NULL, { NULL }, 0 }
173 };
174
175 static unsigned short
176 read_spd(int bus)
177 {
178 unsigned short rt = 0;
179 int branch = bus >> 1;
180 int channel = bus & 1;
181
182 rt = SPD_RD(branch, channel);
183
184 return (rt);
185 }
186
187 static void
188 write_spdcmd(int bus, uint32_t val)
189 {
190 int branch = bus >> 1;
191 int channel = bus & 1;
192 SPDCMD_WR(branch, channel, val);
|