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