blob: 2d831d0f227a1a6aadc65919c74e72302a36c332 [file] [log] [blame]
Angel Ponsf23ae0b2020-04-02 23:48:12 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Damien Roth07a196e2016-01-19 20:20:15 -07002
Eric Biedermanfcd5ace2004-10-14 19:29:29 +00003#include <device/device.h>
Eric Biedermanfcd5ace2004-10-14 19:29:29 +00004#include <cpu/cpu.h>
5#include <cpu/x86/mtrr.h>
Eric Biedermanfcd5ace2004-10-14 19:29:29 +00006#include <cpu/intel/microcode.h>
7#include <cpu/x86/cache.h>
Eric Biedermanfcd5ace2004-10-14 19:29:29 +00008
Edward O'Callaghan2c9d2cf2014-10-27 23:29:29 +11009static void model_6xx_init(struct device *dev)
Eric Biedermanfcd5ace2004-10-14 19:29:29 +000010{
11 /* Turn on caching if we haven't already */
Felix Held10796d82021-10-25 17:52:49 +020012 enable_cache();
Sven Schnelleadfbcb792012-01-10 12:01:43 +010013 x86_setup_mtrrs();
Eric Biedermanfcd5ace2004-10-14 19:29:29 +000014 x86_mtrr_check();
Stefan Reinauer14e22772010-04-27 06:56:47 +000015
Eric Biedermanfcd5ace2004-10-14 19:29:29 +000016 /* Update the microcode */
Alexandru Gagniuc2c38f502013-12-06 23:14:54 -060017 intel_update_microcode_from_cbfs();
Eric Biedermanfcd5ace2004-10-14 19:29:29 +000018};
19
20static struct device_operations cpu_dev_ops = {
Eric Biederman3566b3d2004-10-27 01:18:16 +000021 .init = model_6xx_init,
Eric Biedermanfcd5ace2004-10-14 19:29:29 +000022};
Uwe Hermanncc0dc7f2010-10-04 20:43:55 +000023
24/*
25 * Intel Pentium Pro Processor Specification Update
26 * http://download.intel.com/design/archives/processors/pro/docs/24268935.pdf
27 *
28 * Intel Pentium II Processor Specification Update
29 * http://download.intel.com/design/PentiumII/specupdt/24333749.pdf
30 *
31 * Mobile Intel Pentium II Processor Specification Update
32 * http://download.intel.com/design/intarch/specupdt/24388757.pdf
33 *
34 * Intel Celeron Processor Identification Information
35 * http://www.intel.com/design/celeron/qit/update.pdf
36 *
37 * Intel Pentium II Xeon Processor Specification Update
38 * http://download.intel.com/support/processors/pentiumii/xeon/24377632.pdf
39 *
40 * Intel Pentium III Processor Identification and Package Information
41 * http://www.intel.com/design/pentiumiii/qit/update.pdf
42 *
43 * Intel Pentium III Processor Specification Update
44 * http://download.intel.com/design/intarch/specupdt/24445358.pdf
45 *
46 * Mobile Intel Pentium III/III-M Processor Specification Update
47 * http://download.intel.com/design/intarch/specupdt/24530663.pdf
48 */
Jonathan Neuschäfer8f06ce32017-11-20 01:56:44 +010049static const struct cpu_device_id cpu_table[] = {
Felix Held6a6ac1e2023-02-06 15:19:11 +010050 { X86_VENDOR_INTEL, 0x0611, CPUID_EXACT_MATCH_MASK }, /* Pentium Pro, B0 */
51 { X86_VENDOR_INTEL, 0x0612, CPUID_EXACT_MATCH_MASK }, /* Pentium Pro, C0 */
52 { X86_VENDOR_INTEL, 0x0616, CPUID_EXACT_MATCH_MASK }, /* Pentium Pro, sA0 */
53 { X86_VENDOR_INTEL, 0x0617, CPUID_EXACT_MATCH_MASK }, /* Pentium Pro, sA1 */
54 { X86_VENDOR_INTEL, 0x0619, CPUID_EXACT_MATCH_MASK }, /* Pentium Pro, sB1 */
Uwe Hermanncc0dc7f2010-10-04 20:43:55 +000055
Felix Held6a6ac1e2023-02-06 15:19:11 +010056 { X86_VENDOR_INTEL, 0x0633, CPUID_EXACT_MATCH_MASK }, /* PII, C0 */
57 { X86_VENDOR_INTEL, 0x0634, CPUID_EXACT_MATCH_MASK }, /* PII, C1 */
Uwe Hermanncc0dc7f2010-10-04 20:43:55 +000058
Felix Held6a6ac1e2023-02-06 15:19:11 +010059 { X86_VENDOR_INTEL, 0x0660, CPUID_EXACT_MATCH_MASK }, /* Celeron, A0 */
60 { X86_VENDOR_INTEL, 0x0665, CPUID_EXACT_MATCH_MASK }, /* Celeron, B0 */
61 { X86_VENDOR_INTEL, 0x066a, CPUID_EXACT_MATCH_MASK }, /* PII, mdxA0/dmmA0 + others */
Uwe Hermanncc0dc7f2010-10-04 20:43:55 +000062
Felix Held6a6ac1e2023-02-06 15:19:11 +010063 { X86_VENDOR_INTEL, 0x0680, CPUID_EXACT_MATCH_MASK },
64 /* PIII, cA2/cA2c/A2/BA2/PA2/MA2 */
65 { X86_VENDOR_INTEL, 0x0681, CPUID_EXACT_MATCH_MASK },
66 /* PIII/Celeron, cB0/cB0c/B0/BB0/PB0/MB0*/
67 { X86_VENDOR_INTEL, 0x0683, CPUID_EXACT_MATCH_MASK },
68 /* PIII/Celeron, cC0/C0/BC0/PC0/MC0 */
69 { X86_VENDOR_INTEL, 0x0686, CPUID_EXACT_MATCH_MASK },
70 /* PIII/Celeron, cD0/D0/BD0/PD0 */
71 { X86_VENDOR_INTEL, 0x068a, CPUID_EXACT_MATCH_MASK },
Uwe Hermanncc0dc7f2010-10-04 20:43:55 +000072
Felix Held6a6ac1e2023-02-06 15:19:11 +010073 { X86_VENDOR_INTEL, 0x06a0, CPUID_EXACT_MATCH_MASK }, /* PIII, A0 */
74 { X86_VENDOR_INTEL, 0x06a1, CPUID_EXACT_MATCH_MASK }, /* PIII, A1 */
75 { X86_VENDOR_INTEL, 0x06a4, CPUID_EXACT_MATCH_MASK }, /* PIII, B0 */
Felix Held1e781652023-02-08 11:39:16 +010076 CPU_TABLE_END
Eric Biedermanfcd5ace2004-10-14 19:29:29 +000077};
78
Stefan Reinauer124e4a42007-10-24 11:10:21 +000079static const struct cpu_driver driver __cpu_driver = {
Eric Biedermanfcd5ace2004-10-14 19:29:29 +000080 .ops = &cpu_dev_ops,
81 .id_table = cpu_table,
82};