34599e91f8edc1ef01f8fe13e8c68f246435e365
[coreboot.git] / src / cpu / intel / model_6xx / model_6xx_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/mtrr.h>
7 #include <cpu/x86/msr.h>
8 #include <cpu/x86/lapic.h>
9 #include <cpu/intel/microcode.h>
10 #include <cpu/x86/cache.h>
11
12 static uint32_t microcode_updates[] = {
13         /* WARNING - Intel has a new data structure that has variable length
14          * microcode update lengths.  They are encoded in int 8 and 9.  A
15          * dummy header of nulls must terminate the list.
16          */
17
18 #include "microcode-99-B_c6_612.h"
19 #include "microcode-43-B_c6_617.h"
20 #include "microcode-51-B_c6_616.h"
21 #include "microcode-153-d2_619.h"
22
23 #include "microcode-308-MU163336.h"
24 #include "microcode-309-MU163437.h"
25
26 #include "microcode-358-MU166d05.h"
27 #include "microcode-359-MU166d06.h"
28 #include "microcode-386-MU16600a.h"
29 #include "microcode-398-MU166503.h"
30 #include "microcode-399-MU166a0b.h"
31 #include "microcode-400-MU166a0c.h"
32 #include "microcode-401-MU166a0d.h"
33 #include "microcode-402-MU166d07.h"
34
35 #include "microcode-566-mu26a003.h"
36 #include "microcode-588-mu26a101.h"
37 #include "microcode-620-MU26a401.h"
38
39         /*  Dummy terminator  */
40         0x0, 0x0, 0x0, 0x0,
41         0x0, 0x0, 0x0, 0x0,
42         0x0, 0x0, 0x0, 0x0,
43         0x0, 0x0, 0x0, 0x0,
44 };
45
46 static void model_6xx_init(device_t dev)
47 {
48         /* Turn on caching if we haven't already */
49         x86_enable_cache();
50         x86_setup_mtrrs(36);
51         x86_mtrr_check();
52
53         /* Update the microcode */
54         intel_update_microcode(microcode_updates);
55
56         /* Enable the local cpu apics */
57         setup_lapic();
58 };
59
60 static struct device_operations cpu_dev_ops = {
61         .init     = model_6xx_init,
62 };
63
64 /*
65  * Intel Pentium Pro Processor Specification Update
66  * http://download.intel.com/design/archives/processors/pro/docs/24268935.pdf
67  *
68  * Intel Pentium II Processor Specification Update
69  * http://download.intel.com/design/PentiumII/specupdt/24333749.pdf
70  *
71  * Mobile Intel Pentium II Processor Specification Update
72  * http://download.intel.com/design/intarch/specupdt/24388757.pdf
73  *
74  * Intel Celeron Processor Identification Information
75  * http://www.intel.com/design/celeron/qit/update.pdf
76  *
77  * Intel Pentium II Xeon Processor Specification Update
78  * http://download.intel.com/support/processors/pentiumii/xeon/24377632.pdf
79  *
80  * Intel Pentium III Processor Identification and Package Information
81  * http://www.intel.com/design/pentiumiii/qit/update.pdf
82  *
83  * Intel Pentium III Processor Specification Update
84  * http://download.intel.com/design/intarch/specupdt/24445358.pdf
85  *
86  * Mobile Intel Pentium III/III-M Processor Specification Update
87  * http://download.intel.com/design/intarch/specupdt/24530663.pdf
88  */
89 static struct cpu_device_id cpu_table[] = {
90         { X86_VENDOR_INTEL, 0x0611 }, /* Pentium Pro, B0 */
91         { X86_VENDOR_INTEL, 0x0612 }, /* Pentium Pro, C0 */
92         { X86_VENDOR_INTEL, 0x0616 }, /* Pentium Pro, sA0 */
93         { X86_VENDOR_INTEL, 0x0617 }, /* Pentium Pro, sA1 */
94         { X86_VENDOR_INTEL, 0x0619 }, /* Pentium Pro, sB1 */
95
96         { X86_VENDOR_INTEL, 0x0633 }, /* PII, C0 */
97         { X86_VENDOR_INTEL, 0x0634 }, /* PII, C1 */
98
99         { X86_VENDOR_INTEL, 0x0660 }, /* Celeron, A0 */
100         { X86_VENDOR_INTEL, 0x0665 }, /* Celeron, B0 */
101         { X86_VENDOR_INTEL, 0x066a }, /* PII, mdxA0/dmmA0 + others */
102
103         { X86_VENDOR_INTEL, 0x0680 },
104         { X86_VENDOR_INTEL, 0x0681 }, /* PIII, cA2/cA2c/A2/BA2/PA2/MA2 */
105         { X86_VENDOR_INTEL, 0x0683 }, /* PIII/Celeron, cB0/cB0c/B0/BB0/PB0/MB0*/
106         { X86_VENDOR_INTEL, 0x0686 }, /* PIII/Celeron, cC0/C0/BC0/PC0/MC0 */
107         { X86_VENDOR_INTEL, 0x068a }, /* PIII/Celeron, cD0/D0/BD0/PD0 */
108
109         { X86_VENDOR_INTEL, 0x06a0 }, /* PIII, A0 */
110         { X86_VENDOR_INTEL, 0x06a1 }, /* PIII, A1 */
111         { X86_VENDOR_INTEL, 0x06a4 }, /* PIII, B0 */
112         { 0, 0 },
113 };
114
115 static const struct cpu_driver driver __cpu_driver = {
116         .ops      = &cpu_dev_ops,
117         .id_table = cpu_table,
118 };