Changelog:
[coreboot.git] / src / cpu / amd / model_lx / model_lx_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/lapic.h>
7 #include <cpu/x86/cache.h>
8
9 static void vsm_end_post_smi(void)
10 {
11         __asm__ volatile (
12                           "push %ax\n"
13                           "mov $0x5000, %ax\n"
14                           ".byte 0x0f, 0x38\n"
15                           "pop %ax\n"
16                           );
17 }
18
19 static void model_lx_init(device_t dev)
20 {
21         printk_debug("model_lx_init\n");
22
23         /* Turn on caching if we haven't already */
24         
25         x86_enable_cache();
26
27         /* Enable the local cpu apics */
28         //setup_lapic();
29
30         vsm_end_post_smi();
31
32         printk_debug("model_lx_init DONE\n");
33 };
34
35 static struct device_operations cpu_dev_ops = {
36         .init   = model_lx_init,
37 };
38
39 static struct cpu_device_id cpu_table[] = {
40         { X86_VENDOR_AMD, 0x05A2 },
41         { 0, 0 },
42 };
43
44 static struct cpu_driver driver __cpu_driver = {
45         .ops      = &cpu_dev_ops,
46         .id_table = cpu_table,
47 };