Anton Kochkov | 7c634ae | 2011-06-20 23:14:22 +0400 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of msrtool. |
| 3 | * |
| 4 | * Copyright (C) 2011 Anton Kochkov <anton.kochkov@gmail.com> |
| 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. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | */ |
| 19 | |
| 20 | #include "msrtool.h" |
| 21 | |
| 22 | int intel_core2_early_probe(const struct targetdef *target) { |
| 23 | struct cpuid_t *id = cpuid(); |
Anton Kochkov | ffbbecc | 2012-07-04 07:31:37 +0400 | [diff] [blame] | 24 | return ((0x6 == id->family) && (0xf == id->model)); |
Anton Kochkov | 7c634ae | 2011-06-20 23:14:22 +0400 | [diff] [blame] | 25 | } |
| 26 | |
| 27 | const struct msrdef intel_core2_early_msrs[] = { |
| 28 | {0x17, MSRTYPE_RDWR, MSR2(0,0), "IA32_PLATFORM_ID", "", { |
| 29 | { BITS_EOT } |
| 30 | }}, |
| 31 | {0x2a, MSRTYPE_RDWR, MSR2(0,0), "EBL_CR_POWERON", "", { |
| 32 | { BITS_EOT } |
| 33 | }}, |
| 34 | {0x3f, MSRTYPE_RDWR, MSR2(0,0), "IA32_TEMPERATURE_OFFSET", "", { |
| 35 | { BITS_EOT } |
| 36 | }}, |
| 37 | {0xa8, MSRTYPE_RDWR, MSR2(0,0), "EMTTM_CR_TABLE0", "", { |
| 38 | { BITS_EOT } |
| 39 | }}, |
| 40 | {0xa9, MSRTYPE_RDWR, MSR2(0,0), "EMTTM_CR_TABLE1", "", { |
| 41 | { BITS_EOT } |
| 42 | }}, |
| 43 | {0xaa, MSRTYPE_RDWR, MSR2(0,0), "EMTTM_CR_TABLE2", "", { |
| 44 | { BITS_EOT } |
| 45 | }}, |
| 46 | {0xab, MSRTYPE_RDWR, MSR2(0,0), "EMTTM_CR_TABLE3", "", { |
| 47 | { BITS_EOT } |
| 48 | }}, |
| 49 | {0xac, MSRTYPE_RDWR, MSR2(0,0), "EMTTM_CR_TABLE4", "", { |
| 50 | { BITS_EOT } |
| 51 | }}, |
| 52 | {0xad, MSRTYPE_RDWR, MSR2(0,0), "EMTTM_CR_TABLE5", "", { |
| 53 | { BITS_EOT } |
| 54 | }}, |
| 55 | {0xcd, MSRTYPE_RDWR, MSR2(0,0), "FSB_CLOCK_STS", "", { |
| 56 | { BITS_EOT } |
| 57 | }}, |
| 58 | {0xe2, MSRTYPE_RDWR, MSR2(0,0), "PMG_CST_CONFIG_CONTROL", "", { |
| 59 | { BITS_EOT } |
| 60 | }}, |
| 61 | {0xe3, MSRTYPE_RDWR, MSR2(0,0), "PMG_IO_BASE_ADDR", "", { |
| 62 | { BITS_EOT } |
| 63 | }}, |
| 64 | {0xe4, MSRTYPE_RDWR, MSR2(0,0), "PMG_IO_CAPTURE_ADDR", "", { |
| 65 | { BITS_EOT } |
| 66 | }}, |
| 67 | {0xee, MSRTYPE_RDWR, MSR2(0,0), "EXT_CONFIG", "", { |
| 68 | { BITS_EOT } |
| 69 | }}, |
| 70 | {0x11e, MSRTYPE_RDWR, MSR2(0,0), "BBL_CR_CTL3", "", { |
| 71 | { BITS_EOT } |
| 72 | }}, |
| 73 | {0x194, MSRTYPE_RDWR, MSR2(0,0), "CLOCK_FLEX_MAX", "", { |
| 74 | { BITS_EOT } |
| 75 | }}, |
| 76 | {0x198, MSRTYPE_RDWR, MSR2(0,0), "IA32_PERF_STATUS", "", { |
| 77 | { BITS_EOT } |
| 78 | }}, |
| 79 | {0x1a0, MSRTYPE_RDWR, MSR2(0,0), "IA32_MISC_ENABLES", "", { |
| 80 | { BITS_EOT } |
| 81 | }}, |
| 82 | {0x1aa, MSRTYPE_RDWR, MSR2(0,0), "PIC_SENS_CFG", "", { |
| 83 | { BITS_EOT } |
| 84 | }}, |
| 85 | {0x400, MSRTYPE_RDWR, MSR2(0,0), "IA32_MC0_CTL", "", { |
| 86 | { BITS_EOT } |
| 87 | }}, |
| 88 | {0x401, MSRTYPE_RDWR, MSR2(0,0), "IA32_MC0_STATUS", "", { |
| 89 | { BITS_EOT } |
| 90 | }}, |
| 91 | {0x402, MSRTYPE_RDWR, MSR2(0,0), "IA32_MC0_ADDR", "", { |
| 92 | { BITS_EOT } |
| 93 | }}, |
| 94 | {0x40c, MSRTYPE_RDWR, MSR2(0,0), "IA32_MC4_CTL", "", { |
| 95 | { BITS_EOT } |
| 96 | }}, |
| 97 | {0x40d, MSRTYPE_RDWR, MSR2(0,0), "IA32_MC4_STATUS", "", { |
| 98 | { BITS_EOT } |
| 99 | }}, |
| 100 | {0x40e, MSRTYPE_RDWR, MSR2(0,0), "IA32_MC4_ADDR", "", { |
| 101 | { BITS_EOT } |
| 102 | }}, |
| 103 | {0x10, MSRTYPE_RDWR, MSR2(0,0), "IA32_TIME_STAMP_COUNTER", "", { |
| 104 | { BITS_EOT } |
| 105 | }}, |
| 106 | {0x1b, MSRTYPE_RDWR, MSR2(0,0), "IA32_APIC_BASE", "", { |
| 107 | { BITS_EOT } |
| 108 | }}, |
| 109 | {0x3a, MSRTYPE_RDWR, MSR2(0,0), "IA32_FEATURE_CONTROL", "", { |
| 110 | { BITS_EOT } |
| 111 | }}, |
| 112 | {0x8b, MSRTYPE_RDWR, MSR2(0,0), "IA32_BIOS_SIGN_ID", "", { |
| 113 | { BITS_EOT } |
| 114 | }}, |
| 115 | {0xe1, MSRTYPE_RDWR, MSR2(0,0), "SMM_CST_MISC_INFO", "", { |
| 116 | { BITS_EOT } |
| 117 | }}, |
| 118 | {0xe7, MSRTYPE_RDWR, MSR2(0,0), "IA32_MPERF", "", { |
| 119 | { BITS_EOT } |
| 120 | }}, |
| 121 | {0xe8, MSRTYPE_RDWR, MSR2(0,0), "IA32_APERF", "", { |
| 122 | { BITS_EOT } |
| 123 | }}, |
| 124 | {0xfe, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRRCAP", "", { |
| 125 | { BITS_EOT } |
| 126 | }}, |
| 127 | {0x179, MSRTYPE_RDWR, MSR2(0,0), "IA32_MCG_CAP", "", { |
| 128 | { BITS_EOT } |
| 129 | }}, |
| 130 | {0x17a, MSRTYPE_RDWR, MSR2(0,0), "IA32_MCG_STATUS", "", { |
| 131 | { BITS_EOT } |
| 132 | }}, |
| 133 | {0x199, MSRTYPE_RDWR, MSR2(0,0), "IA32_PERF_CONTROL", "", { |
| 134 | { BITS_EOT } |
| 135 | }}, |
| 136 | {0x19a, MSRTYPE_RDWR, MSR2(0,0), "IA32_THERM_CTL", "", { |
| 137 | { BITS_EOT } |
| 138 | }}, |
| 139 | {0x19b, MSRTYPE_RDWR, MSR2(0,0), "IA32_THERM_INTERRUPT", "", { |
| 140 | { BITS_EOT } |
| 141 | }}, |
| 142 | {0x19c, MSRTYPE_RDWR, MSR2(0,0), "IA32_THERM_STATUS", "", { |
| 143 | { BITS_EOT } |
| 144 | }}, |
| 145 | {0x19d, MSRTYPE_RDWR, MSR2(0,0), "MSR_THERM2_CTL", "", { |
| 146 | { BITS_EOT } |
| 147 | }}, |
| 148 | {0x1d9, MSRTYPE_RDWR, MSR2(0,0), "IA32_DEBUGCTL", "", { |
| 149 | { BITS_EOT } |
| 150 | }}, |
| 151 | {0x200, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_PHYSBASE0", "", { |
| 152 | { BITS_EOT } |
| 153 | }}, |
| 154 | {0x201, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_PHYSMASK0", "", { |
| 155 | { BITS_EOT } |
| 156 | }}, |
| 157 | {0x202, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_PHYSBASE1", "", { |
| 158 | { BITS_EOT } |
| 159 | }}, |
| 160 | {0x203, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_PHYSMASK1", "", { |
| 161 | { BITS_EOT } |
| 162 | }}, |
| 163 | {0x204, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_PHYSBASE2", "", { |
| 164 | { BITS_EOT } |
| 165 | }}, |
| 166 | {0x205, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_PHYSMASK2", "", { |
| 167 | { BITS_EOT } |
| 168 | }}, |
| 169 | {0x206, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_PHYSBASE3", "", { |
| 170 | { BITS_EOT } |
| 171 | }}, |
| 172 | {0x207, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_PHYSMASK3", "", { |
| 173 | { BITS_EOT } |
| 174 | }}, |
| 175 | {0x208, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_PHYSBASE4", "", { |
| 176 | { BITS_EOT } |
| 177 | }}, |
| 178 | {0x209, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_PHYSMASK4", "", { |
| 179 | { BITS_EOT } |
| 180 | }}, |
| 181 | {0x20a, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_PHYSBASE5", "", { |
| 182 | { BITS_EOT } |
| 183 | }}, |
| 184 | {0x20b, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_PHYSMASK5", "", { |
| 185 | { BITS_EOT } |
| 186 | }}, |
| 187 | {0x20c, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_PHYSBASE6", "", { |
| 188 | { BITS_EOT } |
| 189 | }}, |
| 190 | {0x20d, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_PHYSMASK6", "", { |
| 191 | { BITS_EOT } |
| 192 | }}, |
| 193 | {0x20e, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_PHYSBASE7", "", { |
| 194 | { BITS_EOT } |
| 195 | }}, |
| 196 | {0x20f, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_PHYSMASK7", "", { |
| 197 | { BITS_EOT } |
| 198 | }}, |
| 199 | {0x250, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_FIX64K_00000", "", { |
| 200 | { BITS_EOT } |
| 201 | }}, |
| 202 | {0x258, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_FIX16K_80000", "", { |
| 203 | { BITS_EOT } |
| 204 | }}, |
| 205 | {0x259, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_FIX16K_A0000", "", { |
| 206 | { BITS_EOT } |
| 207 | }}, |
| 208 | {0x268, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_FIX4K_C0000", "", { |
| 209 | { BITS_EOT } |
| 210 | }}, |
| 211 | {0x269, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_FIX4K_C8000", "", { |
| 212 | { BITS_EOT } |
| 213 | }}, |
| 214 | {0x26a, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_FIX4K_D0000", "", { |
| 215 | { BITS_EOT } |
| 216 | }}, |
| 217 | {0x26b, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_FIX4K_D8000", "", { |
| 218 | { BITS_EOT } |
| 219 | }}, |
| 220 | {0x26c, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_FIX4K_E0000", "", { |
| 221 | { BITS_EOT } |
| 222 | }}, |
| 223 | {0x26d, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_FIX4K_E8000", "", { |
| 224 | { BITS_EOT } |
| 225 | }}, |
| 226 | {0x26e, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_FIX4K_F0000", "", { |
| 227 | { BITS_EOT } |
| 228 | }}, |
| 229 | {0x26f, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_FIX4K_F8000", "", { |
| 230 | { BITS_EOT } |
| 231 | }}, |
| 232 | {0x2ff, MSRTYPE_RDWR, MSR2(0,0), "IA32_MTRR_DEF_TYPE", "", { |
| 233 | { BITS_EOT } |
| 234 | }}, |
| 235 | { MSR_EOT } |
| 236 | }; |