Eric Biederman | fcd5ace | 2004-10-14 19:29:29 +0000 | [diff] [blame] | 1 | #include <console/console.h> |
| 2 | #include <device/device.h> |
Eric Biederman | fcd5ace | 2004-10-14 19:29:29 +0000 | [diff] [blame] | 3 | #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 Biederman | fcd5ace | 2004-10-14 19:29:29 +0000 | [diff] [blame] | 10 | |
Edward O'Callaghan | 2c9d2cf | 2014-10-27 23:29:29 +1100 | [diff] [blame] | 11 | static void model_6xx_init(struct device *dev) |
Eric Biederman | fcd5ace | 2004-10-14 19:29:29 +0000 | [diff] [blame] | 12 | { |
| 13 | /* Turn on caching if we haven't already */ |
| 14 | x86_enable_cache(); |
Sven Schnelle | adfbcb79 | 2012-01-10 12:01:43 +0100 | [diff] [blame] | 15 | x86_setup_mtrrs(); |
Eric Biederman | fcd5ace | 2004-10-14 19:29:29 +0000 | [diff] [blame] | 16 | x86_mtrr_check(); |
Stefan Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame] | 17 | |
Eric Biederman | fcd5ace | 2004-10-14 19:29:29 +0000 | [diff] [blame] | 18 | /* Update the microcode */ |
Alexandru Gagniuc | 2c38f50 | 2013-12-06 23:14:54 -0600 | [diff] [blame] | 19 | intel_update_microcode_from_cbfs(); |
Eric Biederman | fcd5ace | 2004-10-14 19:29:29 +0000 | [diff] [blame] | 20 | |
| 21 | /* Enable the local cpu apics */ |
| 22 | setup_lapic(); |
| 23 | }; |
| 24 | |
| 25 | static struct device_operations cpu_dev_ops = { |
Eric Biederman | 3566b3d | 2004-10-27 01:18:16 +0000 | [diff] [blame] | 26 | .init = model_6xx_init, |
Eric Biederman | fcd5ace | 2004-10-14 19:29:29 +0000 | [diff] [blame] | 27 | }; |
Uwe Hermann | cc0dc7f | 2010-10-04 20:43:55 +0000 | [diff] [blame] | 28 | |
| 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 Biederman | fcd5ace | 2004-10-14 19:29:29 +0000 | [diff] [blame] | 54 | static struct cpu_device_id cpu_table[] = { |
Uwe Hermann | cc0dc7f | 2010-10-04 20:43:55 +0000 | [diff] [blame] | 55 | { 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 Hermann | cc0dc7f | 2010-10-04 20:43:55 +0000 | [diff] [blame] | 64 | { X86_VENDOR_INTEL, 0x0660 }, /* Celeron, A0 */ |
| 65 | { X86_VENDOR_INTEL, 0x0665 }, /* Celeron, B0 */ |
| 66 | { X86_VENDOR_INTEL, 0x066a }, /* PII, mdxA0/dmmA0 + others */ |
| 67 | |
Stefan Reinauer | 5a522d4 | 2008-08-01 12:11:00 +0000 | [diff] [blame] | 68 | { X86_VENDOR_INTEL, 0x0680 }, |
Uwe Hermann | cc0dc7f | 2010-10-04 20:43:55 +0000 | [diff] [blame] | 69 | { 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 Biederman | fcd5ace | 2004-10-14 19:29:29 +0000 | [diff] [blame] | 77 | { 0, 0 }, |
| 78 | }; |
| 79 | |
Stefan Reinauer | 124e4a4 | 2007-10-24 11:10:21 +0000 | [diff] [blame] | 80 | static const struct cpu_driver driver __cpu_driver = { |
Eric Biederman | fcd5ace | 2004-10-14 19:29:29 +0000 | [diff] [blame] | 81 | .ops = &cpu_dev_ops, |
| 82 | .id_table = cpu_table, |
| 83 | }; |