Debian Codegraph @

src/cpu/intel/haswell/haswell_init.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #include <console/console.h>
4 #include <device/device.h>
5 #include <cpu/cpu.h>
6 #include <cpu/x86/mtrr.h>
7 #include <cpu/x86/msr.h>
8 #include <cpu/x86/mp.h>
9 #include <cpu/intel/microcode.h>
10 #include <cpu/intel/smm_reloc.h>
11 #include <cpu/intel/speedstep.h>
12 #include <cpu/intel/turbo.h>
13 #include <cpu/x86/name.h>
14 #include <delay.h>
15 #include <northbridge/intel/haswell/haswell.h>
16 #include <southbridge/intel/lynxpoint/pch.h>
17 #include <cpu/intel/common/common.h>
18 #include <types.h>
19 #include "haswell.h"
20 #include "chip.h"
21
22 /* Convert time in seconds to POWER_LIMIT_1_TIME MSR value */
23 static const u8 power_limit_time_sec_to_msr[] = {
24 [0] = 0x00,
25 [1] = 0x0a,
26 [2] = 0x0b,
27 [3] = 0x4b,
28 [4] = 0x0c,
29 [5] = 0x2c,
30 [6] = 0x4c,
31 [7] = 0x6c,
32 [8] = 0x0d,
33 [10] = 0x2d,
34 [12] = 0x4d,
35 [14] = 0x6d,
36 [16] = 0x0e,
37 [20] = 0x2e,
38 [24] = 0x4e,
39 [28] = 0x6e,
40 [32] = 0x0f,
41 [40] = 0x2f,
42 [48] = 0x4f,
43 [56] = 0x6f,
44 [64] = 0x10,
45 [80] = 0x30,
46 [96] = 0x50,
47 [112] = 0x70,
48 [128] = 0x11,
49 };
50
51 /* Convert POWER_LIMIT_1_TIME MSR value to seconds */
52 static const u8 power_limit_time_msr_to_sec[] = {
53 [0x00] = 0,
54 [0x0a] = 1,
55 [0x0b] = 2,
56 [0x4b] = 3,
57 [0x0c] = 4,
58 [0x2c] = 5,
59 [0x4c] = 6,
60 [0x6c] = 7,
61 [0x0d] = 8,
62 [0x2d] = 10,
63 [0x4d] = 12,
64 [0x6d] = 14,
65 [0x0e] = 16,
66 [0x2e] = 20,
67 [0x4e] = 24,
68 [0x6e] = 28,
69 [0x0f] = 32,
70 [0x2f] = 40,
71 [0x4f] = 48,
72 [0x6f] = 56,
73 [0x10] = 64,
74 [0x30] = 80,
75 [0x50] = 96,
76 [0x70] = 112,
77 [0x11] = 128,
78 };
79
80 /*
81 * The core 100MHz BCLK is disabled in deeper c-states. One needs to calibrate
82 * the 100MHz BCLK against the 24MHz BCLK to restore the clocks properly
83 * when a core is woken up.
84 */
85 static void calibrate_24mhz_bclk(void)
86 {
87 int err_code;
88
89 if (pcode_ready() < 0) {
90 printk(BIOS_ERR, "PCODE: mailbox timeout on wait ready.\n");
91 return;
92 }
93
94 /* A non-zero value initiates the PCODE calibration. */
95 mchbar_write32(BIOS_MAILBOX_DATA, ~0);
96 mchbar_write32(BIOS_MAILBOX_INTERFACE,
97 MAILBOX_RUN_BUSY | MAILBOX_BIOS_CMD_FSM_MEASURE_INTVL);
98
99 if (pcode_ready() < 0) {
100 printk(BIOS_ERR, "PCODE: mailbox timeout on completion.\n");
101 return;
102 }
103
104 err_code = mchbar_read32(BIOS_MAILBOX_INTERFACE) & 0xff;
105
106 printk(BIOS_DEBUG, "PCODE: 24MHz BCLK calibration response: %d\n", err_code);
107
108 /* Read the calibrated value. */
109 mchbar_write32(BIOS_MAILBOX_INTERFACE,
110 MAILBOX_RUN_BUSY | MAILBOX_BIOS_CMD_READ_CALIBRATION);
111
112 if (pcode_ready() < 0) {
113 printk(BIOS_ERR, "PCODE: mailbox timeout on read.\n");
114 return;
115 }
116
117 printk(BIOS_DEBUG, "PCODE: 24MHz BCLK calibration value: 0x%08x\n",
118 mchbar_read32(BIOS_MAILBOX_DATA));
119 }
120
121 static struct device *cpu_cluster;
122
123 static void initialize_vr_config(void)
124 {
125 struct cpu_vr_config vr_config = { 0 };
126 msr_t msr;
127
128 /* Make sure your devicetree has the cpu_cluster below chip cpu/intel/haswell! */
129 const struct cpu_intel_haswell_config *conf = cpu_cluster->chip_info;
130 vr_config = conf->vr_config;
131
132 printk(BIOS_DEBUG, "Initializing VR config.\n");
133
134 /* Configure VR_CURRENT_CONFIG. */
135 msr = rdmsr(MSR_VR_CURRENT_CONFIG);
136 /* Preserve bits 63 and 62. Bit 62 is PSI4 enable, but it is only valid
137 * on ULT systems. */
138 msr.hi &= 0xc0000000;
139 msr.hi |= (0x01 << (52 - 32)); /* PSI3 threshold - 1A. */
140 msr.hi |= (0x05 << (42 - 32)); /* PSI2 threshold - 5A. */
141 msr.hi |= (0x14 << (32 - 32)); /* PSI1 threshold - 20A. */
142
143 if (haswell_is_ult())
144 msr.hi |= (1 << (62 - 32)); /* Enable PSI4 */
145 /* Leave the max instantaneous current limit (12:0) to default. */
146 wrmsr(MSR_VR_CURRENT_CONFIG, msr);
147
148 /* Configure VR_MISC_CONFIG MSR. */
149 msr = rdmsr(MSR_VR_MISC_CONFIG);
150 /* Set the IOUT_SLOPE scalar applied to dIout in U10.1.9 format. */
151 msr.hi &= ~(0x3ff << (40 - 32));
152 msr.hi |= (0x200 << (40 - 32)); /* 1.0 */
153 /* Set IOUT_OFFSET to 0. */
154 msr.hi &= ~0xff;
155 /* Set exit ramp rate to fast. */
156 msr.hi |= (1 << (50 - 32));
157 /* Set entry ramp rate to slow. */
158 msr.hi &= ~(1 << (51 - 32));
159 /* Enable decay mode on C-state entry. */
160 msr.hi |= (1 << (52 - 32));
161 /* Set the slow ramp rate */
162 if (haswell_is_ult()) {
163 msr.hi &= ~(0x3 << (53 - 32));
164 /* Configure the C-state exit ramp rate. */
165 if (vr_config.slow_ramp_rate_enable) {
166 /* Configured slow ramp rate. */
167 msr.hi |= ((vr_config.slow_ramp_rate_set & 0x3) << (53 - 32));
168 /* Set exit ramp rate to slow. */
169 msr.hi &= ~(1 << (50 - 32));
170 } else {
171 /* Fast ramp rate / 4. */
172 msr.hi |= (1 << (53 - 32));
173 }
174 }
175 /* Set MIN_VID (31:24) to allow CPU to have full control. */
176 msr.lo &= ~0xff000000;
177 msr.lo |= (vr_config.cpu_min_vid & 0xff) << 24;
178 wrmsr(MSR_VR_MISC_CONFIG, msr);
179
180 /* Configure VR_MISC_CONFIG2 MSR. */
181 if (!haswell_is_ult())
182 return;
183
184 msr = rdmsr(MSR_VR_MISC_CONFIG2);
185 msr.lo &= ~0xffff;
186 /* Allow CPU to control minimum voltage completely (15:8) and
187 set the fast ramp voltage in 10mV steps. */
188 if (cpu_family_model() == BROADWELL_FAMILY_ULT)
189 msr.lo |= 0x006a; /* 1.56V */
190 else
191 msr.lo |= 0x006f; /* 1.60V */
192 wrmsr(MSR_VR_MISC_CONFIG2, msr);
193
194 /* Set C9/C10 VCC Min */
195 pcode_mailbox_write(MAILBOX_BIOS_CMD_WRITE_C9C10_VOLTAGE, 0x1f1f);
196 }
197
198 static void configure_pch_power_sharing(void)
199 {
200 u32 pch_power, pch_power_ext, pmsync, pmsync2;
201 int i;
202
203 /* Read PCH Power levels from PCODE */
204 pch_power = pcode_mailbox_read(MAILBOX_BIOS_CMD_READ_PCH_POWER);
205 pch_power_ext = pcode_mailbox_read(MAILBOX_BIOS_CMD_READ_PCH_POWER_EXT);
206
207 printk(BIOS_INFO, "PCH Power: PCODE Levels 0x%08x 0x%08x\n",
208 pch_power, pch_power_ext);
209
210 pmsync = RCBA32(PMSYNC_CONFIG);
211 pmsync2 = RCBA32(PMSYNC_CONFIG2);
212
213 /* Program PMSYNC_TPR_CONFIG PCH power limit values
214 * pmsync[0:4] = mailbox[0:5]
215 * pmsync[8:12] = mailbox[6:11]
216 * pmsync[16:20] = mailbox[12:17]
217 */
218 for (i = 0; i < 3; i++) {
219 u32 level = pch_power & 0x3f;
220 pch_power >>= 6;
221 pmsync &= ~(0x1f << (i * 8));
222 pmsync |= (level & 0x1f) << (i * 8);
223 }
224 RCBA32(PMSYNC_CONFIG) = pmsync;
225
226 /* Program PMSYNC_TPR_CONFIG2 Extended PCH power limit values
227 * pmsync2[0:4] = mailbox[23:18]
228 * pmsync2[8:12] = mailbox_ext[6:11]
229 * pmsync2[16:20] = mailbox_ext[12:17]
230 * pmsync2[24:28] = mailbox_ext[18:22]
231 */
232 pmsync2 &= ~0x1f;
233 pmsync2 |= pch_power & 0x1f;
234
235 for (i = 1; i < 4; i++) {
236 u32 level = pch_power_ext & 0x3f;
237 pch_power_ext >>= 6;
238 pmsync2 &= ~(0x1f << (i * 8));
239 pmsync2 |= (level & 0x1f) << (i * 8);
240 }
241 RCBA32(PMSYNC_CONFIG2) = pmsync2;
242 }
243
244 int cpu_config_tdp_levels(void)
245 {
246 msr_t platform_info;
247
248 /* Bits 34:33 indicate how many levels supported */
249 platform_info = rdmsr(MSR_PLATFORM_INFO);
250 return (platform_info.hi >> 1) & 3;
251 }
252
253 /*
254 * Configure processor power limits if possible
255 * This must be done AFTER set of BIOS_RESET_CPL
256 */
257 void set_power_limits(u8 power_limit_1_time)
258 {
259 msr_t msr = rdmsr(MSR_PLATFORM_INFO);
260 msr_t limit;
261 unsigned int power_unit;
262 unsigned int tdp, min_power, max_power, max_time;
263 u8 power_limit_1_val;
264
265 if (power_limit_1_time >= ARRAY_SIZE(power_limit_time_sec_to_msr))
266 power_limit_1_time = ARRAY_SIZE(power_limit_time_sec_to_msr) - 1;
267
268 if (!(msr.lo & PLATFORM_INFO_SET_TDP))
269 return;
270
271 /* Get units */
272 msr = rdmsr(MSR_PKG_POWER_SKU_UNIT);
273 power_unit = 2 << ((msr.lo & 0xf) - 1);
274
275 /* Get power defaults for this SKU */
276 msr = rdmsr(MSR_PKG_POWER_SKU);
277 tdp = msr.lo & 0x7fff;
278 min_power = (msr.lo >> 16) & 0x7fff;
279 max_power = msr.hi & 0x7fff;
280 max_time = (msr.hi >> 16) & 0x7f;
281
282 printk(BIOS_DEBUG, "CPU TDP: %u Watts\n", tdp / power_unit);
283
284 if (power_limit_time_msr_to_sec[max_time] > power_limit_1_time)
285 power_limit_1_time = power_limit_time_msr_to_sec[max_time];
286
287 if (min_power > 0 && tdp < min_power)
288 tdp = min_power;
289
290 if (max_power > 0 && tdp > max_power)
291 tdp = max_power;
292
293 power_limit_1_val = power_limit_time_sec_to_msr[power_limit_1_time];
294
295 /* Set long term power limit to TDP */
296 limit.lo = 0;
297 limit.lo |= tdp & PKG_POWER_LIMIT_MASK;
298 limit.lo |= PKG_POWER_LIMIT_EN;
299 limit.lo |= (power_limit_1_val & PKG_POWER_LIMIT_TIME_MASK) <<
300 PKG_POWER_LIMIT_TIME_SHIFT;
301
302 /* Set short term power limit to 1.25 * TDP */
303 limit.hi = 0;
304 limit.hi |= ((tdp * 125) / 100) & PKG_POWER_LIMIT_MASK;
305 limit.hi |= PKG_POWER_LIMIT_EN;
306 /* Power limit 2 time is only programmable on server SKU */
307
308 wrmsr(MSR_PKG_POWER_LIMIT, limit);
309
310 /* Set power limit values in MCHBAR as well */
311 mchbar_write32(MCH_PKG_POWER_LIMIT_LO, limit.lo);
312 mchbar_write32(MCH_PKG_POWER_LIMIT_HI, limit.hi);
313
314 /* Set DDR RAPL power limit by copying from MMIO to MSR */
315 msr.lo = mchbar_read32(MCH_DDR_POWER_LIMIT_LO);
316 msr.hi = mchbar_read32(MCH_DDR_POWER_LIMIT_HI);
317 wrmsr(MSR_DDR_RAPL_LIMIT, msr);
318
319 /* Use nominal TDP values for CPUs with configurable TDP */
320 if (cpu_config_tdp_levels()) {
321 msr = rdmsr(MSR_CONFIG_TDP_NOMINAL);
322 limit.hi = 0;
323 limit.lo = msr.lo & 0xff;
324 wrmsr(MSR_TURBO_ACTIVATION_RATIO, limit);
325 }
326 }
327
328 static void configure_c_states(void)
329 {
330 msr_t msr = rdmsr(MSR_PLATFORM_INFO);
331
332 const bool timed_mwait_capable = !!(msr.hi & TIMED_MWAIT_SUPPORTED);
333
334 msr = rdmsr(MSR_PKG_CST_CONFIG_CONTROL);
335 msr.lo |= (1 << 30); // Package c-state Undemotion Enable
336 msr.lo |= (1 << 29); // Package c-state Demotion Enable
337 msr.lo |= (1 << 28); // C1 Auto Undemotion Enable
338 msr.lo |= (1 << 27); // C3 Auto Undemotion Enable
339 msr.lo |= (1 << 26); // C1 Auto Demotion Enable
340 msr.lo |= (1 << 25); // C3 Auto Demotion Enable
341 msr.lo |= (1 << 15); // Lock bits 15:0
342 msr.lo &= ~(1 << 10); // Disable IO MWAIT redirection
343
344 if (timed_mwait_capable)
345 msr.lo |= (1 << 31); // Timed MWAIT Enable
346
347 /* The deepest package c-state defaults to factory-configured value. */
348 wrmsr(MSR_PKG_CST_CONFIG_CONTROL, msr);
349
350 msr = rdmsr(MSR_MISC_PWR_MGMT);
351 msr.lo &= ~(1 << 0); // Enable P-state HW_ALL coordination
352 wrmsr(MSR_MISC_PWR_MGMT, msr);
353
354 msr = rdmsr(MSR_POWER_CTL);
355 msr.lo |= (1 << 18); // Enable Energy Perf Bias MSR 0x1b0
356 msr.lo |= (1 << 1); // C1E Enable
357 msr.lo |= (1 << 0); // Bi-directional PROCHOT#
358 wrmsr(MSR_POWER_CTL, msr);
359
360 /* C-state Interrupt Response Latency Control 0 - package C3 latency */
361 msr.hi = 0;
362 msr.lo = IRTL_VALID | IRTL_1024_NS | C_STATE_LATENCY_CONTROL_0_LIMIT;
363 wrmsr(MSR_C_STATE_LATENCY_CONTROL_0, msr);
364
365 /* C-state Interrupt Response Latency Control 1 */
366 msr.hi = 0;
367 msr.lo = IRTL_VALID | IRTL_1024_NS | C_STATE_LATENCY_CONTROL_1_LIMIT;
368 wrmsr(MSR_C_STATE_LATENCY_CONTROL_1, msr);
369
370 /* C-state Interrupt Response Latency Control 2 - package C6/C7 short */
371 msr.hi = 0;
372 msr.lo = IRTL_VALID | IRTL_1024_NS | C_STATE_LATENCY_CONTROL_2_LIMIT;
373 wrmsr(MSR_C_STATE_LATENCY_CONTROL_2, msr);
374
375 /* Only Haswell ULT supports the 3-5 latency response registers */
376 if (!haswell_is_ult())
377 return;
378
379 /* C-state Interrupt Response Latency Control 3 - package C8 */
380 msr.hi = 0;
381 msr.lo = IRTL_VALID | IRTL_1024_NS | C_STATE_LATENCY_CONTROL_3_LIMIT;
382 wrmsr(MSR_C_STATE_LATENCY_CONTROL_3, msr);
383
384 /* C-state Interrupt Response Latency Control 4 - package C9 */
385 msr.hi = 0;
386 msr.lo = IRTL_VALID | IRTL_1024_NS | C_STATE_LATENCY_CONTROL_4_LIMIT;
387 wrmsr(MSR_C_STATE_LATENCY_CONTROL_4, msr);
388
389 /* C-state Interrupt Response Latency Control 5 - package C10 */
390 msr.hi = 0;
391 msr.lo = IRTL_VALID | IRTL_1024_NS | C_STATE_LATENCY_CONTROL_5_LIMIT;
392 wrmsr(MSR_C_STATE_LATENCY_CONTROL_5, msr);
393 }
394
395 static void configure_thermal_target(struct device *dev)
396 {
397 /* Make sure your devicetree has the cpu_cluster below chip cpu/intel/haswell! */
398 struct cpu_intel_haswell_config *conf = dev->upstream->dev->chip_info;
399 msr_t msr;
400
401 /* Set TCC activation offset if supported */
402 msr = rdmsr(MSR_PLATFORM_INFO);
403 if ((msr.lo & (1 << 30)) && conf->tcc_offset) {
404 msr = rdmsr(MSR_TEMPERATURE_TARGET);
405 msr.lo &= ~(0xf << 24); /* Bits 27:24 */
406 msr.lo |= (conf->tcc_offset & 0xf) << 24;
407 wrmsr(MSR_TEMPERATURE_TARGET, msr);
408 }
409 }
410
411 static void configure_misc(void)
412 {
413 msr_t msr;
414
415 msr = rdmsr(IA32_MISC_ENABLE);
416 msr.lo |= (1 << 0); /* Fast String enable */
417 msr.lo |= (1 << 3); /* TM1/TM2/EMTTM enable */
418 msr.lo |= (1 << 16); /* Enhanced SpeedStep Enable */
419 wrmsr(IA32_MISC_ENABLE, msr);
420
421 /* Disable Thermal interrupts */
422 msr.lo = 0;
423 msr.hi = 0;
424 wrmsr(IA32_THERM_INTERRUPT, msr);
425
426 /* Enable package critical interrupt only */
427 msr.lo = 1 << 4;
428 msr.hi = 0;
429 wrmsr(IA32_PACKAGE_THERM_INTERRUPT, msr);
430 }
431
432 static void set_max_ratio(void)
433 {
434 msr_t msr, perf_ctl;
435
436 perf_ctl.hi = 0;
437
438 /* Check for configurable TDP option */
439 if (get_turbo_state() == TURBO_ENABLED) {
440 msr = rdmsr(MSR_TURBO_RATIO_LIMIT);
441 perf_ctl.lo = (msr.lo & 0xff) << 8;
442 } else if (cpu_config_tdp_levels()) {
443 /* Set to nominal TDP ratio */
444 msr = rdmsr(MSR_CONFIG_TDP_NOMINAL);
445 perf_ctl.lo = (msr.lo & 0xff) << 8;
446 } else {
447 /* Platform Info bits 15:8 give max ratio */
448 msr = rdmsr(MSR_PLATFORM_INFO);
449 perf_ctl.lo = msr.lo & 0xff00;
450 }
451 wrmsr(IA32_PERF_CTL, perf_ctl);
452
453 printk(BIOS_DEBUG, "CPU: frequency set to %d\n",
454 ((perf_ctl.lo >> 8) & 0xff) * CPU_BCLK);
455 }
456
457 static void configure_mca(void)
458 {
459 msr_t msr;
460 int i;
461 const unsigned int num_banks = mca_get_bank_count();
462
463 /* Enable all error reporting */
464 msr.lo = msr.hi = ~0;
465 for (i = 0; i < num_banks; i++)
466 wrmsr(IA32_MC_CTL(i), msr);
467
468 /* TODO(adurbin): This should only be done on a cold boot. Also, some
469 * of these banks are core vs package scope. For now every CPU clears
470 * every bank. */
471 mca_clear_status();
472 }
473
474 /* All CPUs including BSP will run the following function. */
475 static void cpu_core_init(struct device *cpu)
476 {
477 /* Clear out pending MCEs */
478 configure_mca();
479
480 enable_lapic_tpr();
481
482 /* Set virtualization based on Kconfig option */
483 set_vmx_and_lock();
484
485 /* Configure C States */
486 configure_c_states();
487
488 /* Configure Enhanced SpeedStep and Thermal Sensors */
489 configure_misc();
490
491 /* Thermal throttle activation offset */
492 configure_thermal_target(cpu);
493
494 /* Enable Direct Cache Access */
495 configure_dca_cap();
496
497 /* Set energy policy */
498 set_energy_perf_bias(ENERGY_POLICY_NORMAL);
499
500 /* Enable Turbo */
501 enable_turbo();
502 }
503
504 /* MP initialization support. */
505 static const void *microcode_patch;
506
507 static void pre_mp_init(void)
508 {
509 /* Setup MTRRs based on physical address size. */
510 x86_setup_mtrrs_with_detect();
511 x86_mtrr_check();
512
513 initialize_vr_config();
514
515 if (!haswell_is_ult())
516 return;
517
518 calibrate_24mhz_bclk();
519 configure_pch_power_sharing();
520 }
521
522 static int get_cpu_count(void)
523 {
524 msr_t msr;
525 unsigned int num_threads;
526 unsigned int num_cores;
527
528 msr = rdmsr(MSR_CORE_THREAD_COUNT);
529 num_threads = (msr.lo >> 0) & 0xffff;
530 num_cores = (msr.lo >> 16) & 0xffff;
531 printk(BIOS_DEBUG, "CPU has %u cores, %u threads enabled.\n",
532 num_cores, num_threads);
533
534 return num_threads;
535 }
536
537 static void get_microcode_info(const void **microcode, int *parallel)
538 {
539 microcode_patch = intel_microcode_find();
540 *microcode = microcode_patch;
541 *parallel = 1;
542 }
543
544 static void per_cpu_smm_trigger(void)
545 {
546 /* Relocate the SMM handler. */
547 smm_relocate();
548
549 /* After SMM relocation a 2nd microcode load is required. */
550 intel_microcode_load_unlocked(microcode_patch);
551 }
552
553 static void post_mp_init(void)
554 {
555 /* Set Max Ratio */
556 set_max_ratio();
557
558 /* Now that all APs have been relocated as well as the BSP let SMIs
559 * start flowing. */
560 global_smi_enable();
561
562 /* Lock down the SMRAM space. */
563 smm_lock();
564 }
565
566 static const struct mp_ops mp_ops = {
567 .pre_mp_init = pre_mp_init,
568 .get_cpu_count = get_cpu_count,
569 .get_smm_info = smm_info,
570 .get_microcode_info = get_microcode_info,
571 .pre_mp_smm_init = smm_initialize,
572 .per_cpu_smm_trigger = per_cpu_smm_trigger,
573 .relocation_handler = smm_relocation_handler,
574 .post_mp_init = post_mp_init,
575 };
576
577 void mp_init_cpus(struct bus *cpu_bus)
578 {
579 cpu_cluster = cpu_bus->dev;
580 /* TODO: Handle mp_init_with_smm failure? */
581 mp_init_with_smm(cpu_bus, &mp_ops);
582
583 /* pre_mp_init made the flash not cacheable. Reset to WP for performance. */
584 mtrr_use_temp_range(CACHE_ROM_BASE, CAR_CACHE_ROM_SIZE,
585 MTRR_TYPE_WRPROT);
586 }
587
588 static struct device_operations cpu_dev_ops = {
589 .init = cpu_core_init,
590 };
591
592 static const struct cpu_device_id cpu_table[] = {
593 { X86_VENDOR_INTEL, CPUID_HASWELL_A0, CPUID_EXACT_MATCH_MASK },
594 { X86_VENDOR_INTEL, CPUID_HASWELL_B0, CPUID_EXACT_MATCH_MASK },
595 { X86_VENDOR_INTEL, CPUID_HASWELL_C0, CPUID_EXACT_MATCH_MASK },
596 { X86_VENDOR_INTEL, CPUID_HASWELL_ULT_B0, CPUID_EXACT_MATCH_MASK },
597 { X86_VENDOR_INTEL, CPUID_HASWELL_ULT_C0, CPUID_EXACT_MATCH_MASK },
598 { X86_VENDOR_INTEL, CPUID_CRYSTALWELL_B0, CPUID_EXACT_MATCH_MASK },
599 { X86_VENDOR_INTEL, CPUID_CRYSTALWELL_C0, CPUID_EXACT_MATCH_MASK },
600 { X86_VENDOR_INTEL, CPUID_BROADWELL_C0, CPUID_EXACT_MATCH_MASK },
601 { X86_VENDOR_INTEL, CPUID_BROADWELL_ULT_C0, CPUID_EXACT_MATCH_MASK },
602 { X86_VENDOR_INTEL, CPUID_BROADWELL_ULT_D0, CPUID_EXACT_MATCH_MASK },
603 { X86_VENDOR_INTEL, CPUID_BROADWELL_ULT_E0, CPUID_EXACT_MATCH_MASK },
604 CPU_TABLE_END
605 };
606
607 static const struct cpu_driver driver __cpu_driver = {
608 .ops = &cpu_dev_ops,
609 .id_table = cpu_table,
610 };