mpspec.h: Tweak the write_smp_table macro so that it is safe if passed a complex...
[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_mtrr_check();
19
20         /* Enable the local cpu apics */
21         setup_lapic();
22 };
23
24 static struct device_operations cpu_dev_ops = {
25         .init     = model_centaur_init,
26 };
27
28 #warning "FIXME - need correct cpu id here for VIA C3"
29 static struct cpu_device_id cpu_table[] = {
30         { X86_VENDOR_CENTAUR, 0x0670 },         // VIA C3 Samual 2
31         { X86_VENDOR_CENTAUR, 0x0678 },         // VIA C3 Ezra
32         { X86_VENDOR_CENTAUR, 0x0680 },         // VIA C3 Ezra-T
33         { 0, 0 },
34 };
35
36 static struct cpu_driver driver __cpu_driver = {
37         .ops      = &cpu_dev_ops,
38         .id_table = cpu_table,
39 };