xref: /aosp_15_r20/external/coreboot/src/cpu/intel/model_6bx/model_6bx_init.c (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
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/intel/microcode.h>
8 #include <cpu/x86/cache.h>
9 #include <cpu/x86/name.h>
10 
model_6bx_init(struct device * cpu)11 static void model_6bx_init(struct device *cpu)
12 {
13 	char processor_name[49];
14 
15 	/* Turn on caching if we haven't already */
16 	enable_cache();
17 
18 	/* Update the microcode */
19 	intel_update_microcode_from_cbfs();
20 
21 	/* Print processor name */
22 	fill_processor_name(processor_name);
23 	printk(BIOS_INFO, "CPU: %s.\n", processor_name);
24 
25 	/* Setup MTRRs */
26 	x86_setup_mtrrs();
27 	x86_mtrr_check();
28 }
29 
30 static struct device_operations cpu_dev_ops = {
31 	.init     = model_6bx_init,
32 };
33 
34 /*
35  * Pentium III Processor Identification and Package Information.
36  * http://www.intel.com/design/pentiumiii/qit/update.pdf
37  *
38  * Intel Pentium III Processor Specification Update
39  * http://download.intel.com/design/intarch/specupdt/24445358.pdf
40  */
41 static const struct cpu_device_id cpu_table[] = {
42 	/* Pentium III/Celeron, tA1/A1/FPA1 */
43 	{ X86_VENDOR_INTEL, 0x06b1, CPUID_EXACT_MATCH_MASK },
44 	{ X86_VENDOR_INTEL, 0x06b4, CPUID_EXACT_MATCH_MASK }, /* Pentium III, tB1/FPB1 */
45 	CPU_TABLE_END
46 };
47 
48 static const struct cpu_driver driver __cpu_driver = {
49 	.ops      = &cpu_dev_ops,
50 	.id_table = cpu_table,
51 };
52