712cd0508dc4f51dcdb004fd60627929ea8ad00a
[coreboot.git] / src / cpu / intel / model_6xx / model_6xx_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 uint32_t microcode_updates[] = {
15         /* WARNING - Intel has a new data structure that has variable length
16          * microcode update lengths.  They are encoded in int 8 and 9.  A
17          * dummy header of nulls must terminate the list.
18          */
19 #include "microcode-534-MU16810d.h"
20 #include "microcode-535-MU16810e.h"
21 #include "microcode-536-MU16810f.h"
22 #include "microcode-538-MU168111.h"
23
24 #include "microcode-550-MU168307.h"
25 #include "microcode-551-MU168308.h"
26 #include "microcode-727-MU168313.h"
27 #include "microcode-728-MU168314.h"
28
29         /*  Dummy terminator  */
30         0x0, 0x0, 0x0, 0x0,
31         0x0, 0x0, 0x0, 0x0,
32         0x0, 0x0, 0x0, 0x0,
33         0x0, 0x0, 0x0, 0x0,
34 };
35
36
37 static void model_6xx_init(device_t dev)
38 {
39         /* Turn on caching if we haven't already */
40         x86_enable_cache();
41         x86_setup_mtrrs(36);
42         x86_mtrr_check();
43
44         /* Update the microcode */
45         intel_update_microcode(microcode_updates);
46
47         /* Enable the local cpu apics */
48         setup_lapic();
49 };
50
51 static struct device_operations cpu_dev_ops = {
52         .init     = model_6xx_init,
53 };
54
55 /*
56  * Intel Pentium Pro Processor Specification Update
57  * http://download.intel.com/design/archives/processors/pro/docs/24268935.pdf
58  *
59  * Intel Pentium II Processor Specification Update
60  * http://download.intel.com/design/PentiumII/specupdt/24333749.pdf
61  *
62  * Mobile Intel Pentium II Processor Specification Update
63  * http://download.intel.com/design/intarch/specupdt/24388757.pdf
64  *
65  * Intel Celeron Processor Identification Information
66  * http://www.intel.com/design/celeron/qit/update.pdf
67  *
68  * Intel Pentium II Xeon Processor Specification Update
69  * http://download.intel.com/support/processors/pentiumii/xeon/24377632.pdf
70  *
71  * Intel Pentium III Processor Identification and Package Information
72  * http://www.intel.com/design/pentiumiii/qit/update.pdf
73  *
74  * Intel Pentium III Processor Specification Update
75  * http://download.intel.com/design/intarch/specupdt/24445358.pdf
76  *
77  * Mobile Intel Pentium III/III-M Processor Specification Update
78  * http://download.intel.com/design/intarch/specupdt/24530663.pdf
79  */
80 static struct cpu_device_id cpu_table[] = {
81         { X86_VENDOR_INTEL, 0x0611 }, /* Pentium Pro, B0 */
82         { X86_VENDOR_INTEL, 0x0612 }, /* Pentium Pro, C0 */
83         { X86_VENDOR_INTEL, 0x0616 }, /* Pentium Pro, sA0 */
84         { X86_VENDOR_INTEL, 0x0617 }, /* Pentium Pro, sA1 */
85         { X86_VENDOR_INTEL, 0x0619 }, /* Pentium Pro, sB1 */
86
87         { X86_VENDOR_INTEL, 0x0633 }, /* PII, C0 */
88         { X86_VENDOR_INTEL, 0x0634 }, /* PII, C1 */
89
90         { X86_VENDOR_INTEL, 0x0650 }, /* PII/Celeron, dA0/mdA0/A0 */
91         { X86_VENDOR_INTEL, 0x0651 }, /* PII/Celeron, dA1/A1 */
92         { X86_VENDOR_INTEL, 0x0652 }, /* PII/Celeron/Xeon, dB0/mdB0/B0 */
93         { X86_VENDOR_INTEL, 0x0653 }, /* PII/Xeon, dB1/B1 */
94
95         { X86_VENDOR_INTEL, 0x0660 }, /* Celeron, A0 */
96         { X86_VENDOR_INTEL, 0x0665 }, /* Celeron, B0 */
97         { X86_VENDOR_INTEL, 0x066a }, /* PII, mdxA0/dmmA0 + others */
98
99         { X86_VENDOR_INTEL, 0x0672 }, /* PIII, kB0 */
100         { X86_VENDOR_INTEL, 0x0673 }, /* PIII, kC0 */
101
102         { X86_VENDOR_INTEL, 0x0680 },
103         { X86_VENDOR_INTEL, 0x0681 }, /* PIII, cA2/cA2c/A2/BA2/PA2/MA2 */
104         { X86_VENDOR_INTEL, 0x0683 }, /* PIII/Celeron, cB0/cB0c/B0/BB0/PB0/MB0*/
105         { X86_VENDOR_INTEL, 0x0686 }, /* PIII/Celeron, cC0/C0/BC0/PC0/MC0 */
106         { X86_VENDOR_INTEL, 0x068a }, /* PIII/Celeron, cD0/D0/BD0/PD0 */
107
108         { X86_VENDOR_INTEL, 0x06a0 }, /* PIII, A0 */
109         { X86_VENDOR_INTEL, 0x06a1 }, /* PIII, A1 */
110         { X86_VENDOR_INTEL, 0x06a4 }, /* PIII, B0 */
111         { 0, 0 },
112 };
113
114 static const struct cpu_driver driver __cpu_driver = {
115         .ops      = &cpu_dev_ops,
116         .id_table = cpu_table,
117 };