blob: d8acd5efe181fa6939c485259ef7f0ce0938c054 [file] [log] [blame]
Eric Biedermanfcd5ace2004-10-14 19:29:29 +00001#include <console/console.h>
2#include <device/device.h>
Eric Biedermanfcd5ace2004-10-14 19:29:29 +00003#include <string.h>
4#include <cpu/cpu.h>
5#include <cpu/x86/mtrr.h>
6#include <cpu/x86/msr.h>
7#include <cpu/x86/lapic.h>
8#include <cpu/intel/microcode.h>
9#include <cpu/x86/cache.h>
Eric Biedermanfcd5ace2004-10-14 19:29:29 +000010
Edward O'Callaghan2c9d2cf2014-10-27 23:29:29 +110011static void model_6xx_init(struct device *dev)
Eric Biedermanfcd5ace2004-10-14 19:29:29 +000012{
13 /* Turn on caching if we haven't already */
14 x86_enable_cache();
Sven Schnelleadfbcb792012-01-10 12:01:43 +010015 x86_setup_mtrrs();
Eric Biedermanfcd5ace2004-10-14 19:29:29 +000016 x86_mtrr_check();
Stefan Reinauer14e22772010-04-27 06:56:47 +000017
Eric Biedermanfcd5ace2004-10-14 19:29:29 +000018 /* Update the microcode */
Alexandru Gagniuc2c38f502013-12-06 23:14:54 -060019 intel_update_microcode_from_cbfs();
Eric Biedermanfcd5ace2004-10-14 19:29:29 +000020
21 /* Enable the local cpu apics */
22 setup_lapic();
23};
24
25static struct device_operations cpu_dev_ops = {
Eric Biederman3566b3d2004-10-27 01:18:16 +000026 .init = model_6xx_init,
Eric Biedermanfcd5ace2004-10-14 19:29:29 +000027};
Uwe Hermanncc0dc7f2010-10-04 20:43:55 +000028
29/*
30 * Intel Pentium Pro Processor Specification Update
31 * http://download.intel.com/design/archives/processors/pro/docs/24268935.pdf
32 *
33 * Intel Pentium II Processor Specification Update
34 * http://download.intel.com/design/PentiumII/specupdt/24333749.pdf
35 *
36 * Mobile Intel Pentium II Processor Specification Update
37 * http://download.intel.com/design/intarch/specupdt/24388757.pdf
38 *
39 * Intel Celeron Processor Identification Information
40 * http://www.intel.com/design/celeron/qit/update.pdf
41 *
42 * Intel Pentium II Xeon Processor Specification Update
43 * http://download.intel.com/support/processors/pentiumii/xeon/24377632.pdf
44 *
45 * Intel Pentium III Processor Identification and Package Information
46 * http://www.intel.com/design/pentiumiii/qit/update.pdf
47 *
48 * Intel Pentium III Processor Specification Update
49 * http://download.intel.com/design/intarch/specupdt/24445358.pdf
50 *
51 * Mobile Intel Pentium III/III-M Processor Specification Update
52 * http://download.intel.com/design/intarch/specupdt/24530663.pdf
53 */
Eric Biedermanfcd5ace2004-10-14 19:29:29 +000054static struct cpu_device_id cpu_table[] = {
Uwe Hermanncc0dc7f2010-10-04 20:43:55 +000055 { X86_VENDOR_INTEL, 0x0611 }, /* Pentium Pro, B0 */
56 { X86_VENDOR_INTEL, 0x0612 }, /* Pentium Pro, C0 */
57 { X86_VENDOR_INTEL, 0x0616 }, /* Pentium Pro, sA0 */
58 { X86_VENDOR_INTEL, 0x0617 }, /* Pentium Pro, sA1 */
59 { X86_VENDOR_INTEL, 0x0619 }, /* Pentium Pro, sB1 */
60
61 { X86_VENDOR_INTEL, 0x0633 }, /* PII, C0 */
62 { X86_VENDOR_INTEL, 0x0634 }, /* PII, C1 */
63
Uwe Hermanncc0dc7f2010-10-04 20:43:55 +000064 { X86_VENDOR_INTEL, 0x0660 }, /* Celeron, A0 */
65 { X86_VENDOR_INTEL, 0x0665 }, /* Celeron, B0 */
66 { X86_VENDOR_INTEL, 0x066a }, /* PII, mdxA0/dmmA0 + others */
67
Stefan Reinauer5a522d42008-08-01 12:11:00 +000068 { X86_VENDOR_INTEL, 0x0680 },
Uwe Hermanncc0dc7f2010-10-04 20:43:55 +000069 { X86_VENDOR_INTEL, 0x0681 }, /* PIII, cA2/cA2c/A2/BA2/PA2/MA2 */
70 { X86_VENDOR_INTEL, 0x0683 }, /* PIII/Celeron, cB0/cB0c/B0/BB0/PB0/MB0*/
71 { X86_VENDOR_INTEL, 0x0686 }, /* PIII/Celeron, cC0/C0/BC0/PC0/MC0 */
72 { X86_VENDOR_INTEL, 0x068a }, /* PIII/Celeron, cD0/D0/BD0/PD0 */
73
74 { X86_VENDOR_INTEL, 0x06a0 }, /* PIII, A0 */
75 { X86_VENDOR_INTEL, 0x06a1 }, /* PIII, A1 */
76 { X86_VENDOR_INTEL, 0x06a4 }, /* PIII, B0 */
Eric Biedermanfcd5ace2004-10-14 19:29:29 +000077 { 0, 0 },
78};
79
Stefan Reinauer124e4a42007-10-24 11:10:21 +000080static const struct cpu_driver driver __cpu_driver = {
Eric Biedermanfcd5ace2004-10-14 19:29:29 +000081 .ops = &cpu_dev_ops,
82 .id_table = cpu_table,
83};