MTRR: get physical address size from CPUID
[coreboot.git] / src / cpu / intel / model_69x / model_69x_init.c
1 #include <console/console.h>
2 #include <device/device.h>
3 #include <device/pci.h>
4 #include <string.h>
5 #include <cpu/cpu.h>
6 #include <cpu/x86/mtrr.h>
7 #include <cpu/x86/msr.h>
8 #include <cpu/x86/lapic.h>
9 #include <cpu/intel/microcode.h>
10 #include <cpu/x86/cache.h>
11
12 static uint32_t microcode_updates[] = {
13         #include "microcode-1376-m8069547.h"
14         #include "microcode-1373-m1069507.h"
15         #include "microcode-1374-m2069507.h"
16
17         /*  Dummy terminator  */
18         0x0, 0x0, 0x0, 0x0,
19         0x0, 0x0, 0x0, 0x0,
20         0x0, 0x0, 0x0, 0x0,
21         0x0, 0x0, 0x0, 0x0,
22 };
23
24 static void model_69x_init(device_t dev)
25 {
26         /* Turn on caching if we haven't already */
27         x86_enable_cache();
28         x86_setup_mtrrs();
29         x86_mtrr_check();
30
31         /* Update the microcode */
32         intel_update_microcode(microcode_updates);
33
34         /* Enable the local cpu apics */
35         setup_lapic();
36 };
37
38 static struct device_operations cpu_dev_ops = {
39         .init     = model_69x_init,
40 };
41
42 static struct cpu_device_id cpu_table[] = {
43         { X86_VENDOR_INTEL, 0x0690 }, /* Pentium M */
44         { X86_VENDOR_INTEL, 0x0695 },
45         { 0, 0 },
46 };
47
48 static const struct cpu_driver driver __cpu_driver = {
49         .ops      = &cpu_dev_ops,
50         .id_table = cpu_table,
51 };