xref: /aosp_15_r20/external/coreboot/src/cpu/intel/model_67x/model_67x_init.c (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <device/device.h>
4 #include <cpu/cpu.h>
5 #include <cpu/x86/mtrr.h>
6 #include <cpu/intel/microcode.h>
7 #include <cpu/x86/cache.h>
8 #include <cpu/intel/l2_cache.h>
9 
model_67x_init(struct device * cpu)10 static void model_67x_init(struct device *cpu)
11 {
12 	/* Update the microcode */
13 	intel_update_microcode_from_cbfs();
14 
15 	/* Initialize L2 cache */
16 	p6_configure_l2_cache();
17 
18 	/* Turn on caching if we haven't already */
19 	enable_cache();
20 
21 	/* Setup MTRRs */
22 	x86_setup_mtrrs();
23 	x86_mtrr_check();
24 }
25 
26 static struct device_operations cpu_dev_ops = {
27 	.init     = model_67x_init,
28 };
29 
30 /*
31  * Intel Pentium III Processor Identification and Package Information
32  * http://www.intel.com/design/pentiumiii/qit/update.pdf
33  *
34  * Intel Pentium III Processor Specification Update
35  * http://download.intel.com/design/intarch/specupdt/24445358.pdf
36  */
37 static const struct cpu_device_id cpu_table[] = {
38 	{ X86_VENDOR_INTEL, 0x0671, CPUID_EXACT_MATCH_MASK },
39 	{ X86_VENDOR_INTEL, 0x0672, CPUID_EXACT_MATCH_MASK }, /* PIII, kB0 */
40 	{ X86_VENDOR_INTEL, 0x0673, CPUID_EXACT_MATCH_MASK }, /* PIII, kC0 */
41 	CPU_TABLE_END
42 };
43 
44 static const struct cpu_driver driver __cpu_driver = {
45 	.ops      = &cpu_dev_ops,
46 	.id_table = cpu_table,
47 };
48