EPIA-M fixup
[coreboot.git] / src / cpu / via / model_centaur / model_centaur_init.c
1 #include <console/console.h>
2 #include <device/device.h>
3 #include <device/device.h>
4 #include <device/pci.h>
5 #include <string.h>
6 #include <cpu/cpu.h>
7 #include <cpu/x86/mtrr.h>
8 #include <cpu/x86/msr.h>
9 #include <cpu/x86/lapic.h>
10 #include <cpu/intel/microcode.h>
11 #include <cpu/x86/cache.h>
12 #include <cpu/x86/mtrr.h>
13
14 static void model_centaur_init(device_t dev)
15 {
16         /* Turn on caching if we haven't already */
17         x86_enable_cache();
18         x86_setup_mtrrs(36);
19         x86_mtrr_check();
20
21         /* Enable the local cpu apics */
22         setup_lapic();
23 };
24
25 static struct device_operations cpu_dev_ops = {
26         .init     = model_centaur_init,
27 };
28
29 #warning "FIXME - need correct cpu id here for VIA C3"
30 static struct cpu_device_id cpu_table[] = {
31         { X86_VENDOR_CENTAUR, 0x0670 },         // VIA C3 Samual 2
32         { X86_VENDOR_CENTAUR, 0x0671 },         // VIA C3 Samual 2
33         { X86_VENDOR_CENTAUR, 0x0672 },         // VIA C3 Samual 2
34         { X86_VENDOR_CENTAUR, 0x0673 },         // VIA C3 Samual 2
35         { X86_VENDOR_CENTAUR, 0x0674 },         // VIA C3 Samual 2
36         { X86_VENDOR_CENTAUR, 0x0675 },         // VIA C3 Samual 2
37         { X86_VENDOR_CENTAUR, 0x0676 },         // VIA C3 Samual 2
38         { X86_VENDOR_CENTAUR, 0x0677 },         // VIA C3 Samual 2
39         { X86_VENDOR_CENTAUR, 0x0678 },         // VIA C3 Ezra
40         { X86_VENDOR_CENTAUR, 0x0680 },         // VIA C3 Ezra-T
41         { X86_VENDOR_CENTAUR, 0x0698 },         // VIA C3 Nehemiah
42         { 0, 0 },
43 };
44
45 static struct cpu_driver driver __cpu_driver = {
46         .ops      = &cpu_dev_ops,
47         .id_table = cpu_table,
48 };