blob: 05c5bb1b8dd6e2c41ee5f5ed1d5c1c711b16a954 [file] [log] [blame]
Ed Swierk19963132008-08-25 14:41:11 +00001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2008 Arastra, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
Ed Swierk19963132008-08-25 14:41:11 +000014 */
15
16#include <console/console.h>
17#include <device/device.h>
Ed Swierk19963132008-08-25 14:41:11 +000018#include <string.h>
19#include <cpu/cpu.h>
20#include <cpu/x86/mtrr.h>
21#include <cpu/x86/msr.h>
22#include <cpu/x86/lapic.h>
23#include <cpu/intel/microcode.h>
24#include <cpu/x86/cache.h>
25#include <cpu/x86/mtrr.h>
26
Edward O'Callaghan2c9d2cf2014-10-27 23:29:29 +110027static void ep80579_init(struct device *dev)
Ed Swierk19963132008-08-25 14:41:11 +000028{
29 /* Turn on caching if we haven't already */
30 x86_enable_cache();
Sven Schnelleadfbcb792012-01-10 12:01:43 +010031 x86_setup_mtrrs();
Ed Swierk19963132008-08-25 14:41:11 +000032 x86_mtrr_check();
33
34 /* Update the microcode */
Alexandru Gagniuc2c38f502013-12-06 23:14:54 -060035 intel_update_microcode_from_cbfs();
Ed Swierk19963132008-08-25 14:41:11 +000036
37 /* Enable the local cpu apics */
38 setup_lapic();
39};
40
41static struct device_operations cpu_dev_ops = {
42 .init = ep80579_init,
43};
44
45static struct cpu_device_id cpu_table[] = {
46 { X86_VENDOR_INTEL, 0x10650 }, /* EP80579 */
47 { 0, 0 },
48};
49
Stefan Reinauer8013d5a2010-03-29 19:04:13 +000050static const struct cpu_driver driver __cpu_driver = {
Ed Swierk19963132008-08-25 14:41:11 +000051 .ops = &cpu_dev_ops,
52 .id_table = cpu_table,
53};