Move out Katmai Slot 1 CPUs (model_67x) from model_6xx to model_67x.
[coreboot.git] / src / cpu / intel / model_67x / model_67x_init.c
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2007-2009 coresystems GmbH
5  * Copyright (C) 2010 Keith Hui <buurin@gmail.com>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; version 2 of the License.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20
21 #include <console/console.h>
22 #include <string.h>
23 #include <cpu/cpu.h>
24 #include <cpu/x86/mtrr.h>
25 #include <cpu/x86/lapic.h>
26 #include <cpu/intel/microcode.h>
27 #include <cpu/x86/cache.h>
28 #include <cpu/x86/msr.h>
29
30 static const uint32_t microcode_updates[] = {
31         /* Include microcode updates here. */
32         #include "microcode-293-MU267114.h"
33         #include "microcode-530-MU16730e.h"
34         #include "microcode-531-MU26732e.h"
35         #include "microcode-539-MU167210.h"
36         #include "microcode-540-MU267238.h"
37         /* Dummy terminator */
38         0x0, 0x0, 0x0, 0x0,
39         0x0, 0x0, 0x0, 0x0,
40         0x0, 0x0, 0x0, 0x0,
41         0x0, 0x0, 0x0, 0x0,
42 };
43
44 static void model_67x_init(device_t cpu)
45 {
46         /* Update the microcode */
47         intel_update_microcode(microcode_updates);
48
49         /* Turn on caching if we haven't already */
50         x86_enable_cache();
51
52         /* Setup MTRRs */
53         x86_setup_mtrrs(36);
54         x86_mtrr_check();
55
56         /* Enable the local cpu apics */
57         setup_lapic();
58 }
59
60 static struct device_operations cpu_dev_ops = {
61         .init     = model_67x_init,
62 };
63
64 /*
65  * Intel Pentium III Processor Identification and Package Information
66  * http://www.intel.com/design/pentiumiii/qit/update.pdf
67  *
68  * Intel Pentium III Processor Specification Update
69  * http://download.intel.com/design/intarch/specupdt/24445358.pdf
70  */
71 static struct cpu_device_id cpu_table[] = {
72         { X86_VENDOR_INTEL, 0x0671 },
73         { X86_VENDOR_INTEL, 0x0672 }, /* PIII, kB0 */
74         { X86_VENDOR_INTEL, 0x0673 }, /* PIII, kC0 */
75
76         { 0, 0 },
77 };
78
79 static const struct cpu_driver driver __cpu_driver = {
80         .ops      = &cpu_dev_ops,
81         .id_table = cpu_table,
82 };