blob: b2e55853a58d9820c882dfc16c81d57c3e5e4f12 [file] [log] [blame]
Joseph Smith7488e042010-04-09 11:10:25 +00001/*
2 * This file is part of the coreboot project.
Stefan Reinauer14e22772010-04-27 06:56:47 +00003 *
Joseph Smith7488e042010-04-09 11:10:25 +00004 * Copyright (C) 2007-2009 coresystems GmbH
5 * Copyright (C) 2010 Joseph Smith <joe@settoplinux.org>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; version 2 of
10 * the License.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
Joseph Smith7488e042010-04-09 11:10:25 +000016 */
17
18#include <console/console.h>
19#include <device/device.h>
Joseph Smith7488e042010-04-09 11:10:25 +000020#include <string.h>
21#include <cpu/cpu.h>
22#include <cpu/x86/mtrr.h>
23#include <cpu/x86/msr.h>
24#include <cpu/x86/lapic.h>
25#include <cpu/intel/microcode.h>
26#include <cpu/x86/cache.h>
Uwe Hermannaac8f662010-09-29 09:54:16 +000027#include <cpu/x86/name.h>
Joseph Smith7488e042010-04-09 11:10:25 +000028
Edward O'Callaghan2c9d2cf2014-10-27 23:29:29 +110029static void model_6bx_init(struct device *cpu)
Joseph Smith7488e042010-04-09 11:10:25 +000030{
31 char processor_name[49];
32
33 /* Turn on caching if we haven't already */
34 x86_enable_cache();
35
36 /* Update the microcode */
Alexandru Gagniuc2c38f502013-12-06 23:14:54 -060037 intel_update_microcode_from_cbfs();
Joseph Smith7488e042010-04-09 11:10:25 +000038
39 /* Print processor name */
40 fill_processor_name(processor_name);
41 printk(BIOS_INFO, "CPU: %s.\n", processor_name);
42
Joseph Smith7488e042010-04-09 11:10:25 +000043 /* Setup MTRRs */
Sven Schnelleadfbcb792012-01-10 12:01:43 +010044 x86_setup_mtrrs();
Joseph Smith7488e042010-04-09 11:10:25 +000045 x86_mtrr_check();
46
Joseph Smith7488e042010-04-09 11:10:25 +000047 /* Enable the local cpu apics */
48 setup_lapic();
49}
50
51static struct device_operations cpu_dev_ops = {
52 .init = model_6bx_init,
53};
54
Uwe Hermanncc0dc7f2010-10-04 20:43:55 +000055/*
56 * Pentium III Processor Identification and Package Information.
57 * http://www.intel.com/design/pentiumiii/qit/update.pdf
58 *
59 * Intel Pentium III Processor Specification Update
60 * http://download.intel.com/design/intarch/specupdt/24445358.pdf
61 */
Joseph Smith7488e042010-04-09 11:10:25 +000062static struct cpu_device_id cpu_table[] = {
Uwe Hermanncc0dc7f2010-10-04 20:43:55 +000063 { X86_VENDOR_INTEL, 0x06b1 }, /* Pentium III/Celeron, tA1/A1/FPA1 */
64 { X86_VENDOR_INTEL, 0x06b4 }, /* Pentium III, tB1/FPB1 */
Joseph Smith7488e042010-04-09 11:10:25 +000065 { 0, 0 },
66};
67
68static const struct cpu_driver driver __cpu_driver = {
69 .ops = &cpu_dev_ops,
70 .id_table = cpu_table,
71};