MTRR: get physical address size from CPUID
[coreboot.git] / src / cpu / intel / model_6dx / model_6dx_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-1355-m206d618.h"
14
15         /*  Dummy terminator  */
16         0x0, 0x0, 0x0, 0x0,
17         0x0, 0x0, 0x0, 0x0,
18         0x0, 0x0, 0x0, 0x0,
19         0x0, 0x0, 0x0, 0x0,
20 };
21
22 static void model_6dx_init(device_t dev)
23 {
24         /* Turn on caching if we haven't already */
25         x86_enable_cache();
26         x86_setup_mtrrs();
27         x86_mtrr_check();
28
29         /* Update the microcode */
30         intel_update_microcode(microcode_updates);
31
32         /* Enable the local cpu apics */
33         setup_lapic();
34 };
35
36 static struct device_operations cpu_dev_ops = {
37         .init     = model_6dx_init,
38 };
39
40 static struct cpu_device_id cpu_table[] = {
41         { X86_VENDOR_INTEL, 0x06D0 }, /* Pentium M on 90nm with 2MiB of L2 cache */
42         { X86_VENDOR_INTEL, 0x06D6 }, /* Pentium M on 90nm with 2MiB of L2 cache */
43         { 0, 0 },
44 };
45
46 static const struct cpu_driver driver __cpu_driver = {
47         .ops      = &cpu_dev_ops,
48         .id_table = cpu_table,
49 };