- Add new cvs code to cvs
[coreboot.git] / src / cpu / intel / model_f2x / model_f2x_init.c
1 #include <console/console.h>
2 #include <device/device.h>
3 #include <device/chip.h>
4 #include <device/device.h>
5 #include <device/pci.h>
6 #include <string.h>
7 #include <cpu/cpu.h>
8 #include <cpu/x86/mtrr.h>
9 #include <cpu/x86/msr.h>
10 #include <cpu/x86/lapic.h>
11 #include <cpu/intel/microcode.h>
12 #include <cpu/x86/cache.h>
13 #include <cpu/x86/mtrr.h>
14
15 /* 512KB cache */
16 static uint32_t microcode_updates[] = {
17         /* WARNING - Intel has a new data structure that has variable length
18          * microcode update lengths.  They are encoded in int 8 and 9.  A
19          * dummy header of nulls must terminate the list.
20          */
21 #include "microcode_m02f2203.h"
22 #include "microcode_m02f2410.h"
23 //#include "microcode_m02f2728.h"
24 #include "microcode_m02f2734.h"
25 #include "microcode_m02f2918.h"
26         /*  Dummy terminator  */
27         0x0, 0x0, 0x0, 0x0,
28         0x0, 0x0, 0x0, 0x0,
29         0x0, 0x0, 0x0, 0x0,
30         0x0, 0x0, 0x0, 0x0,
31 };
32
33
34 static void model_f2x_init(device_t dev)
35 {
36         /* Turn on caching if we haven't already */
37         x86_enable_cache();
38         x86_setup_mtrrs();
39         x86_mtrr_check();
40         
41         /* Update the microcode */
42         intel_update_microcode(microcode_updates);
43
44         /* Enable the local cpu apics */
45         setup_lapic();
46
47         /* Start up my cpu siblings */
48         intel_sibling_init(cpu);
49 };
50
51 static struct device_operations cpu_dev_ops = {
52         .init     = model_f1x_init,
53 };
54 static struct cpu_device_id cpu_table[] = {
55         { X86_VENDOR_INTEL, 0x0f22 },
56         { X86_VENDOR_INTEL, 0x0f24 },
57         { X86_VENDOR_INTEL, 0x0f27 },
58         { X86_VENDOR_INTEL, 0x0f29 },
59 //      { X86_VENDOR_INTEL, 0x0f25 }, /* I don't have a microcode update for this cpu */
60         { 0, 0 },
61 };
62
63 static struct cpu_driver driver __cpu_driver = {
64         .ops      = &cpu_dev_ops,
65         .id_table = cpu_table,
66 };