Patrick Georgi | ea063cb | 2020-05-08 19:28:13 +0200 | [diff] [blame] | 1 | /* inteltool - dump all registers on an Intel CPU + chipset based system */ |
Patrick Georgi | 7333a11 | 2020-05-08 20:48:04 +0200 | [diff] [blame] | 2 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 3 | |
| 4 | #include <fcntl.h> |
| 5 | #include <unistd.h> |
| 6 | #include <stdio.h> |
| 7 | #include <stdlib.h> |
| 8 | #include <string.h> |
| 9 | #include <errno.h> |
| 10 | |
| 11 | #include "inteltool.h" |
| 12 | |
Mathias Krause | 9beb5df | 2011-06-27 14:35:00 +0200 | [diff] [blame] | 13 | #ifdef __x86_64__ |
| 14 | # define BREG "%%rbx" |
| 15 | #else |
| 16 | # define BREG "%%ebx" |
| 17 | #endif |
| 18 | |
Pratik Prajapati | 91664d4 | 2017-07-24 13:53:26 -0700 | [diff] [blame] | 19 | #define IA32_FEATURE_CONTROL 0x3a |
| 20 | #define SGX_GLOBAL_ENABLED (1 << 18) |
| 21 | #define FEATURE_CONTROL_LOCKED (1) |
| 22 | #define MTRR_CAP_MSR 0xfe |
| 23 | #define PRMRR_SUPPORTED (1 << 12) |
| 24 | #define SGX_SUPPORTED (1 << 2) |
Pratik Prajapati | 1e67816 | 2020-09-03 11:28:19 -0700 | [diff] [blame^] | 25 | #define IA32_TME_ACTIVATE 0x982 |
| 26 | #define TME_SUPPORTED (1 << 13) |
| 27 | #define TME_LOCKED (1) |
| 28 | #define TME_ENABLED (1 << 1) |
Pratik Prajapati | 91664d4 | 2017-07-24 13:53:26 -0700 | [diff] [blame] | 29 | |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 30 | int fd_msr; |
| 31 | |
| 32 | unsigned int cpuid(unsigned int op) |
| 33 | { |
Stefan Reinauer | f7f2f25 | 2009-09-01 09:52:14 +0000 | [diff] [blame] | 34 | uint32_t ret; |
| 35 | |
Mathias Krause | 5782fee | 2011-03-09 11:30:55 +0100 | [diff] [blame] | 36 | #if defined(__PIC__) || defined(__DARWIN__) && !defined(__LP64__) |
Stefan Reinauer | 1c60c88 | 2010-05-30 12:35:39 +0000 | [diff] [blame] | 37 | asm volatile ( |
Mathias Krause | 9beb5df | 2011-06-27 14:35:00 +0200 | [diff] [blame] | 38 | "push " BREG "\n\t" |
| 39 | "cpuid\n\t" |
| 40 | "pop " BREG "\n\t" |
Stefan Reinauer | 1c60c88 | 2010-05-30 12:35:39 +0000 | [diff] [blame] | 41 | : "=a" (ret) : "a" (op) : "%ecx", "%edx" |
| 42 | ); |
Stefan Reinauer | f182456 | 2009-04-22 23:17:44 +0000 | [diff] [blame] | 43 | #else |
Stefan Reinauer | f7f2f25 | 2009-09-01 09:52:14 +0000 | [diff] [blame] | 44 | asm ("cpuid" : "=a" (ret) : "a" (op) : "%ebx", "%ecx", "%edx"); |
Stefan Reinauer | f182456 | 2009-04-22 23:17:44 +0000 | [diff] [blame] | 45 | #endif |
Stefan Reinauer | f7f2f25 | 2009-09-01 09:52:14 +0000 | [diff] [blame] | 46 | |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 47 | return ret; |
| 48 | } |
| 49 | |
Pratik Prajapati | 91664d4 | 2017-07-24 13:53:26 -0700 | [diff] [blame] | 50 | inline cpuid_result_t cpuid_ext(int op, unsigned int ecx) |
| 51 | { |
| 52 | cpuid_result_t result; |
| 53 | |
| 54 | #ifndef __DARWIN__ |
| 55 | asm volatile ( |
| 56 | "mov %%ebx, %%edi;" |
| 57 | "cpuid;" |
| 58 | "mov %%ebx, %%esi;" |
| 59 | "mov %%edi, %%ebx;" |
| 60 | : "=a" (result.eax), |
| 61 | "=S" (result.ebx), |
| 62 | "=c" (result.ecx), |
| 63 | "=d" (result.edx) |
| 64 | : "0" (op), "2" (ecx) |
| 65 | : "edi"); |
| 66 | #endif |
| 67 | return result; |
| 68 | } |
| 69 | |
Stefan Reinauer | f7f2f25 | 2009-09-01 09:52:14 +0000 | [diff] [blame] | 70 | #ifndef __DARWIN__ |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 71 | int msr_readerror = 0; |
| 72 | |
Jacob Garber | 6faccd1 | 2019-07-01 11:21:55 -0600 | [diff] [blame] | 73 | static msr_t rdmsr(int addr) |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 74 | { |
Stefan Reinauer | a7b296d | 2011-11-14 12:40:34 -0800 | [diff] [blame] | 75 | uint32_t buf[2]; |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 76 | msr_t msr = { 0xffffffff, 0xffffffff }; |
| 77 | |
| 78 | if (lseek(fd_msr, (off_t) addr, SEEK_SET) == -1) { |
| 79 | perror("Could not lseek() to MSR"); |
| 80 | close(fd_msr); |
| 81 | exit(1); |
| 82 | } |
| 83 | |
| 84 | if (read(fd_msr, buf, 8) == 8) { |
Stefan Reinauer | a7b296d | 2011-11-14 12:40:34 -0800 | [diff] [blame] | 85 | msr.lo = buf[0]; |
| 86 | msr.hi = buf[1]; |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 87 | return msr; |
| 88 | } |
| 89 | |
| 90 | if (errno == 5) { |
| 91 | printf(" (*)"); // Not all bits of the MSR could be read |
| 92 | msr_readerror = 1; |
| 93 | } else { |
| 94 | // A severe error. |
| 95 | perror("Could not read() MSR"); |
| 96 | close(fd_msr); |
| 97 | exit(1); |
| 98 | } |
| 99 | |
| 100 | return msr; |
| 101 | } |
Pratik Prajapati | 91664d4 | 2017-07-24 13:53:26 -0700 | [diff] [blame] | 102 | |
| 103 | static int open_and_seek(int cpu, unsigned long msr, int mode, int *fd) |
| 104 | { |
Jacob Garber | 198c2e6 | 2019-07-01 11:04:41 -0600 | [diff] [blame] | 105 | char dev[32]; |
Pratik Prajapati | 91664d4 | 2017-07-24 13:53:26 -0700 | [diff] [blame] | 106 | char temp_string[50]; |
| 107 | |
| 108 | snprintf(dev, sizeof(dev), "/dev/cpu/%d/msr", cpu); |
| 109 | *fd = open(dev, mode); |
| 110 | |
| 111 | if (*fd < 0) { |
Maciej Suminski | d5fb99e | 2017-08-09 11:46:41 +0200 | [diff] [blame] | 112 | snprintf(temp_string, sizeof(temp_string), "open(\"%s\")", dev); |
Pratik Prajapati | 91664d4 | 2017-07-24 13:53:26 -0700 | [diff] [blame] | 113 | perror(temp_string); |
| 114 | return -1; |
| 115 | } |
| 116 | |
| 117 | if (lseek(*fd, msr, SEEK_SET) == (off_t)-1) { |
Maciej Suminski | d5fb99e | 2017-08-09 11:46:41 +0200 | [diff] [blame] | 118 | snprintf(temp_string, sizeof(temp_string), "lseek(%lu)", msr); |
Pratik Prajapati | 91664d4 | 2017-07-24 13:53:26 -0700 | [diff] [blame] | 119 | perror(temp_string); |
| 120 | close(*fd); |
| 121 | return -1; |
| 122 | } |
| 123 | |
| 124 | return 0; |
| 125 | } |
| 126 | |
Jacob Garber | 6faccd1 | 2019-07-01 11:21:55 -0600 | [diff] [blame] | 127 | static msr_t rdmsr_from_cpu(int cpu, unsigned long addr) |
Pratik Prajapati | 91664d4 | 2017-07-24 13:53:26 -0700 | [diff] [blame] | 128 | { |
| 129 | int fd; |
| 130 | msr_t msr = { 0xffffffff, 0xffffffff }; |
| 131 | uint32_t buf[2]; |
| 132 | char temp_string[50]; |
| 133 | |
| 134 | if (open_and_seek(cpu, addr, O_RDONLY, &fd) < 0) { |
Maciej Suminski | d5fb99e | 2017-08-09 11:46:41 +0200 | [diff] [blame] | 135 | snprintf(temp_string, sizeof(temp_string), |
| 136 | "Could not read MSR for CPU#%d", cpu); |
Pratik Prajapati | 91664d4 | 2017-07-24 13:53:26 -0700 | [diff] [blame] | 137 | perror(temp_string); |
| 138 | } |
| 139 | |
| 140 | if (read(fd, buf, 8) == 8) { |
| 141 | msr.lo = buf[0]; |
| 142 | msr.hi = buf[1]; |
| 143 | } |
| 144 | |
| 145 | close(fd); |
| 146 | |
| 147 | return msr; |
| 148 | } |
| 149 | |
Jacob Garber | 6faccd1 | 2019-07-01 11:21:55 -0600 | [diff] [blame] | 150 | static int get_number_of_cpus(void) |
Pratik Prajapati | 91664d4 | 2017-07-24 13:53:26 -0700 | [diff] [blame] | 151 | { |
| 152 | return sysconf(_SC_NPROCESSORS_ONLN); |
| 153 | } |
| 154 | |
Maxim Polyakov | 9af10bf | 2019-10-08 17:33:59 +0300 | [diff] [blame] | 155 | static int get_number_of_cores(void) |
| 156 | { |
| 157 | return sysconf(_SC_NPROCESSORS_CONF); |
| 158 | } |
| 159 | |
Jacob Garber | 6faccd1 | 2019-07-01 11:21:55 -0600 | [diff] [blame] | 160 | static int is_sgx_supported(int cpunum) |
Pratik Prajapati | 91664d4 | 2017-07-24 13:53:26 -0700 | [diff] [blame] | 161 | { |
| 162 | cpuid_result_t cpuid_regs; |
| 163 | msr_t msr; |
| 164 | |
| 165 | /* CPUID leaf 0x7 subleaf 0x0 to detect SGX support |
| 166 | details are mentioned in Intel SDM Chap.36- section 36.7 */ |
| 167 | cpuid_regs = cpuid_ext(0x7, 0x0); |
| 168 | msr = rdmsr_from_cpu(cpunum, MTRR_CAP_MSR); |
| 169 | return ((cpuid_regs.ebx & SGX_SUPPORTED) && (msr.lo & PRMRR_SUPPORTED)); |
| 170 | } |
| 171 | |
Jacob Garber | 6faccd1 | 2019-07-01 11:21:55 -0600 | [diff] [blame] | 172 | static int is_sgx_enabled(int cpunum) |
Pratik Prajapati | 91664d4 | 2017-07-24 13:53:26 -0700 | [diff] [blame] | 173 | { |
| 174 | msr_t data; |
| 175 | data = rdmsr_from_cpu(cpunum, IA32_FEATURE_CONTROL); |
| 176 | return (data.lo & SGX_GLOBAL_ENABLED); |
| 177 | } |
| 178 | |
Jacob Garber | 6faccd1 | 2019-07-01 11:21:55 -0600 | [diff] [blame] | 179 | static int is_sgx_locked(int cpunum) |
Pratik Prajapati | 91664d4 | 2017-07-24 13:53:26 -0700 | [diff] [blame] | 180 | { |
| 181 | msr_t data; |
| 182 | data = rdmsr_from_cpu(cpunum, IA32_FEATURE_CONTROL); |
| 183 | return (data.lo & FEATURE_CONTROL_LOCKED); |
| 184 | } |
| 185 | |
Stefan Reinauer | 1162f25 | 2008-12-04 15:18:20 +0000 | [diff] [blame] | 186 | #endif |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 187 | |
Pratik Prajapati | 91664d4 | 2017-07-24 13:53:26 -0700 | [diff] [blame] | 188 | int print_sgx(void) |
| 189 | { |
| 190 | int error = -1; |
| 191 | #ifndef __DARWIN__ |
| 192 | int ncpus = get_number_of_cpus(); |
| 193 | int i = 0; |
Pratik Prajapati | 91664d4 | 2017-07-24 13:53:26 -0700 | [diff] [blame] | 194 | |
| 195 | printf("\n============= Dumping INTEL SGX status ============="); |
| 196 | |
| 197 | if (ncpus < 1) { |
Maciej Suminski | d5fb99e | 2017-08-09 11:46:41 +0200 | [diff] [blame] | 198 | perror("Failed to get number of CPUs"); |
Pratik Prajapati | 91664d4 | 2017-07-24 13:53:26 -0700 | [diff] [blame] | 199 | error = -1; |
| 200 | } else { |
| 201 | printf("\nNumber of CPUs = %d\n", ncpus); |
| 202 | for (i = 0; i < ncpus ; i++) { |
| 203 | |
| 204 | printf("------------- CPU %d ----------------\n", i); |
| 205 | printf("SGX supported : %s\n", |
| 206 | is_sgx_supported(i) ? "YES" : "NO"); |
| 207 | printf("SGX enabled : %s\n", |
| 208 | is_sgx_enabled(i) ? "YES" : "NO"); |
| 209 | printf("Feature Control locked : %s\n", |
| 210 | is_sgx_locked(i) ? "YES" : "NO"); |
| 211 | } |
| 212 | error = 0; |
| 213 | } |
| 214 | printf("====================================================\n"); |
| 215 | #endif |
| 216 | return error; |
| 217 | } |
| 218 | |
Pratik Prajapati | 1e67816 | 2020-09-03 11:28:19 -0700 | [diff] [blame^] | 219 | static int is_tme_supported() |
| 220 | { |
| 221 | cpuid_result_t cpuid_regs; |
| 222 | |
| 223 | /* |
| 224 | * CPUID leaf 0x7 subleaf 0x0 to detect TME support |
| 225 | * https://software.intel.com/sites/default/files/managed/a5/16/Multi-Key |
| 226 | * -Total-Memory-Encryption-Spec.pdf |
| 227 | */ |
| 228 | |
| 229 | cpuid_regs = cpuid_ext(0x7, 0x0); |
| 230 | return (cpuid_regs.ecx & TME_SUPPORTED); |
| 231 | } |
| 232 | |
| 233 | static msr_t read_tme_activate_msr(){ |
| 234 | return rdmsr_from_cpu(0, IA32_TME_ACTIVATE); |
| 235 | } |
| 236 | |
| 237 | static int is_tme_locked() |
| 238 | { |
| 239 | msr_t data = read_tme_activate_msr(); |
| 240 | return (data.lo & TME_LOCKED); |
| 241 | } |
| 242 | |
| 243 | static int is_tme_enabled() |
| 244 | { |
| 245 | msr_t data = read_tme_activate_msr(); |
| 246 | return (data.lo & TME_ENABLED); |
| 247 | } |
| 248 | |
| 249 | void print_tme(void) |
| 250 | { |
| 251 | #ifndef __DARWIN__ |
| 252 | int tme_supported = is_tme_supported(); |
| 253 | |
| 254 | printf("\n============= Dumping INTEL TME status =============\n"); |
| 255 | |
| 256 | printf("TME supported : %s\n", tme_supported ? "YES" : "NO"); |
| 257 | |
| 258 | if (tme_supported) { |
| 259 | printf("TME locked : %s\n", is_tme_locked() ? "YES" : "NO"); |
| 260 | printf("TME enabled : %s\n", is_tme_enabled() ? "YES" : "NO"); |
| 261 | } |
| 262 | printf("====================================================\n"); |
| 263 | #else |
| 264 | printf("Not Implemented\n"); |
| 265 | #endif |
| 266 | } |
| 267 | |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 268 | int print_intel_core_msrs(void) |
| 269 | { |
Maxim Polyakov | 9af10bf | 2019-10-08 17:33:59 +0300 | [diff] [blame] | 270 | unsigned int i, core, id, core_num = get_number_of_cores(); |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 271 | msr_t msr; |
| 272 | |
| 273 | #define IA32_PLATFORM_ID 0x0017 |
| 274 | #define EBL_CR_POWERON 0x002a |
| 275 | #define FSB_CLK_STS 0x00cd |
| 276 | #define IA32_TIME_STAMP_COUNTER 0x0010 |
| 277 | #define IA32_APIC_BASE 0x001b |
| 278 | |
| 279 | typedef struct { |
| 280 | int number; |
| 281 | char *name; |
| 282 | } msr_entry_t; |
| 283 | |
Tobias Diedrich | 3645e61 | 2010-11-27 14:44:19 +0000 | [diff] [blame] | 284 | /* Pentium III */ |
| 285 | static const msr_entry_t model67x_global_msrs[] = { |
| 286 | { 0x0000, "IA32_P5_MC_ADDR" }, |
| 287 | { 0x0001, "IA32_P5_MC_TYPE" }, |
| 288 | { 0x0010, "IA32_TIME_STAMP_COUNTER" }, |
| 289 | { 0x0017, "IA32_PLATFORM_ID" }, |
| 290 | { 0x001b, "IA32_APIC_BASE" }, |
| 291 | { 0x002a, "EBL_CR_POWERON" }, |
| 292 | { 0x0033, "TEST_CTL" }, |
| 293 | //{ 0x0079, "IA32_BIOS_UPDT_TRIG" }, // Seems to be RO |
| 294 | { 0x0088, "BBL_CR_D0" }, |
| 295 | { 0x0089, "BBL_CR_D1" }, |
| 296 | { 0x008a, "BBL_CR_D2" }, |
| 297 | { 0x008b, "IA32_BIOS_SIGN_ID" }, |
| 298 | { 0x00c1, "PERFCTR0" }, |
| 299 | { 0x00c2, "PERFCTR1" }, |
| 300 | { 0x00fe, "IA32_MTRRCAP" }, |
| 301 | { 0x0116, "BBL_CR_ADDR" }, |
| 302 | { 0x0118, "BBL_CR_DECC" }, |
| 303 | { 0x0119, "BBL_CR_CTL" }, |
| 304 | //{ 0x011a, "BBL_CR_TRIG" }, |
| 305 | { 0x011b, "BBL_CR_BUSY" }, |
| 306 | { 0x011e, "BBL_CR_CTL3" }, |
| 307 | { 0x0174, "IA32_SYSENTER_CS" }, |
| 308 | { 0x0175, "IA32_SYSENTER_ESP" }, |
| 309 | { 0x0176, "IA32_SYSENTER_EIP" }, |
| 310 | { 0x0179, "IA32_MCG_CAP" }, |
| 311 | { 0x017a, "IA32_MCG_STATUS" }, |
| 312 | { 0x017b, "IA32_MCG_CTL" }, |
| 313 | { 0x0186, "IA32_PERF_EVNTSEL0" }, |
| 314 | { 0x0187, "IA32_PERF_EVNTSEL1" }, |
| 315 | { 0x01d9, "IA32_DEBUGCTL" }, |
| 316 | { 0x01db, "MSR_LASTBRANCHFROMIP" }, |
| 317 | { 0x01dc, "MSR_LASTBRANCHTOIP" }, |
| 318 | { 0x01dd, "MSR_LASTINTFROMIP" }, |
| 319 | { 0x01de, "MSR_LASTINTTOIP" }, |
| 320 | { 0x01e0, "MSR_ROB_CR_BKUPTMPDR6" }, |
| 321 | { 0x0200, "IA32_MTRR_PHYSBASE0" }, |
| 322 | { 0x0201, "IA32_MTRR_PHYSMASK0" }, |
| 323 | { 0x0202, "IA32_MTRR_PHYSBASE1" }, |
| 324 | { 0x0203, "IA32_MTRR_PHYSMASK1" }, |
| 325 | { 0x0204, "IA32_MTRR_PHYSBASE2" }, |
| 326 | { 0x0205, "IA32_MTRR_PHYSMASK2" }, |
| 327 | { 0x0206, "IA32_MTRR_PHYSBASE3" }, |
| 328 | { 0x0207, "IA32_MTRR_PHYSMASK3" }, |
| 329 | { 0x0208, "IA32_MTRR_PHYSBASE4" }, |
| 330 | { 0x0209, "IA32_MTRR_PHYSMASK4" }, |
| 331 | { 0x020a, "IA32_MTRR_PHYSBASE5" }, |
| 332 | { 0x020b, "IA32_MTRR_PHYSMASK5" }, |
| 333 | { 0x020c, "IA32_MTRR_PHYSBASE6" }, |
| 334 | { 0x020d, "IA32_MTRR_PHYSMASK6" }, |
| 335 | { 0x020e, "IA32_MTRR_PHYSBASE7" }, |
| 336 | { 0x020f, "IA32_MTRR_PHYSMASK7" }, |
| 337 | { 0x0250, "IA32_MTRR_FIX64K_00000" }, |
| 338 | { 0x0258, "IA32_MTRR_FIX16K_80000" }, |
| 339 | { 0x0259, "IA32_MTRR_FIX16K_A0000" }, |
| 340 | { 0x0268, "IA32_MTRR_FIX4K_C0000" }, |
| 341 | { 0x0269, "IA32_MTRR_FIX4K_C8000" }, |
| 342 | { 0x026a, "IA32_MTRR_FIX4K_D0000" }, |
| 343 | { 0x026b, "IA32_MTRR_FIX4K_D8000" }, |
| 344 | { 0x026c, "IA32_MTRR_FIX4K_E0000" }, |
| 345 | { 0x026d, "IA32_MTRR_FIX4K_E8000" }, |
| 346 | { 0x026e, "IA32_MTRR_FIX4K_F0000" }, |
| 347 | { 0x026f, "IA32_MTRR_FIX4K_F8000" }, |
| 348 | { 0x02ff, "IA32_MTRR_DEF_TYPE" }, |
| 349 | { 0x0400, "IA32_MC0_CTL" }, |
| 350 | { 0x0401, "IA32_MC0_STATUS" }, |
| 351 | { 0x0402, "IA32_MC0_ADDR" }, |
| 352 | //{ 0x0403, "IA32_MC0_MISC" }, // Seems to be RO |
| 353 | { 0x0404, "IA32_MC1_CTL" }, |
| 354 | { 0x0405, "IA32_MC1_STATUS" }, |
| 355 | { 0x0406, "IA32_MC1_ADDR" }, |
| 356 | //{ 0x0407, "IA32_MC1_MISC" }, // Seems to be RO |
| 357 | { 0x0408, "IA32_MC2_CTL" }, |
| 358 | { 0x0409, "IA32_MC2_STATUS" }, |
| 359 | { 0x040a, "IA32_MC2_ADDR" }, |
| 360 | //{ 0x040b, "IA32_MC2_MISC" }, // Seems to be RO |
| 361 | { 0x040c, "IA32_MC4_CTL" }, |
| 362 | { 0x040d, "IA32_MC4_STATUS" }, |
| 363 | { 0x040e, "IA32_MC4_ADDR" }, |
| 364 | //{ 0x040f, "IA32_MC4_MISC" } // Seems to be RO |
| 365 | { 0x0410, "IA32_MC3_CTL" }, |
| 366 | { 0x0411, "IA32_MC3_STATUS" }, |
| 367 | { 0x0412, "IA32_MC3_ADDR" }, |
| 368 | //{ 0x0413, "IA32_MC3_MISC" }, // Seems to be RO |
| 369 | }; |
| 370 | |
Stefan Reinauer | 0484481 | 2010-02-22 11:26:06 +0000 | [diff] [blame] | 371 | static const msr_entry_t model6bx_global_msrs[] = { |
| 372 | { 0x0010, "IA32_TIME_STAMP_COUNTER" }, |
| 373 | { 0x0017, "IA32_PLATFORM_ID" }, |
| 374 | { 0x001b, "IA32_APIC_BASE" }, |
| 375 | { 0x002a, "EBL_CR_POWERON" }, |
| 376 | { 0x0033, "TEST_CTL" }, |
| 377 | { 0x003f, "THERM_DIODE_OFFSET" }, |
Stefan Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame] | 378 | //{ 0x0079, "IA32_BIOS_UPDT_TRIG" }, // Seems to be RO |
Stefan Reinauer | 0484481 | 2010-02-22 11:26:06 +0000 | [diff] [blame] | 379 | { 0x008b, "IA32_BIOS_SIGN_ID" }, |
| 380 | { 0x00c1, "PERFCTR0" }, |
| 381 | { 0x00c2, "PERFCTR1" }, |
| 382 | { 0x011e, "BBL_CR_CTL3" }, |
| 383 | { 0x0179, "IA32_MCG_CAP" }, |
| 384 | { 0x017a, "IA32_MCG_STATUS" }, |
| 385 | { 0x0198, "IA32_PERF_STATUS" }, |
| 386 | { 0x0199, "IA32_PERF_CONTROL" }, |
| 387 | { 0x019a, "IA32_CLOCK_MODULATION" }, |
| 388 | { 0x01a0, "IA32_MISC_ENABLES" }, |
| 389 | { 0x01d9, "IA32_DEBUGCTL" }, |
| 390 | { 0x0200, "IA32_MTRR_PHYSBASE0" }, |
| 391 | { 0x0201, "IA32_MTRR_PHYSMASK0" }, |
| 392 | { 0x0202, "IA32_MTRR_PHYSBASE1" }, |
| 393 | { 0x0203, "IA32_MTRR_PHYSMASK1" }, |
| 394 | { 0x0204, "IA32_MTRR_PHYSBASE2" }, |
| 395 | { 0x0205, "IA32_MTRR_PHYSMASK2" }, |
| 396 | { 0x0206, "IA32_MTRR_PHYSBASE3" }, |
| 397 | { 0x0207, "IA32_MTRR_PHYSMASK3" }, |
| 398 | { 0x0208, "IA32_MTRR_PHYSBASE4" }, |
| 399 | { 0x0209, "IA32_MTRR_PHYSMASK4" }, |
| 400 | { 0x020a, "IA32_MTRR_PHYSBASE5" }, |
| 401 | { 0x020b, "IA32_MTRR_PHYSMASK5" }, |
| 402 | { 0x020c, "IA32_MTRR_PHYSBASE6" }, |
| 403 | { 0x020d, "IA32_MTRR_PHYSMASK6" }, |
| 404 | { 0x020e, "IA32_MTRR_PHYSBASE7" }, |
| 405 | { 0x020f, "IA32_MTRR_PHYSMASK7" }, |
| 406 | { 0x0250, "IA32_MTRR_FIX64K_00000" }, |
| 407 | { 0x0258, "IA32_MTRR_FIX16K_80000" }, |
| 408 | { 0x0259, "IA32_MTRR_FIX16K_A0000" }, |
| 409 | { 0x0268, "IA32_MTRR_FIX4K_C0000" }, |
| 410 | { 0x0269, "IA32_MTRR_FIX4K_C8000" }, |
| 411 | { 0x026a, "IA32_MTRR_FIX4K_D0000" }, |
| 412 | { 0x026b, "IA32_MTRR_FIX4K_D8000" }, |
| 413 | { 0x026c, "IA32_MTRR_FIX4K_E0000" }, |
| 414 | { 0x026d, "IA32_MTRR_FIX4K_E8000" }, |
| 415 | { 0x026e, "IA32_MTRR_FIX4K_F0000" }, |
| 416 | { 0x026f, "IA32_MTRR_FIX4K_F8000" }, |
| 417 | { 0x02ff, "IA32_MTRR_DEF_TYPE" }, |
| 418 | { 0x0400, "IA32_MC0_CTL" }, |
| 419 | { 0x0401, "IA32_MC0_STATUS" }, |
| 420 | { 0x0402, "IA32_MC0_ADDR" }, |
| 421 | //{ 0x0403, "IA32_MC0_MISC" }, // Seems to be RO |
| 422 | { 0x040c, "IA32_MC4_CTL" }, |
| 423 | { 0x040d, "IA32_MC4_STATUS" }, |
| 424 | { 0x040e, "IA32_MC4_ADDR" }, |
| 425 | //{ 0x040f, "IA32_MC4_MISC" } // Seems to be RO |
| 426 | }; |
| 427 | |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 428 | static const msr_entry_t model6ex_global_msrs[] = { |
| 429 | { 0x0017, "IA32_PLATFORM_ID" }, |
| 430 | { 0x002a, "EBL_CR_POWERON" }, |
| 431 | { 0x00cd, "FSB_CLOCK_STS" }, |
| 432 | { 0x00ce, "FSB_CLOCK_VCC" }, |
| 433 | { 0x00e2, "CLOCK_CST_CONFIG_CONTROL" }, |
| 434 | { 0x00e3, "PMG_IO_BASE_ADDR" }, |
| 435 | { 0x00e4, "PMG_IO_CAPTURE_ADDR" }, |
| 436 | { 0x00ee, "EXT_CONFIG" }, |
| 437 | { 0x011e, "BBL_CR_CTL3" }, |
| 438 | { 0x0194, "CLOCK_FLEX_MAX" }, |
| 439 | { 0x0198, "IA32_PERF_STATUS" }, |
| 440 | { 0x01a0, "IA32_MISC_ENABLES" }, |
| 441 | { 0x01aa, "PIC_SENS_CFG" }, |
| 442 | { 0x0400, "IA32_MC0_CTL" }, |
| 443 | { 0x0401, "IA32_MC0_STATUS" }, |
| 444 | { 0x0402, "IA32_MC0_ADDR" }, |
| 445 | //{ 0x0403, "IA32_MC0_MISC" }, // Seems to be RO |
| 446 | { 0x040c, "IA32_MC4_CTL" }, |
| 447 | { 0x040d, "IA32_MC4_STATUS" }, |
| 448 | { 0x040e, "IA32_MC4_ADDR" }, |
| 449 | //{ 0x040f, "IA32_MC4_MISC" } // Seems to be RO |
| 450 | }; |
| 451 | |
| 452 | static const msr_entry_t model6ex_per_core_msrs[] = { |
| 453 | { 0x0010, "IA32_TIME_STAMP_COUNTER" }, |
| 454 | { 0x001b, "IA32_APIC_BASE" }, |
| 455 | { 0x003a, "IA32_FEATURE_CONTROL" }, |
| 456 | { 0x003f, "IA32_TEMPERATURE_OFFSET" }, |
| 457 | //{ 0x0079, "IA32_BIOS_UPDT_TRIG" }, // Seems to be RO |
| 458 | { 0x008b, "IA32_BIOS_SIGN_ID" }, |
| 459 | { 0x00e7, "IA32_MPERF" }, |
| 460 | { 0x00e8, "IA32_APERF" }, |
| 461 | { 0x00fe, "IA32_MTRRCAP" }, |
| 462 | { 0x015f, "DTS_CAL_CTRL" }, |
| 463 | { 0x0179, "IA32_MCG_CAP" }, |
| 464 | { 0x017a, "IA32_MCG_STATUS" }, |
| 465 | { 0x0199, "IA32_PERF_CONTROL" }, |
| 466 | { 0x019a, "IA32_CLOCK_MODULATION" }, |
| 467 | { 0x019b, "IA32_THERM_INTERRUPT" }, |
| 468 | { 0x019c, "IA32_THERM_STATUS" }, |
| 469 | { 0x019d, "GV_THERM" }, |
| 470 | { 0x01d9, "IA32_DEBUGCTL" }, |
| 471 | { 0x0200, "IA32_MTRR_PHYSBASE0" }, |
| 472 | { 0x0201, "IA32_MTRR_PHYSMASK0" }, |
| 473 | { 0x0202, "IA32_MTRR_PHYSBASE1" }, |
| 474 | { 0x0203, "IA32_MTRR_PHYSMASK1" }, |
| 475 | { 0x0204, "IA32_MTRR_PHYSBASE2" }, |
| 476 | { 0x0205, "IA32_MTRR_PHYSMASK2" }, |
| 477 | { 0x0206, "IA32_MTRR_PHYSBASE3" }, |
| 478 | { 0x0207, "IA32_MTRR_PHYSMASK3" }, |
| 479 | { 0x0208, "IA32_MTRR_PHYSBASE4" }, |
| 480 | { 0x0209, "IA32_MTRR_PHYSMASK4" }, |
| 481 | { 0x020a, "IA32_MTRR_PHYSBASE5" }, |
| 482 | { 0x020b, "IA32_MTRR_PHYSMASK5" }, |
| 483 | { 0x020c, "IA32_MTRR_PHYSBASE6" }, |
| 484 | { 0x020d, "IA32_MTRR_PHYSMASK6" }, |
| 485 | { 0x020e, "IA32_MTRR_PHYSBASE7" }, |
| 486 | { 0x020f, "IA32_MTRR_PHYSMASK7" }, |
| 487 | { 0x0250, "IA32_MTRR_FIX64K_00000" }, |
| 488 | { 0x0258, "IA32_MTRR_FIX16K_80000" }, |
| 489 | { 0x0259, "IA32_MTRR_FIX16K_A0000" }, |
| 490 | { 0x0268, "IA32_MTRR_FIX4K_C0000" }, |
| 491 | { 0x0269, "IA32_MTRR_FIX4K_C8000" }, |
| 492 | { 0x026a, "IA32_MTRR_FIX4K_D0000" }, |
| 493 | { 0x026b, "IA32_MTRR_FIX4K_D8000" }, |
| 494 | { 0x026c, "IA32_MTRR_FIX4K_E0000" }, |
| 495 | { 0x026d, "IA32_MTRR_FIX4K_E8000" }, |
| 496 | { 0x026e, "IA32_MTRR_FIX4K_F0000" }, |
| 497 | { 0x026f, "IA32_MTRR_FIX4K_F8000" }, |
| 498 | { 0x02ff, "IA32_MTRR_DEF_TYPE" }, |
| 499 | //{ 0x00c000080, "IA32_CR_EFER" }, // Seems to be RO |
| 500 | }; |
| 501 | |
| 502 | static const msr_entry_t model6fx_global_msrs[] = { |
| 503 | { 0x0017, "IA32_PLATFORM_ID" }, |
| 504 | { 0x002a, "EBL_CR_POWERON" }, |
| 505 | { 0x003f, "IA32_TEMPERATURE_OFFSET" }, |
| 506 | { 0x00a8, "EMTTM_CR_TABLE0" }, |
| 507 | { 0x00a9, "EMTTM_CR_TABLE1" }, |
| 508 | { 0x00aa, "EMTTM_CR_TABLE2" }, |
| 509 | { 0x00ab, "EMTTM_CR_TABLE3" }, |
| 510 | { 0x00ac, "EMTTM_CR_TABLE4" }, |
| 511 | { 0x00ad, "EMTTM_CR_TABLE5" }, |
| 512 | { 0x00cd, "FSB_CLOCK_STS" }, |
| 513 | { 0x00e2, "PMG_CST_CONFIG_CONTROL" }, |
| 514 | { 0x00e3, "PMG_IO_BASE_ADDR" }, |
| 515 | { 0x00e4, "PMG_IO_CAPTURE_ADDR" }, |
| 516 | { 0x00ee, "EXT_CONFIG" }, |
| 517 | { 0x011e, "BBL_CR_CTL3" }, |
| 518 | { 0x0194, "CLOCK_FLEX_MAX" }, |
| 519 | { 0x0198, "IA32_PERF_STATUS" }, |
| 520 | { 0x01a0, "IA32_MISC_ENABLES" }, |
| 521 | { 0x01aa, "PIC_SENS_CFG" }, |
| 522 | { 0x0400, "IA32_MC0_CTL" }, |
| 523 | { 0x0401, "IA32_MC0_STATUS" }, |
| 524 | { 0x0402, "IA32_MC0_ADDR" }, |
| 525 | //{ 0x0403, "IA32_MC0_MISC" }, // Seems to be RO |
| 526 | { 0x040c, "IA32_MC4_CTL" }, |
| 527 | { 0x040d, "IA32_MC4_STATUS" }, |
| 528 | { 0x040e, "IA32_MC4_ADDR" }, |
| 529 | //{ 0x040f, "IA32_MC4_MISC" } // Seems to be RO |
| 530 | }; |
| 531 | |
| 532 | static const msr_entry_t model6fx_per_core_msrs[] = { |
| 533 | { 0x0010, "IA32_TIME_STAMP_COUNTER" }, |
| 534 | { 0x001b, "IA32_APIC_BASE" }, |
| 535 | { 0x003a, "IA32_FEATURE_CONTROL" }, |
| 536 | //{ 0x0079, "IA32_BIOS_UPDT_TRIG" }, // Seems to be RO |
| 537 | { 0x008b, "IA32_BIOS_SIGN_ID" }, |
| 538 | { 0x00e1, "SMM_CST_MISC_INFO" }, |
| 539 | { 0x00e7, "IA32_MPERF" }, |
| 540 | { 0x00e8, "IA32_APERF" }, |
| 541 | { 0x00fe, "IA32_MTRRCAP" }, |
| 542 | { 0x0179, "IA32_MCG_CAP" }, |
| 543 | { 0x017a, "IA32_MCG_STATUS" }, |
| 544 | { 0x0199, "IA32_PERF_CONTROL" }, |
| 545 | { 0x019a, "IA32_THERM_CTL" }, |
| 546 | { 0x019b, "IA32_THERM_INTERRUPT" }, |
| 547 | { 0x019c, "IA32_THERM_STATUS" }, |
| 548 | { 0x019d, "MSR_THERM2_CTL" }, |
| 549 | { 0x01d9, "IA32_DEBUGCTL" }, |
| 550 | { 0x0200, "IA32_MTRR_PHYSBASE0" }, |
| 551 | { 0x0201, "IA32_MTRR_PHYSMASK0" }, |
| 552 | { 0x0202, "IA32_MTRR_PHYSBASE1" }, |
| 553 | { 0x0203, "IA32_MTRR_PHYSMASK1" }, |
| 554 | { 0x0204, "IA32_MTRR_PHYSBASE2" }, |
| 555 | { 0x0205, "IA32_MTRR_PHYSMASK2" }, |
| 556 | { 0x0206, "IA32_MTRR_PHYSBASE3" }, |
| 557 | { 0x0207, "IA32_MTRR_PHYSMASK3" }, |
| 558 | { 0x0208, "IA32_MTRR_PHYSBASE4" }, |
| 559 | { 0x0209, "IA32_MTRR_PHYSMASK4" }, |
| 560 | { 0x020a, "IA32_MTRR_PHYSBASE5" }, |
| 561 | { 0x020b, "IA32_MTRR_PHYSMASK5" }, |
| 562 | { 0x020c, "IA32_MTRR_PHYSBASE6" }, |
| 563 | { 0x020d, "IA32_MTRR_PHYSMASK6" }, |
| 564 | { 0x020e, "IA32_MTRR_PHYSBASE7" }, |
| 565 | { 0x020f, "IA32_MTRR_PHYSMASK7" }, |
| 566 | { 0x0250, "IA32_MTRR_FIX64K_00000" }, |
| 567 | { 0x0258, "IA32_MTRR_FIX16K_80000" }, |
| 568 | { 0x0259, "IA32_MTRR_FIX16K_A0000" }, |
| 569 | { 0x0268, "IA32_MTRR_FIX4K_C0000" }, |
| 570 | { 0x0269, "IA32_MTRR_FIX4K_C8000" }, |
| 571 | { 0x026a, "IA32_MTRR_FIX4K_D0000" }, |
| 572 | { 0x026b, "IA32_MTRR_FIX4K_D8000" }, |
| 573 | { 0x026c, "IA32_MTRR_FIX4K_E0000" }, |
| 574 | { 0x026d, "IA32_MTRR_FIX4K_E8000" }, |
| 575 | { 0x026e, "IA32_MTRR_FIX4K_F0000" }, |
| 576 | { 0x026f, "IA32_MTRR_FIX4K_F8000" }, |
| 577 | { 0x02ff, "IA32_MTRR_DEF_TYPE" }, |
| 578 | //{ 0x00c000080, "IA32_CR_EFER" }, // Seems to be RO |
| 579 | }; |
| 580 | |
Pat Erley | ca3548e | 2010-04-21 06:23:19 +0000 | [diff] [blame] | 581 | /* Pentium 4 and XEON */ |
Stefan Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame] | 582 | /* |
| 583 | * All MSRs per |
Pat Erley | ca3548e | 2010-04-21 06:23:19 +0000 | [diff] [blame] | 584 | * |
Idwer Vollering | 312fc96 | 2010-12-17 22:34:58 +0000 | [diff] [blame] | 585 | * Intel 64 and IA-32 Architectures Software Developer's Manual |
| 586 | * Volume 3B: System Programming Guide, Part 2 |
Pat Erley | ca3548e | 2010-04-21 06:23:19 +0000 | [diff] [blame] | 587 | * |
Idwer Vollering | 312fc96 | 2010-12-17 22:34:58 +0000 | [diff] [blame] | 588 | * Table B-5, B-7 |
Pat Erley | ca3548e | 2010-04-21 06:23:19 +0000 | [diff] [blame] | 589 | */ |
Idwer Vollering | 312fc96 | 2010-12-17 22:34:58 +0000 | [diff] [blame] | 590 | static const msr_entry_t modelf2x_global_msrs[] = { |
| 591 | { 0x0000, "IA32_P5_MC_ADDR" }, |
| 592 | { 0x0001, "IA32_P5_MC_TYPE" }, |
| 593 | /* 0x6: Not available in model 2. */ |
| 594 | { 0x0017, "IA32_PLATFORM_ID" }, |
| 595 | { 0x002a, "MSR_EBC_HARD_POWERON" }, |
Elyes HAOUAS | e3e2bb0 | 2016-07-26 18:34:14 +0200 | [diff] [blame] | 596 | { 0x002b, "MSR_EBC_SOFT_POWERON" }, |
Idwer Vollering | 312fc96 | 2010-12-17 22:34:58 +0000 | [diff] [blame] | 597 | /* 0x2c: Not available in model 2. */ |
| 598 | // WRITE ONLY { 0x0079, "IA32_BIOS_UPDT_TRIG" }, |
| 599 | { 0x019c, "IA32_THERM_STATUS" }, |
| 600 | /* 0x19d: Not available in model 2. */ |
| 601 | { 0x01a0, "IA32_MISC_ENABLE" }, |
| 602 | /* 0x1a1: Not available in model 2. */ |
| 603 | { 0x0200, "IA32_MTRR_PHYSBASE0" }, |
| 604 | { 0x0201, "IA32_MTRR_PHYSMASK0" }, |
| 605 | { 0x0202, "IA32_MTRR_PHYSBASE1" }, |
| 606 | { 0x0203, "IA32_MTRR_PHYSMASK1" }, |
| 607 | { 0x0204, "IA32_MTRR_PHYSBASE2" }, |
| 608 | { 0x0205, "IA32_MTRR_PHYSMASK2" }, |
| 609 | { 0x0206, "IA32_MTRR_PHYSBASE3" }, |
| 610 | { 0x0207, "IA32_MTRR_PHYSMASK3" }, |
| 611 | { 0x0208, "IA32_MTRR_PHYSBASE4" }, |
| 612 | { 0x0209, "IA32_MTRR_PHYSMASK4" }, |
| 613 | { 0x020a, "IA32_MTRR_PHYSBASE5" }, |
| 614 | { 0x020b, "IA32_MTRR_PHYSMASK5" }, |
| 615 | { 0x020c, "IA32_MTRR_PHYSBASE6" }, |
| 616 | { 0x020d, "IA32_MTRR_PHYSMASK6" }, |
| 617 | { 0x020e, "IA32_MTRR_PHYSBASE7" }, |
| 618 | { 0x020f, "IA32_MTRR_PHYSMASK7" }, |
| 619 | { 0x0250, "IA32_MTRR_FIX64K_00000" }, |
| 620 | { 0x0258, "IA32_MTRR_FIX16K_80000" }, |
| 621 | { 0x0259, "IA32_MTRR_FIX16K_A0000" }, |
| 622 | { 0x0268, "IA32_MTRR_FIX4K_C0000" }, |
| 623 | { 0x0269, "IA32_MTRR_FIX4K_C8000" }, |
| 624 | { 0x026a, "IA32_MTRR_FIX4K_D0000" }, |
| 625 | { 0x026b, "IA32_MTRR_FIX4K_D8000" }, |
| 626 | { 0x026c, "IA32_MTRR_FIX4K_E0000" }, |
| 627 | { 0x026d, "IA32_MTRR_FIX4K_E8000" }, |
| 628 | { 0x026e, "IA32_MTRR_FIX4K_F0000" }, |
| 629 | { 0x026f, "IA32_MTRR_FIX4K_F8000" }, |
| 630 | { 0x02ff, "IA32_MTRR_DEF_TYPE" }, |
| 631 | { 0x0300, "MSR_BPU_COUNTER0" }, |
| 632 | { 0x0301, "MSR_BPU_COUNTER1" }, |
| 633 | { 0x0302, "MSR_BPU_COUNTER2" }, |
| 634 | { 0x0303, "MSR_BPU_COUNTER3" }, |
| 635 | { 0x0304, "MSR_MS_COUNTER0" }, |
| 636 | { 0x0305, "MSR_MS_COUNTER1" }, |
| 637 | { 0x0306, "MSR_MS_COUNTER2" }, |
| 638 | { 0x0307, "MSR_MS_COUNTER3" }, |
| 639 | { 0x0308, "MSR_FLAME_COUNTER0" }, |
| 640 | { 0x0309, "MSR_FLAME_COUNTER1" }, |
| 641 | { 0x030a, "MSR_FLAME_COUNTER2" }, |
| 642 | { 0x030b, "MSR_FLAME_COUNTER3" }, |
| 643 | { 0x030c, "MSR_IQ_COUNTER0" }, |
| 644 | { 0x030d, "MSR_IQ_COUNTER1" }, |
| 645 | { 0x030e, "MSR_IQ_COUNTER2" }, |
| 646 | { 0x030f, "MSR_IQ_COUNTER3" }, |
| 647 | { 0x0310, "MSR_IQ_COUNTER4" }, |
| 648 | { 0x0311, "MSR_IQ_COUNTER5" }, |
| 649 | { 0x0360, "MSR_BPU_CCCR0" }, |
| 650 | { 0x0361, "MSR_BPU_CCCR1" }, |
| 651 | { 0x0362, "MSR_BPU_CCCR2" }, |
| 652 | { 0x0363, "MSR_BPU_CCCR3" }, |
| 653 | { 0x0364, "MSR_MS_CCCR0" }, |
| 654 | { 0x0365, "MSR_MS_CCCR1" }, |
| 655 | { 0x0366, "MSR_MS_CCCR2" }, |
| 656 | { 0x0367, "MSR_MS_CCCR3" }, |
| 657 | { 0x0368, "MSR_FLAME_CCCR0" }, |
| 658 | { 0x0369, "MSR_FLAME_CCCR1" }, |
| 659 | { 0x036a, "MSR_FLAME_CCCR2" }, |
| 660 | { 0x036b, "MSR_FLAME_CCCR3" }, |
| 661 | { 0x036c, "MSR_IQ_CCCR0" }, |
| 662 | { 0x036d, "MSR_IQ_CCCR1" }, |
| 663 | { 0x036e, "MSR_IQ_CCCR2" }, |
| 664 | { 0x036f, "MSR_IQ_CCCR3" }, |
| 665 | { 0x0370, "MSR_IQ_CCCR4" }, |
| 666 | { 0x0371, "MSR_IQ_CCCR5" }, |
| 667 | { 0x03a0, "MSR_BSU_ESCR0" }, |
| 668 | { 0x03a1, "MSR_BSU_ESCR1" }, |
| 669 | { 0x03a2, "MSR_FSB_ESCR0" }, |
| 670 | { 0x03a3, "MSR_FSB_ESCR1" }, |
| 671 | { 0x03a4, "MSR_FIRM_ESCR0" }, |
| 672 | { 0x03a5, "MSR_FIRM_ESCR1" }, |
| 673 | { 0x03a6, "MSR_FLAME_ESCR0" }, |
| 674 | { 0x03a7, "MSR_FLAME_ESCR1" }, |
| 675 | { 0x03a8, "MSR_DAC_ESCR0" }, |
| 676 | { 0x03a9, "MSR_DAC_ESCR1" }, |
| 677 | { 0x03aa, "MSR_MOB_ESCR0" }, |
| 678 | { 0x03ab, "MSR_MOB_ESCR1" }, |
| 679 | { 0x03ac, "MSR_PMH_ESCR0" }, |
| 680 | { 0x03ad, "MSR_PMH_ESCR1" }, |
| 681 | { 0x03ae, "MSR_SAAT_ESCR0" }, |
| 682 | { 0x03af, "MSR_SAAT_ESCR1" }, |
| 683 | { 0x03b0, "MSR_U2L_ESCR0" }, |
| 684 | { 0x03b1, "MSR_U2L_ESCR1" }, |
| 685 | { 0x03b2, "MSR_BPU_ESCR0" }, |
| 686 | { 0x03b3, "MSR_BPU_ESCR1" }, |
| 687 | { 0x03b4, "MSR_IS_ESCR0" }, |
| 688 | { 0x03b5, "MSR_BPU_ESCR1" }, |
| 689 | { 0x03b6, "MSR_ITLB_ESCR0" }, |
| 690 | { 0x03b7, "MSR_ITLB_ESCR1" }, |
| 691 | { 0x03b8, "MSR_CRU_ESCR0" }, |
| 692 | { 0x03b9, "MSR_CRU_ESCR1" }, |
| 693 | { 0x03ba, "MSR_IQ_ESCR0" }, |
| 694 | { 0x03bb, "MSR_IQ_ESCR1" }, |
| 695 | { 0x03bc, "MSR_RAT_ESCR0" }, |
| 696 | { 0x03bd, "MSR_RAT_ESCR1" }, |
| 697 | { 0x03be, "MSR_SSU_ESCR0" }, |
| 698 | { 0x03c0, "MSR_MS_ESCR0" }, |
| 699 | { 0x03c1, "MSR_MS_ESCR1" }, |
| 700 | { 0x03c2, "MSR_TBPU_ESCR0" }, |
| 701 | { 0x03c3, "MSR_TBPU_ESCR1" }, |
| 702 | { 0x03c4, "MSR_TC_ESCR0" }, |
| 703 | { 0x03c5, "MSR_TC_ESCR1" }, |
| 704 | { 0x03c8, "MSR_IX_ESCR0" }, |
| 705 | { 0x03c9, "MSR_IX_ESCR1" }, |
| 706 | { 0x03ca, "MSR_ALF_ESCR0" }, |
| 707 | { 0x03cb, "MSR_ALF_ESCR1" }, |
| 708 | { 0x03cc, "MSR_CRU_ESCR2" }, |
| 709 | { 0x03cd, "MSR_CRU_ESCR3" }, |
| 710 | { 0x03e0, "MSR_CRU_ESCR4" }, |
| 711 | { 0x03e1, "MSR_CRU_ESCR5" }, |
| 712 | { 0x03f0, "MSR_TC_PRECISE_EVENT" }, |
| 713 | { 0x03f1, "MSR_PEBS_ENABLE" }, |
| 714 | { 0x03f2, "MSR_PEBS_MATRIX_VERT" }, |
| 715 | |
| 716 | /* |
| 717 | * All MCX_ADDR and MCX_MISC MSRs depend on a bit being |
| 718 | * set in MCX_STATUS. |
| 719 | */ |
| 720 | { 0x400, "IA32_MC0_CTL" }, |
| 721 | { 0x401, "IA32_MC0_STATUS" }, |
| 722 | { 0x402, "IA32_MC0_ADDR" }, |
| 723 | { 0x403, "IA32_MC0_MISC" }, |
| 724 | { 0x404, "IA32_MC1_CTL" }, |
| 725 | { 0x405, "IA32_MC1_STATUS" }, |
| 726 | { 0x406, "IA32_MC1_ADDR" }, |
| 727 | { 0x407, "IA32_MC1_MISC" }, |
| 728 | { 0x408, "IA32_MC2_CTL" }, |
| 729 | { 0x409, "IA32_MC2_STATUS" }, |
| 730 | { 0x40a, "IA32_MC2_ADDR" }, |
| 731 | { 0x40b, "IA32_MC2_MISC" }, |
| 732 | { 0x40c, "IA32_MC3_CTL" }, |
| 733 | { 0x40d, "IA32_MC3_STATUS" }, |
| 734 | { 0x40e, "IA32_MC3_ADDR" }, |
| 735 | { 0x40f, "IA32_MC3_MISC" }, |
| 736 | { 0x410, "IA32_MC4_CTL" }, |
| 737 | { 0x411, "IA32_MC4_STATUS" }, |
| 738 | { 0x412, "IA32_MC4_ADDR" }, |
| 739 | { 0x413, "IA32_MC4_MISC" }, |
| 740 | }; |
| 741 | |
| 742 | static const msr_entry_t modelf2x_per_core_msrs[] = { |
| 743 | { 0x0010, "IA32_TIME_STAMP_COUNTER" }, |
| 744 | { 0x001b, "IA32_APIC_BASE" }, |
| 745 | /* 0x3a: Not available in model 2. */ |
| 746 | { 0x008b, "IA32_BIOS_SIGN_ID" }, |
| 747 | /* 0x9b: Not available in model 2. */ |
| 748 | { 0x00fe, "IA32_MTRRCAP" }, |
| 749 | { 0x0174, "IA32_SYSENTER_CS" }, |
| 750 | { 0x0175, "IA32_SYSENTER_ESP" }, |
| 751 | { 0x0176, "IA32_SYSENTER_EIP" }, |
| 752 | { 0x0179, "IA32_MCG_CAP" }, |
| 753 | { 0x017a, "IA32_MCG_STATUS" }, |
| 754 | { 0x017b, "IA32_MCG_CTL" }, |
| 755 | { 0x0180, "MSR_MCG_RAX" }, |
| 756 | { 0x0181, "MSR_MCG_RBX" }, |
| 757 | { 0x0182, "MSR_MCG_RCX" }, |
| 758 | { 0x0183, "MSR_MCG_RDX" }, |
| 759 | { 0x0184, "MSR_MCG_RSI" }, |
| 760 | { 0x0185, "MSR_MCG_RDI" }, |
| 761 | { 0x0186, "MSR_MCG_RBP" }, |
| 762 | { 0x0187, "MSR_MCG_RSP" }, |
| 763 | { 0x0188, "MSR_MCG_RFLAGS" }, |
| 764 | { 0x0189, "MSR_MCG_RIP" }, |
| 765 | { 0x018a, "MSR_MCG_MISC" }, |
| 766 | /* 0x18b-0x18f: Reserved */ |
| 767 | { 0x0190, "MSR_MCG_R8" }, |
| 768 | { 0x0191, "MSR_MCG_R9" }, |
| 769 | { 0x0192, "MSR_MCG_R10" }, |
| 770 | { 0x0193, "MSR_MCG_R11" }, |
| 771 | { 0x0194, "MSR_MCG_R12" }, |
| 772 | { 0x0195, "MSR_MCG_R13" }, |
| 773 | { 0x0196, "MSR_MCG_R14" }, |
| 774 | { 0x0197, "MSR_MCG_R15" }, |
| 775 | /* 0x198: Not available in model 2. */ |
| 776 | /* 0x199: Not available in model 2. */ |
| 777 | { 0x019a, "IA32_CLOCK_MODULATION" }, |
| 778 | { 0x019b, "IA32_THERM_INTERRUPT" }, |
| 779 | { 0x01a0, "IA32_MISC_ENABLE" }, |
| 780 | { 0x01d7, "MSR_LER_FROM_LIP" }, |
| 781 | { 0x01d8, "MSR_LER_TO_LIP" }, |
| 782 | { 0x01d9, "MSR_DEBUGCTLA" }, |
| 783 | { 0x01da, "MSR_LASTBRANCH_TOS" }, |
| 784 | { 0x01db, "MSR_LASTBRANCH_0" }, |
| 785 | { 0x01dd, "MSR_LASTBRANCH_2" }, |
| 786 | { 0x01de, "MSR_LASTBRANCH_3" }, |
| 787 | { 0x0277, "IA32_PAT" }, |
| 788 | /* 0x480-0x48b : Not available in model 2. */ |
| 789 | { 0x0600, "IA32_DS_AREA" }, |
| 790 | /* 0x0680 - 0x06cf Branch Records Skipped */ |
| 791 | }; |
| 792 | |
Pat Erley | ca3548e | 2010-04-21 06:23:19 +0000 | [diff] [blame] | 793 | static const msr_entry_t modelf4x_global_msrs[] = { |
| 794 | { 0x0000, "IA32_P5_MC_ADDR" }, |
| 795 | { 0x0001, "IA32_P5_MC_TYPE" }, |
| 796 | { 0x0006, "IA32_MONITOR_FILTER_LINE_SIZE" }, |
| 797 | { 0x0017, "IA32_PLATFORM_ID" }, |
| 798 | { 0x002a, "MSR_EBC_HARD_POWERON" }, |
Elyes HAOUAS | e3e2bb0 | 2016-07-26 18:34:14 +0200 | [diff] [blame] | 799 | { 0x002b, "MSR_EBC_SOFT_POWERON" }, |
Pat Erley | ca3548e | 2010-04-21 06:23:19 +0000 | [diff] [blame] | 800 | { 0x002c, "MSR_EBC_FREQUENCY_ID" }, |
Stefan Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame] | 801 | // WRITE ONLY { 0x0079, "IA32_BIOS_UPDT_TRIG" }, |
Pat Erley | ca3548e | 2010-04-21 06:23:19 +0000 | [diff] [blame] | 802 | { 0x019c, "IA32_THERM_STATUS" }, |
| 803 | { 0x019d, "MSR_THERM2_CTL" }, |
| 804 | { 0x01a0, "IA32_MISC_ENABLE" }, |
| 805 | { 0x01a1, "MSR_PLATFORM_BRV" }, |
| 806 | { 0x0200, "IA32_MTRR_PHYSBASE0" }, |
| 807 | { 0x0201, "IA32_MTRR_PHYSMASK0" }, |
| 808 | { 0x0202, "IA32_MTRR_PHYSBASE1" }, |
| 809 | { 0x0203, "IA32_MTRR_PHYSMASK1" }, |
| 810 | { 0x0204, "IA32_MTRR_PHYSBASE2" }, |
| 811 | { 0x0205, "IA32_MTRR_PHYSMASK2" }, |
| 812 | { 0x0206, "IA32_MTRR_PHYSBASE3" }, |
| 813 | { 0x0207, "IA32_MTRR_PHYSMASK3" }, |
| 814 | { 0x0208, "IA32_MTRR_PHYSBASE4" }, |
| 815 | { 0x0209, "IA32_MTRR_PHYSMASK4" }, |
| 816 | { 0x020a, "IA32_MTRR_PHYSBASE5" }, |
| 817 | { 0x020b, "IA32_MTRR_PHYSMASK5" }, |
| 818 | { 0x020c, "IA32_MTRR_PHYSBASE6" }, |
| 819 | { 0x020d, "IA32_MTRR_PHYSMASK6" }, |
| 820 | { 0x020e, "IA32_MTRR_PHYSBASE7" }, |
| 821 | { 0x020f, "IA32_MTRR_PHYSMASK7" }, |
| 822 | { 0x0250, "IA32_MTRR_FIX64K_00000" }, |
| 823 | { 0x0258, "IA32_MTRR_FIX16K_80000" }, |
| 824 | { 0x0259, "IA32_MTRR_FIX16K_A0000" }, |
| 825 | { 0x0268, "IA32_MTRR_FIX4K_C0000" }, |
| 826 | { 0x0269, "IA32_MTRR_FIX4K_C8000" }, |
| 827 | { 0x026a, "IA32_MTRR_FIX4K_D0000" }, |
| 828 | { 0x026b, "IA32_MTRR_FIX4K_D8000" }, |
| 829 | { 0x026c, "IA32_MTRR_FIX4K_E0000" }, |
| 830 | { 0x026d, "IA32_MTRR_FIX4K_E8000" }, |
| 831 | { 0x026e, "IA32_MTRR_FIX4K_F0000" }, |
| 832 | { 0x026f, "IA32_MTRR_FIX4K_F8000" }, |
| 833 | { 0x02ff, "IA32_MTRR_DEF_TYPE" }, |
| 834 | { 0x0300, "MSR_BPU_COUNTER0" }, |
| 835 | { 0x0301, "MSR_BPU_COUNTER1" }, |
| 836 | { 0x0302, "MSR_BPU_COUNTER2" }, |
| 837 | { 0x0303, "MSR_BPU_COUNTER3" }, |
| 838 | /* Skipped through 0x3ff for now*/ |
| 839 | |
Stefan Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame] | 840 | /* All MCX_ADDR AND MCX_MISC MSRs depend on a bit being |
Pat Erley | ca3548e | 2010-04-21 06:23:19 +0000 | [diff] [blame] | 841 | * set in MCX_STATUS */ |
| 842 | { 0x400, "IA32_MC0_CTL" }, |
| 843 | { 0x401, "IA32_MC0_STATUS" }, |
| 844 | { 0x402, "IA32_MC0_ADDR" }, |
| 845 | { 0x403, "IA32_MC0_MISC" }, |
| 846 | { 0x404, "IA32_MC1_CTL" }, |
| 847 | { 0x405, "IA32_MC1_STATUS" }, |
| 848 | { 0x406, "IA32_MC1_ADDR" }, |
Stefan Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame] | 849 | { 0x407, "IA32_MC1_MISC" }, |
Pat Erley | ca3548e | 2010-04-21 06:23:19 +0000 | [diff] [blame] | 850 | { 0x408, "IA32_MC2_CTL" }, |
| 851 | { 0x409, "IA32_MC2_STATUS" }, |
| 852 | { 0x40a, "IA32_MC2_ADDR" }, |
| 853 | { 0x40b, "IA32_MC2_MISC" }, |
| 854 | { 0x40c, "IA32_MC3_CTL" }, |
| 855 | { 0x40d, "IA32_MC3_STATUS" }, |
| 856 | { 0x40e, "IA32_MC3_ADDR" }, |
| 857 | { 0x40f, "IA32_MC3_MISC" }, |
| 858 | { 0x410, "IA32_MC4_CTL" }, |
| 859 | { 0x411, "IA32_MC4_STATUS" }, |
| 860 | { 0x412, "IA32_MC4_ADDR" }, |
| 861 | { 0x413, "IA32_MC4_MISC" }, |
| 862 | }; |
| 863 | |
| 864 | static const msr_entry_t modelf4x_per_core_msrs[] = { |
| 865 | { 0x0010, "IA32_TIME_STAMP_COUNTER" }, |
| 866 | { 0x001b, "IA32_APIC_BASE" }, |
| 867 | { 0x003a, "IA32_FEATURE_CONTROL" }, |
| 868 | { 0x008b, "IA32_BIOS_SIGN_ID" }, |
| 869 | { 0x009b, "IA32_SMM_MONITOR_CTL" }, |
| 870 | { 0x00fe, "IA32_MTRRCAP" }, |
| 871 | { 0x0174, "IA32_SYSENTER_CS" }, |
| 872 | { 0x0175, "IA32_SYSENTER_ESP" }, |
| 873 | { 0x0176, "IA32_SYSENTER_EIP" }, |
| 874 | { 0x0179, "IA32_MCG_CAP" }, |
| 875 | { 0x017a, "IA32_MCG_STATUS" }, |
| 876 | { 0x0180, "MSR_MCG_RAX" }, |
| 877 | { 0x0181, "MSR_MCG_RBX" }, |
| 878 | { 0x0182, "MSR_MCG_RCX" }, |
| 879 | { 0x0183, "MSR_MCG_RDX" }, |
| 880 | { 0x0184, "MSR_MCG_RSI" }, |
| 881 | { 0x0185, "MSR_MCG_RDI" }, |
| 882 | { 0x0186, "MSR_MCG_RBP" }, |
| 883 | { 0x0187, "MSR_MCG_RSP" }, |
| 884 | { 0x0188, "MSR_MCG_RFLAGS" }, |
| 885 | { 0x0189, "MSR_MCG_RIP" }, |
| 886 | { 0x018a, "MSR_MCG_MISC" }, |
| 887 | // 0x18b-f Reserved |
| 888 | { 0x0190, "MSR_MCG_R8" }, |
| 889 | { 0x0191, "MSR_MCG_R9" }, |
| 890 | { 0x0192, "MSR_MCG_R10" }, |
| 891 | { 0x0193, "MSR_MCG_R11" }, |
| 892 | { 0x0194, "MSR_MCG_R12" }, |
| 893 | { 0x0195, "MSR_MCG_R13" }, |
| 894 | { 0x0196, "MSR_MCG_R14" }, |
| 895 | { 0x0197, "MSR_MCG_R15" }, |
| 896 | { 0x0198, "IA32_PERF_STATUS" }, |
| 897 | { 0x0199, "IA32_PERF_CTL" }, |
| 898 | { 0x019a, "IA32_CLOCK_MODULATION" }, |
| 899 | { 0x019b, "IA32_THERM_INTERRUPT" }, |
| 900 | { 0x01a0, "IA32_MISC_ENABLE" }, // Bit 34 is Core Specific |
| 901 | { 0x01d7, "MSR_LER_FROM_LIP" }, |
| 902 | { 0x01d8, "MSR_LER_TO_LIP" }, |
| 903 | { 0x01d9, "MSR_DEBUGCTLA" }, |
| 904 | { 0x01da, "MSR_LASTBRANCH_TOS" }, |
| 905 | { 0x0277, "IA32_PAT" }, |
| 906 | /** Virtualization |
| 907 | { 0x480, "IA32_VMX_BASIC" }, |
| 908 | through |
| 909 | { 0x48b, "IA32_VMX_PROCBASED_CTLS2" }, |
| 910 | Not implemented in my CPU |
| 911 | */ |
| 912 | { 0x0600, "IA32_DS_AREA" }, |
| 913 | /* 0x0680 - 0x06cf Branch Records Skipped */ |
Stefan Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame] | 914 | |
Pat Erley | ca3548e | 2010-04-21 06:23:19 +0000 | [diff] [blame] | 915 | }; |
| 916 | |
Elyes HAOUAS | dfe8d64 | 2018-01-31 21:29:00 +0100 | [diff] [blame] | 917 | /* |
| 918 | * 64-ia-32-architectures-software-developer-vol-3c-part-3-manual |
| 919 | * September 2016 |
| 920 | */ |
| 921 | static const msr_entry_t modelf6x_global_msrs[] = { |
| 922 | { 0x0000, "IA32_P5_MC_ADDR" }, |
| 923 | { 0x0001, "IA32_P5_MC_TYPE" }, |
| 924 | { 0x0006, "IA32_MONITOR_FILTER_LINE_SIZE" }, |
| 925 | { 0x0017, "IA32_PLATFORM_ID" }, |
| 926 | { 0x002a, "MSR_EBC_HARD_POWERON" }, |
| 927 | { 0x002b, "MSR_EBC_SOFT_POWERON" }, |
| 928 | { 0x002c, "MSR_EBC_FREQUENCY_ID" }, |
| 929 | // WRITE ONLY { 0x0079, "IA32_BIOS_UPDT_TRIG" }, |
| 930 | { 0x019c, "IA32_THERM_STATUS" }, |
| 931 | { 0x019d, "MSR_THERM2_CTL" }, |
| 932 | { 0x01a0, "IA32_MISC_ENABLE" }, |
| 933 | { 0x01a1, "MSR_PLATFORM_BRV" }, |
| 934 | { 0x0200, "IA32_MTRR_PHYSBASE0" }, |
| 935 | { 0x0201, "IA32_MTRR_PHYSMASK0" }, |
| 936 | { 0x0202, "IA32_MTRR_PHYSBASE1" }, |
| 937 | { 0x0203, "IA32_MTRR_PHYSMASK1" }, |
| 938 | { 0x0204, "IA32_MTRR_PHYSBASE2" }, |
| 939 | { 0x0205, "IA32_MTRR_PHYSMASK2" }, |
| 940 | { 0x0206, "IA32_MTRR_PHYSBASE3" }, |
| 941 | { 0x0207, "IA32_MTRR_PHYSMASK3" }, |
| 942 | { 0x0208, "IA32_MTRR_PHYSBASE4" }, |
| 943 | { 0x0209, "IA32_MTRR_PHYSMASK4" }, |
| 944 | { 0x020a, "IA32_MTRR_PHYSBASE5" }, |
| 945 | { 0x020b, "IA32_MTRR_PHYSMASK5" }, |
| 946 | { 0x020c, "IA32_MTRR_PHYSBASE6" }, |
| 947 | { 0x020d, "IA32_MTRR_PHYSMASK6" }, |
| 948 | { 0x020e, "IA32_MTRR_PHYSBASE7" }, |
| 949 | { 0x020f, "IA32_MTRR_PHYSMASK7" }, |
| 950 | { 0x0250, "IA32_MTRR_FIX64K_00000" }, |
| 951 | { 0x0258, "IA32_MTRR_FIX16K_80000" }, |
| 952 | { 0x0259, "IA32_MTRR_FIX16K_A0000" }, |
| 953 | { 0x0268, "IA32_MTRR_FIX4K_C0000" }, |
| 954 | { 0x0269, "IA32_MTRR_FIX4K_C8000" }, |
| 955 | { 0x026a, "IA32_MTRR_FIX4K_D0000" }, |
| 956 | { 0x026b, "IA32_MTRR_FIX4K_D8000" }, |
| 957 | { 0x026c, "IA32_MTRR_FIX4K_E0000" }, |
| 958 | { 0x026d, "IA32_MTRR_FIX4K_E8000" }, |
| 959 | { 0x026e, "IA32_MTRR_FIX4K_F0000" }, |
| 960 | { 0x026f, "IA32_MTRR_FIX4K_F8000" }, |
| 961 | { 0x02ff, "IA32_MTRR_DEF_TYPE" }, |
| 962 | { 0x0300, "MSR_BPU_COUNTER0" }, |
| 963 | { 0x0301, "MSR_BPU_COUNTER1" }, |
| 964 | { 0x0302, "MSR_BPU_COUNTER2" }, |
| 965 | { 0x0303, "MSR_BPU_COUNTER3" }, |
| 966 | { 0x0304, "MSR_MS_COUNTER0" }, |
| 967 | { 0x0305, "MSR_MS_COUNTER1" }, |
| 968 | { 0x0306, "MSR_MS_COUNTER2" }, |
| 969 | { 0x0307, "MSR_MS_COUNTER3" }, |
| 970 | { 0x0308, "MSR_FLAME_COUNTER0" }, |
| 971 | { 0x0309, "MSR_FLAME_COUNTER1" }, |
| 972 | { 0x030a, "MSR_FLAME_COUNTER2" }, |
| 973 | { 0x030b, "MSR_FLAME_COUNTER3" }, |
| 974 | { 0x030c, "MSR_IQ_COUNTER0" }, |
| 975 | { 0x030d, "MSR_IQ_COUNTER1" }, |
| 976 | { 0x030e, "MSR_IQ_COUNTER2" }, |
| 977 | { 0x030f, "MSR_IQ_COUNTER3" }, |
| 978 | { 0x0310, "MSR_IQ_COUNTER4" }, |
| 979 | { 0x0311, "MSR_IQ_COUNTER5" }, |
| 980 | { 0x0360, "MSR_BPU_CCCR0" }, |
| 981 | { 0x0361, "MSR_BPU_CCCR1" }, |
| 982 | { 0x0362, "MSR_BPU_CCCR2" }, |
| 983 | { 0x0363, "MSR_BPU_CCCR3" }, |
| 984 | { 0x0364, "MSR_MS_CCCR0" }, |
| 985 | { 0x0365, "MSR_MS_CCCR1" }, |
| 986 | { 0x0366, "MSR_MS_CCCR2" }, |
| 987 | { 0x0367, "MSR_MS_CCCR3" }, |
| 988 | { 0x0368, "MSR_FLAME_CCCR0" }, |
| 989 | { 0x0369, "MSR_FLAME_CCCR1" }, |
| 990 | { 0x036A, "MSR_FLAME_CCCR2" }, |
| 991 | { 0x036B, "MSR_FLAME_CCCR3" }, |
| 992 | { 0x036C, "MSR_IQ_CCCR0" }, |
| 993 | { 0x036D, "MSR_IQ_CCCR1" }, |
| 994 | { 0x036E, "MSR_IQ_CCCR2" }, |
| 995 | { 0x036F, "MSR_IQ_CCCR3" }, |
| 996 | { 0x0370, "MSR_IQ_CCCR4" }, |
| 997 | { 0x0371, "MSR_IQ_CCCR5" }, |
| 998 | { 0x03A0, "MSR_BSU_ESCR0" }, |
| 999 | { 0x03A1, "MSR_BSU_ESCR1" }, |
| 1000 | { 0x03A2, "MSR_FSB_ESCR0" }, |
| 1001 | { 0x03A3, "MSR_FSB_ESCR1" }, |
| 1002 | { 0x03A4, "MSR_FIRM_ESCR0" }, |
| 1003 | { 0x03A5, "MSR_FIRM_ESCR1" }, |
| 1004 | { 0x03A6, "MSR_FLAME_ESCR0" }, |
| 1005 | { 0x03A7, "MSR_FLAME_ESCR1" }, |
| 1006 | { 0x03A8, "MSR_DAC_ESCR0" }, |
| 1007 | { 0x03A9, "MSR_DAC_ESCR1" }, |
| 1008 | { 0x03AA, "MSR_MOB_ESCR0" }, |
| 1009 | { 0x03AB, "MSR_MOB_ESCR1" }, |
| 1010 | { 0x03AC, "MSR_PMH_ESCR0" }, |
| 1011 | { 0x03AD, "MSR_PMH_ESCR1" }, |
| 1012 | { 0x03AE, "MSR_SAAT_ESCR0" }, |
| 1013 | { 0x03AF, "MSR_SAAT_ESCR1" }, |
| 1014 | { 0x03B0, "MSR_U2L_ESCR0" }, |
| 1015 | { 0x03B1, "MSR_U2L_ESCR1" }, |
| 1016 | { 0x03B2, "MSR_BPU_ESCR0" }, |
| 1017 | { 0x03B3, "MSR_BPU_ESCR1" }, |
| 1018 | { 0x03B4, "MSR_IS_ESCR0" }, |
| 1019 | { 0x03B5, "MSR_IS_ESCR1" }, |
| 1020 | { 0x03B6, "MSR_ITLB_ESCR0" }, |
| 1021 | { 0x03B7, "MSR_ITLB_ESCR1" }, |
| 1022 | { 0x03B8, "MSR_CRU_ESCR0" }, |
| 1023 | { 0x03B9, "MSR_CRU_ESCR1" }, |
| 1024 | { 0x03BA, "MSR_IQ_ESCR0" }, |
| 1025 | { 0x03BB, "MSR_IQ_ESCR1" }, |
| 1026 | { 0x03BC, "MSR_RAT_ESCR0" }, |
| 1027 | { 0x03BD, "MSR_RAT_ESCR1" }, |
| 1028 | { 0x03BE, "MSR_SSU_ESCR0" }, |
| 1029 | { 0x03C0, "MSR_MS_ESCR0" }, |
| 1030 | { 0x03C1, "MSR_MS_ESCR1" }, |
| 1031 | { 0x03C2, "MSR_TBPU_ESCR0" }, |
| 1032 | { 0x03C3, "MSR_TBPU_ESCR1" }, |
| 1033 | { 0x03C4, "MSR_TC_ESCR0" }, |
| 1034 | { 0x03C5, "MSR_TC_ESCR1" }, |
| 1035 | { 0x03C8, "MSR_IX_ESCR0" }, |
| 1036 | { 0x03C9, "MSR_IX_ESCR1" }, |
| 1037 | { 0x03CA, "MSR_ALF_ESCR0" }, |
| 1038 | { 0x03CB, "MSR_ALF_ESCR1" }, |
| 1039 | { 0x03CC, "MSR_CRU_ESCR2" }, |
| 1040 | { 0x03CD, "MSR_CRU_ESCR3" }, |
| 1041 | { 0x03E0, "MSR_CRU_ESCR4" }, |
| 1042 | { 0x03E1, "MSR_CRU_ESCR5" }, |
| 1043 | { 0x03F0, "MSR_TC_PRECISE_EVENT" }, |
| 1044 | { 0x03F1, "MSR_PEBS_ENABLE" }, |
| 1045 | { 0x03F2, "MSR_PEBS_MATRIX_VERT" }, |
| 1046 | { 0x0400, "IA32_MC0_CTL" }, |
| 1047 | { 0x0401, "IA32_MC0_STATUS" }, |
| 1048 | { 0x0402, "IA32_MC0_ADDR" }, |
| 1049 | { 0x0403, "IA32_MC0_MISC" }, |
| 1050 | { 0x0404, "IA32_MC1_CTL" }, |
| 1051 | { 0x0405, "IA32_MC1_STATUS" }, |
| 1052 | { 0x0406, "IA32_MC1_ADDR" }, |
| 1053 | { 0x0408, "IA32_MC2_CTL" }, |
| 1054 | { 0x0409, "IA32_MC2_STATUS" }, |
| 1055 | { 0x040b, "IA32_MC2_MISC" }, |
| 1056 | { 0x040c, "IA32_MC3_CTL" }, |
| 1057 | { 0x040d, "IA32_MC3_STATUS" }, |
| 1058 | { 0x040e, "IA32_MC3_ADDR" }, |
| 1059 | { 0x040f, "IA32_MC3_MISC" }, |
| 1060 | }; |
| 1061 | |
| 1062 | static const msr_entry_t modelf6x_per_core_msrs[] = { |
| 1063 | { 0x0010, "IA32_TIME_STAMP_COUNTER" }, |
| 1064 | { 0x001b, "IA32_APIC_BASE" }, |
| 1065 | { 0x008b, "IA32_BIOS_SIGN_ID" }, |
| 1066 | { 0x00fe, "IA32_MTRRCAP" }, |
| 1067 | { 0x0174, "IA32_SYSENTER_CS" }, |
| 1068 | { 0x0175, "IA32_SYSENTER_ESP" }, |
| 1069 | { 0x0176, "IA32_SYSENTER_EIP" }, |
| 1070 | { 0x0179, "IA32_MCG_CAP" }, |
| 1071 | { 0x017a, "IA32_MCG_STATUS" }, |
| 1072 | { 0x0180, "MSR_MCG_RAX" }, |
| 1073 | { 0x0181, "MSR_MCG_RBX" }, |
| 1074 | { 0x0182, "MSR_MCG_RCX" }, |
| 1075 | { 0x0183, "MSR_MCG_RDX" }, |
| 1076 | { 0x0184, "MSR_MCG_RSI" }, |
| 1077 | { 0x0185, "MSR_MCG_RDI" }, |
| 1078 | { 0x0186, "MSR_MCG_RBP" }, |
| 1079 | { 0x0187, "MSR_MCG_RSP" }, |
| 1080 | { 0x0188, "MSR_MCG_RFLAGS" }, |
| 1081 | { 0x0189, "MSR_MCG_RIP" }, |
| 1082 | { 0x018a, "MSR_MCG_MISC" }, |
| 1083 | { 0x0190, "MSR_MCG_R8" }, |
| 1084 | { 0x0191, "MSR_MCG_R9" }, |
| 1085 | { 0x0192, "MSR_MCG_R10" }, |
| 1086 | { 0x0193, "MSR_MCG_R11" }, |
| 1087 | { 0x0194, "MSR_MCG_R12" }, |
| 1088 | { 0x0195, "MSR_MCG_R13" }, |
| 1089 | { 0x0196, "MSR_MCG_R14" }, |
| 1090 | { 0x0197, "MSR_MCG_R15" }, |
| 1091 | { 0x0198, "IA32_PERF_STATUS" }, |
| 1092 | { 0x0199, "IA32_PERF_CTL" }, |
| 1093 | { 0x019a, "IA32_CLOCK_MODULATION" }, |
| 1094 | { 0x019b, "IA32_THERM_INTERRUPT" }, |
| 1095 | { 0x01A2, "MSR_TEMPERATURE_TARGET" }, |
| 1096 | { 0x01d7, "MSR_LER_FROM_LIP" }, |
| 1097 | { 0x01d8, "MSR_LER_TO_LIP" }, |
| 1098 | { 0x01d9, "MSR_DEBUGCTLA" }, |
| 1099 | { 0x01da, "MSR_LASTBRANCH_TOS" }, |
| 1100 | { 0x0277, "IA32_PAT" }, |
| 1101 | { 0x0600, "IA32_DS_AREA" }, |
| 1102 | { 0x0680, "MSR_LASTBRANCH_0_FROM_IP" }, |
| 1103 | { 0x0681, "MSR_LASTBRANCH_1_FROM_IP" }, |
| 1104 | { 0x0682, "MSR_LASTBRANCH_2_FROM_IP" }, |
| 1105 | { 0x0683, "MSR_LASTBRANCH_3_FROM_IP" }, |
| 1106 | { 0x0684, "MSR_LASTBRANCH_4_FROM_IP" }, |
| 1107 | { 0x0685, "MSR_LASTBRANCH_5_FROM_IP" }, |
| 1108 | { 0x0686, "MSR_LASTBRANCH_6_FROM_IP" }, |
| 1109 | { 0x0687, "MSR_LASTBRANCH_7_FROM_IP" }, |
| 1110 | { 0x0688, "MSR_LASTBRANCH_8_FROM_IP" }, |
| 1111 | { 0x0689, "MSR_LASTBRANCH_9_FROM_IP" }, |
| 1112 | { 0x068a, "MSR_LASTBRANCH_10_FROM_IP" }, |
| 1113 | { 0x068b, "MSR_LASTBRANCH_11_FROM_IP" }, |
| 1114 | { 0x068c, "MSR_LASTBRANCH_12_FROM_IP" }, |
| 1115 | { 0x068d, "MSR_LASTBRANCH_13_FROM_IP" }, |
| 1116 | { 0x068e, "MSR_LASTBRANCH_14_FROM_IP" }, |
| 1117 | { 0x068f, "MSR_LASTBRANCH_15_FROM_IP" }, |
| 1118 | { 0x06c0, "MSR_LASTBRANCH_0_TO_IP" }, |
| 1119 | { 0x06c1, "MSR_LASTBRANCH_1_TO_IP" }, |
| 1120 | { 0x06c2, "MSR_LASTBRANCH_2_TO_IP" }, |
| 1121 | { 0x06c3, "MSR_LASTBRANCH_3_TO_IP" }, |
| 1122 | { 0x06c4, "MSR_LASTBRANCH_4_TO_IP" }, |
| 1123 | { 0x06c5, "MSR_LASTBRANCH_5_TO_IP" }, |
| 1124 | { 0x06c6, "MSR_LASTBRANCH_6_TO_IP" }, |
| 1125 | { 0x06c7, "MSR_LASTBRANCH_7_TO_IP" }, |
| 1126 | { 0x06c8, "MSR_LASTBRANCH_8_TO_IP" }, |
| 1127 | { 0x06c9, "MSR_LASTBRANCH_9_TO_IP" }, |
| 1128 | { 0x06ca, "MSR_LASTBRANCH_10_TO_IP" }, |
| 1129 | { 0x06cb, "MSR_LASTBRANCH_11_TO_IP" }, |
| 1130 | { 0x06cc, "MSR_LASTBRANCH_12_TO_IP" }, |
| 1131 | { 0x06cd, "MSR_LASTBRANCH_13_TO_IP" }, |
| 1132 | { 0x06ce, "MSR_LASTBRANCH_14_TO_IP" }, |
| 1133 | { 0x06cf, "MSR_LASTBRANCH_15_TO_IP" }, |
| 1134 | /* Intel Xeon processor 7100 with L3 */ |
| 1135 | // { 0x107CC, "MSR_EMON_L3_CTR_CTL0" }, |
| 1136 | // { 0x107CD, "MSR_EMON_L3_CTR_CTL1" }, |
| 1137 | // { 0x107CE, "MSR_EMON_L3_CTR_CTL2" }, |
| 1138 | // { 0x107CF, "MSR_EMON_L3_CTR_CTL3" }, |
| 1139 | // { 0x107D0, "MSR_EMON_L3_CTR_CTL4" }, |
| 1140 | // { 0x107D1, "MSR_EMON_L3_CTR_CTL5" }, |
| 1141 | // { 0x107D2, "MSR_EMON_L3_CTR_CTL6" }, |
| 1142 | // { 0x107D3, "MSR_EMON_L3_CTR_CTL7" }, |
| 1143 | }; |
| 1144 | |
Olivier Langlois | 70f3987 | 2013-01-25 00:49:46 -0500 | [diff] [blame] | 1145 | /* Atom N455 |
| 1146 | * |
| 1147 | * This should apply to the following processors: |
| 1148 | * 06_1CH |
| 1149 | * 06_26H |
| 1150 | * 06_27H |
| 1151 | * 06_35 |
| 1152 | * 06_36 |
| 1153 | */ |
| 1154 | /* |
| 1155 | * All MSRs per |
| 1156 | * |
| 1157 | * Intel 64 and IA-32 Architectures Software Developer's Manual |
| 1158 | * Volume 3C: System Programming Guide, Part 3 |
| 1159 | * Order Number 326019 |
| 1160 | * January 2013 |
| 1161 | * |
| 1162 | * Table 35-4, 35-5 |
| 1163 | * |
| 1164 | * For now it has only been tested with 06_1CH. |
| 1165 | */ |
| 1166 | static const msr_entry_t model6_atom_global_msrs[] = { |
| 1167 | { 0x0000, "IA32_P5_MC_ADDR" }, |
| 1168 | { 0x0001, "IA32_P5_MC_TYPE" }, |
| 1169 | { 0x0010, "IA32_TIME_STAMP_COUNTER" }, |
| 1170 | { 0x0017, "IA32_PLATFORM_ID" }, |
| 1171 | { 0x002a, "MSR_EBC_HARD_POWERON" }, |
| 1172 | { 0x00cd, "MSR_FSB_FREQ" }, |
| 1173 | { 0x00fe, "IA32_MTRRCAP" }, |
| 1174 | { 0x011e, "MSR_BBL_CR_CTL3" }, |
| 1175 | { 0x0198, "IA32_PERF_STATUS" }, |
| 1176 | { 0x019d, "MSR_THERM2_CTL" }, |
| 1177 | { 0x0200, "IA32_MTRR_PHYSBASE0" }, |
| 1178 | { 0x0201, "IA32_MTRR_PHYSMASK0" }, |
| 1179 | { 0x0202, "IA32_MTRR_PHYSBASE1" }, |
| 1180 | { 0x0203, "IA32_MTRR_PHYSMASK1" }, |
| 1181 | { 0x0204, "IA32_MTRR_PHYSBASE2" }, |
| 1182 | { 0x0205, "IA32_MTRR_PHYSMASK2" }, |
| 1183 | { 0x0206, "IA32_MTRR_PHYSBASE3" }, |
| 1184 | { 0x0207, "IA32_MTRR_PHYSMASK3" }, |
| 1185 | { 0x0208, "IA32_MTRR_PHYSBASE4" }, |
| 1186 | { 0x0209, "IA32_MTRR_PHYSMASK4" }, |
| 1187 | { 0x020a, "IA32_MTRR_PHYSBASE5" }, |
| 1188 | { 0x020b, "IA32_MTRR_PHYSMASK5" }, |
| 1189 | { 0x020c, "IA32_MTRR_PHYSBASE6" }, |
| 1190 | { 0x020d, "IA32_MTRR_PHYSMASK6" }, |
| 1191 | { 0x020e, "IA32_MTRR_PHYSBASE7" }, |
| 1192 | { 0x020f, "IA32_MTRR_PHYSMASK7" }, |
| 1193 | { 0x0250, "IA32_MTRR_FIX64K_00000" }, |
| 1194 | { 0x0258, "IA32_MTRR_FIX16K_80000" }, |
| 1195 | { 0x0259, "IA32_MTRR_FIX16K_A0000" }, |
| 1196 | { 0x0268, "IA32_MTRR_FIX4K_C0000" }, |
| 1197 | { 0x0269, "IA32_MTRR_FIX4K_C8000" }, |
| 1198 | { 0x026a, "IA32_MTRR_FIX4K_D0000" }, |
| 1199 | { 0x026b, "IA32_MTRR_FIX4K_D8000" }, |
| 1200 | { 0x026c, "IA32_MTRR_FIX4K_E0000" }, |
| 1201 | { 0x026d, "IA32_MTRR_FIX4K_E8000" }, |
| 1202 | { 0x026e, "IA32_MTRR_FIX4K_F0000" }, |
| 1203 | { 0x026f, "IA32_MTRR_FIX4K_F8000" }, |
| 1204 | { 0x0345, "IA32_PERF_CAPABILITIES" }, |
| 1205 | { 0x400, "IA32_MC0_CTL" }, |
| 1206 | { 0x401, "IA32_MC0_STATUS" }, |
| 1207 | { 0x402, "IA32_MC0_ADDR" }, |
| 1208 | { 0x404, "IA32_MC1_CTL" }, |
| 1209 | { 0x405, "IA32_MC1_STATUS" }, |
| 1210 | { 0x408, "IA32_MC2_CTL" }, |
| 1211 | { 0x409, "IA32_MC2_STATUS" }, |
| 1212 | { 0x40a, "IA32_MC2_ADDR" }, |
| 1213 | { 0x40c, "IA32_MC3_CTL" }, |
| 1214 | { 0x40d, "IA32_MC3_STATUS" }, |
| 1215 | { 0x40e, "IA32_MC3_ADDR" }, |
| 1216 | { 0x410, "IA32_MC4_CTL" }, |
| 1217 | { 0x411, "IA32_MC4_STATUS" }, |
| 1218 | { 0x412, "IA32_MC4_ADDR" }, |
| 1219 | /* |
| 1220 | * Only 06_27C has the following MSRs |
| 1221 | */ |
| 1222 | /* |
| 1223 | { 0x03f8, "MSR_PKG_C2_RESIDENCY" }, |
| 1224 | { 0x03f9, "MSR_PKG_C4_RESIDENCY" }, |
| 1225 | { 0x03fa, "MSR_PKG_C6_RESIDENCY" }, |
| 1226 | */ |
| 1227 | }; |
| 1228 | |
Elyes HAOUAS | 9450150 | 2016-10-19 17:59:10 +0200 | [diff] [blame] | 1229 | static const msr_entry_t model6_atom_per_core_msrs[] = { |
| 1230 | { 0x0006, "IA32_MONITOR_FILTER_SIZE" }, |
| 1231 | { 0x0010, "IA32_TIME_STAMP_COUNTER" }, |
| 1232 | { 0x001b, "IA32_APIC_BASE" }, |
| 1233 | { 0x003a, "IA32_FEATURE_CONTROL" }, |
| 1234 | { 0x0040, "MSR_LASTBRANCH_0_FROM_IP" }, |
| 1235 | { 0x0041, "MSR_LASTBRANCH_1_FROM_IP" }, |
| 1236 | { 0x0042, "MSR_LASTBRANCH_2_FROM_IP" }, |
| 1237 | { 0x0043, "MSR_LASTBRANCH_3_FROM_IP" }, |
| 1238 | { 0x0044, "MSR_LASTBRANCH_4_FROM_IP" }, |
| 1239 | { 0x0045, "MSR_LASTBRANCH_5_FROM_IP" }, |
| 1240 | { 0x0046, "MSR_LASTBRANCH_6_FROM_IP" }, |
| 1241 | { 0x0047, "MSR_LASTBRANCH_7_FROM_IP" }, |
| 1242 | { 0x0060, "MSR_LASTBRANCH_0_TO_IP" }, |
| 1243 | { 0x0061, "MSR_LASTBRANCH_1_TO_IP" }, |
| 1244 | { 0x0062, "MSR_LASTBRANCH_2_TO_IP" }, |
| 1245 | { 0x0063, "MSR_LASTBRANCH_3_TO_IP" }, |
| 1246 | { 0x0064, "MSR_LASTBRANCH_4_TO_IP" }, |
| 1247 | { 0x0065, "MSR_LASTBRANCH_5_TO_IP" }, |
| 1248 | { 0x0066, "MSR_LASTBRANCH_6_TO_IP" }, |
| 1249 | { 0x0067, "MSR_LASTBRANCH_7_TO_IP" }, |
| 1250 | /* Write register */ |
| 1251 | /* |
| 1252 | { 0x0079, "IA32_BIOS_UPDT_TRIG" }, |
| 1253 | */ |
| 1254 | { 0x008b, "IA32_BIOS_SIGN_ID" }, |
| 1255 | { 0x00c1, "IA32_PMC0" }, |
| 1256 | { 0x00c2, "IA32_PMC1" }, |
| 1257 | { 0x00e7, "IA32_MPERF" }, |
| 1258 | { 0x00e8, "IA32_APERF" }, |
| 1259 | { 0x0174, "IA32_SYSENTER_CS" }, |
| 1260 | { 0x0175, "IA32_SYSENTER_ESP" }, |
| 1261 | { 0x0176, "IA32_SYSENTER_EIP" }, |
| 1262 | { 0x017a, "IA32_MCG_STATUS" }, |
| 1263 | { 0x0186, "IA32_PERF_EVNTSEL0" }, |
| 1264 | { 0x0187, "IA32_PERF_EVNTSEL1" }, |
| 1265 | { 0x0199, "IA32_PERF_CONTROL" }, |
| 1266 | { 0x019a, "IA32_CLOCK_MODULATION" }, |
| 1267 | { 0x019b, "IA32_THERM_INTERRUPT" }, |
| 1268 | { 0x019c, "IA32_THERM_STATUS" }, |
| 1269 | { 0x01a0, "IA32_MISC_ENABLES" }, |
| 1270 | { 0x01c9, "MSR_LASTBRANCH_TOS" }, |
| 1271 | { 0x01d9, "IA32_DEBUGCTL" }, |
| 1272 | { 0x01dd, "MSR_LER_FROM_LIP" }, |
| 1273 | { 0x01de, "MSR_LER_TO_LIP" }, |
| 1274 | { 0x0277, "IA32_PAT" }, |
| 1275 | { 0x0309, "IA32_FIXED_CTR0" }, |
| 1276 | { 0x030a, "IA32_FIXED_CTR1" }, |
| 1277 | { 0x030b, "IA32_FIXED_CTR2" }, |
| 1278 | { 0x038d, "IA32_FIXED_CTR_CTRL" }, |
| 1279 | { 0x038e, "IA32_PERF_GLOBAL_STATUS" }, |
| 1280 | { 0x038f, "IA32_PERF_GLOBAL_CTRL" }, |
| 1281 | { 0x0390, "IA32_PERF_GLOBAL_OVF_CTRL" }, |
| 1282 | { 0x03f1, "MSR_PEBS_ENABLE" }, |
| 1283 | { 0x0480, "IA32_VMX_BASIC" }, |
| 1284 | { 0x0481, "IA32_VMX_PINBASED_CTLS" }, |
| 1285 | { 0x0482, "IA32_VMX_PROCBASED_CTLS" }, |
| 1286 | { 0x0483, "IA32_VMX_EXIT_CTLS" }, |
| 1287 | { 0x0484, "IA32_VMX_ENTRY_CTLS" }, |
| 1288 | { 0x0485, "IA32_VMX_MISC" }, |
| 1289 | { 0x0486, "IA32_VMX_CR0_FIXED0" }, |
| 1290 | { 0x0487, "IA32_VMX_CR0_FIXED1" }, |
| 1291 | { 0x0488, "IA32_VMX_CR4_FIXED0" }, |
| 1292 | { 0x0489, "IA32_VMX_CR4_FIXED1" }, |
| 1293 | { 0x048a, "IA32_VMX_VMCS_ENUM" }, |
| 1294 | { 0x048b, "IA32_VMX_PROCBASED_CTLS2" }, |
| 1295 | { 0x0600, "IA32_DS_AREA" }, |
| 1296 | }; |
Olivier Langlois | 70f3987 | 2013-01-25 00:49:46 -0500 | [diff] [blame] | 1297 | |
Vladimir Serbinenko | e4e8e09 | 2013-03-31 13:51:37 +0200 | [diff] [blame] | 1298 | static const msr_entry_t model20650_global_msrs[] = { |
| 1299 | { 0x0000, "IA32_P5_MC_ADDR" }, |
| 1300 | { 0x0001, "IA32_P5_MC_TYPE" }, |
| 1301 | { 0x0006, "IA32_MONITOR_FILTER_LINE_SIZE" }, |
| 1302 | { 0x0017, "IA32_PLATFORM_ID" }, |
| 1303 | { 0x002a, "MSR_EBC_HARD_POWERON" }, |
| 1304 | // WRITE ONLY { 0x0079, "IA32_BIOS_UPDT_TRIG" }, |
| 1305 | { 0x00ce, "IA32_MSR_PLATFORM_INFO" }, |
| 1306 | { 0x00e2, "IA32_MSR_PMG_CST_CONFIG" }, |
| 1307 | { 0x019c, "IA32_THERM_STATUS" }, |
| 1308 | { 0x019d, "MSR_THERM2_CTL" }, |
| 1309 | { 0x01a0, "IA32_MISC_ENABLE" }, |
| 1310 | { 0x0200, "IA32_MTRR_PHYSBASE0" }, |
| 1311 | { 0x0201, "IA32_MTRR_PHYSMASK0" }, |
| 1312 | { 0x0202, "IA32_MTRR_PHYSBASE1" }, |
| 1313 | { 0x0203, "IA32_MTRR_PHYSMASK1" }, |
| 1314 | { 0x0204, "IA32_MTRR_PHYSBASE2" }, |
| 1315 | { 0x0205, "IA32_MTRR_PHYSMASK2" }, |
| 1316 | { 0x0206, "IA32_MTRR_PHYSBASE3" }, |
| 1317 | { 0x0207, "IA32_MTRR_PHYSMASK3" }, |
| 1318 | { 0x0208, "IA32_MTRR_PHYSBASE4" }, |
| 1319 | { 0x0209, "IA32_MTRR_PHYSMASK4" }, |
| 1320 | { 0x020a, "IA32_MTRR_PHYSBASE5" }, |
| 1321 | { 0x020b, "IA32_MTRR_PHYSMASK5" }, |
| 1322 | { 0x020c, "IA32_MTRR_PHYSBASE6" }, |
| 1323 | { 0x020d, "IA32_MTRR_PHYSMASK6" }, |
| 1324 | { 0x020e, "IA32_MTRR_PHYSBASE7" }, |
| 1325 | { 0x020f, "IA32_MTRR_PHYSMASK7" }, |
| 1326 | { 0x0250, "IA32_MTRR_FIX64K_00000" }, |
| 1327 | { 0x0258, "IA32_MTRR_FIX16K_80000" }, |
| 1328 | { 0x0259, "IA32_MTRR_FIX16K_A0000" }, |
| 1329 | { 0x0268, "IA32_MTRR_FIX4K_C0000" }, |
| 1330 | { 0x0269, "IA32_MTRR_FIX4K_C8000" }, |
| 1331 | { 0x026a, "IA32_MTRR_FIX4K_D0000" }, |
| 1332 | { 0x026b, "IA32_MTRR_FIX4K_D8000" }, |
| 1333 | { 0x026c, "IA32_MTRR_FIX4K_E0000" }, |
| 1334 | { 0x026d, "IA32_MTRR_FIX4K_E8000" }, |
| 1335 | { 0x026e, "IA32_MTRR_FIX4K_F0000" }, |
| 1336 | { 0x026f, "IA32_MTRR_FIX4K_F8000" }, |
| 1337 | { 0x02ff, "IA32_MTRR_DEF_TYPE" }, |
| 1338 | { 0x0300, "MSR_BPU_COUNTER0" }, |
| 1339 | { 0x0301, "MSR_BPU_COUNTER1" }, |
| 1340 | /* Skipped through 0x3ff for now*/ |
| 1341 | |
| 1342 | /* All MCX_ADDR AND MCX_MISC MSRs depend on a bit being |
| 1343 | * set in MCX_STATUS */ |
| 1344 | { 0x400, "IA32_MC0_CTL" }, |
| 1345 | { 0x401, "IA32_MC0_STATUS" }, |
| 1346 | { 0x402, "IA32_MC0_ADDR" }, |
| 1347 | { 0x403, "IA32_MC0_MISC" }, |
| 1348 | { 0x404, "IA32_MC1_CTL" }, |
| 1349 | { 0x405, "IA32_MC1_STATUS" }, |
| 1350 | { 0x406, "IA32_MC1_ADDR" }, |
| 1351 | { 0x407, "IA32_MC1_MISC" }, |
| 1352 | { 0x408, "IA32_MC2_CTL" }, |
| 1353 | { 0x409, "IA32_MC2_STATUS" }, |
| 1354 | { 0x40a, "IA32_MC2_ADDR" }, |
| 1355 | { 0x40c, "IA32_MC3_CTL" }, |
| 1356 | { 0x40d, "IA32_MC3_STATUS" }, |
| 1357 | { 0x40e, "IA32_MC3_ADDR" }, |
| 1358 | { 0x410, "IA32_MC4_CTL" }, |
| 1359 | { 0x411, "IA32_MC4_STATUS" }, |
| 1360 | }; |
| 1361 | |
| 1362 | static const msr_entry_t model20650_per_core_msrs[] = { |
| 1363 | { 0x0010, "IA32_TIME_STAMP_COUNTER" }, |
| 1364 | { 0x001b, "IA32_APIC_BASE" }, |
| 1365 | { 0x003a, "IA32_FEATURE_CONTROL" }, |
| 1366 | { 0x008b, "IA32_BIOS_SIGN_ID" }, |
| 1367 | { 0x009b, "IA32_SMM_MONITOR_CTL" }, |
| 1368 | { 0x00e4, "IA32_PMG_IO_CAPTURE_BASE" }, |
| 1369 | { 0x00fe, "IA32_MTRRCAP" }, |
| 1370 | { 0x0174, "IA32_SYSENTER_CS" }, |
| 1371 | { 0x0175, "IA32_SYSENTER_ESP" }, |
| 1372 | { 0x0176, "IA32_SYSENTER_EIP" }, |
| 1373 | { 0x0179, "IA32_MCG_CAP" }, |
| 1374 | { 0x017a, "IA32_MCG_STATUS" }, |
| 1375 | { 0x0186, "MSR_MCG_RBP" }, |
| 1376 | { 0x0187, "MSR_MCG_RSP" }, |
| 1377 | { 0x0188, "MSR_MCG_RFLAGS" }, |
| 1378 | { 0x0189, "MSR_MCG_RIP" }, |
| 1379 | { 0x0194, "MSR_MCG_R12" }, |
| 1380 | { 0x0198, "IA32_PERF_STATUS" }, |
| 1381 | { 0x0199, "IA32_PERF_CTL" }, |
| 1382 | { 0x019a, "IA32_CLOCK_MODULATION" }, |
| 1383 | { 0x019b, "IA32_THERM_INTERRUPT" }, |
| 1384 | { 0x01a0, "IA32_MISC_ENABLE" }, // Bit 34 is Core Specific |
| 1385 | { 0x01aa, "IA32_MISC_PWR_MGMT" }, |
| 1386 | { 0x01d9, "MSR_DEBUGCTLA" }, |
| 1387 | { 0x01fc, "MSR_POWER_CTL" }, |
| 1388 | { 0x0277, "IA32_PAT" }, |
| 1389 | /** Virtualization |
| 1390 | { 0x480, "IA32_VMX_BASIC" }, |
| 1391 | through |
| 1392 | { 0x48b, "IA32_VMX_PROCBASED_CTLS2" }, |
| 1393 | Not implemented in my CPU |
| 1394 | */ |
| 1395 | { 0x0600, "IA32_DS_AREA" }, |
| 1396 | /* 0x0680 - 0x06cf Branch Records Skipped */ |
| 1397 | |
| 1398 | { 0x3a, "IA32_FEATURE_CONTROL" }, |
| 1399 | { 0x13c, "MSR_FEATURE_CONFIG" }, |
| 1400 | { 0x194, "MSR_FLEX_RATIO" }, |
| 1401 | { 0x1a0, "IA32_MISC_ENABLE" }, |
| 1402 | { 0x1a2, "MSR_TEMPERATURE_TARGET" }, |
| 1403 | { 0x199, "IA32_PERF_CTL" }, |
| 1404 | { 0x19b, "IA32_THERM_INTERRUPT" }, |
| 1405 | { 0x401, "IA32_MC0_STATUS" }, |
| 1406 | { 0x2e, "MSR_PIC_MSG_CONTROL" }, |
| 1407 | { 0xce, "MSR_PLATFORM_INFO" }, |
| 1408 | { 0xe2, "MSR_PMG_CST_CONFIG_CONTROL" }, |
| 1409 | { 0xe4, "MSR_PMG_IO_CAPTURE_BASE" }, |
| 1410 | { 0x1aa, "MSR_MISC_PWR_MGMT" }, |
| 1411 | { 0x1ad, "MSR_TURBO_RATIO_LIMIT" }, |
| 1412 | { 0x1fc, "MSR_POWER_CTL" }, |
| 1413 | }; |
| 1414 | |
Martin Roth | 51dde6f | 2014-12-07 22:11:54 -0700 | [diff] [blame] | 1415 | /* |
| 1416 | * The following two tables are the Silvermont registers listed in Table 35-6 |
Martin Roth | 0cd338e | 2016-07-29 14:07:30 -0600 | [diff] [blame] | 1417 | * Intel® 64 and IA-32 Architectures Software Developer's Manual |
Martin Roth | 51dde6f | 2014-12-07 22:11:54 -0700 | [diff] [blame] | 1418 | * September 2014 |
| 1419 | * Vol. 3C 35-59 |
| 1420 | */ |
| 1421 | static const msr_entry_t silvermont_per_core_msrs[] = { |
| 1422 | /* |
| 1423 | * Per core MSRs in Intel Processors Based on the Silvermont Microarchitecture |
| 1424 | * These are MSRs marked as "core" |
| 1425 | * |
| 1426 | */ |
| 1427 | { 0x0006, "IA32_MONITOR_FILTER_LINE_SIZE" }, |
| 1428 | { 0x0010, "IA32_TIME_STAMP_COUNTER" }, |
| 1429 | { 0x001b, "IA32_APIC_BASE" }, |
| 1430 | { 0x0034, "MSR_SMI_COUNT" }, |
| 1431 | { 0x003a, "IA32_FEATURE_CONTROL" }, |
| 1432 | { 0x0040, "MSR_LASTBRANCH_0_FROM_IP" }, |
| 1433 | { 0x0041, "MSR_LASTBRANCH_1_FROM_IP" }, |
| 1434 | { 0x0042, "MSR_LASTBRANCH_2_FROM_IP" }, |
| 1435 | { 0x0043, "MSR_LASTBRANCH_3_FROM_IP" }, |
| 1436 | { 0x0044, "MSR_LASTBRANCH_4_FROM_IP" }, |
| 1437 | { 0x0045, "MSR_LASTBRANCH_5_FROM_IP" }, |
| 1438 | { 0x0046, "MSR_LASTBRANCH_6_FROM_IP" }, |
| 1439 | { 0x0047, "MSR_LASTBRANCH_7_FROM_IP" }, |
| 1440 | { 0x0060, "MSR_LASTBRANCH_0_TO_IP" }, |
| 1441 | { 0x0061, "MSR_LASTBRANCH_1_TO_IP" }, |
| 1442 | { 0x0062, "MSR_LASTBRANCH_2_TO_IP" }, |
| 1443 | { 0x0063, "MSR_LASTBRANCH_3_TO_IP" }, |
| 1444 | { 0x0064, "MSR_LASTBRANCH_4_TO_IP" }, |
| 1445 | { 0x0065, "MSR_LASTBRANCH_5_TO_IP" }, |
| 1446 | { 0x0066, "MSR_LASTBRANCH_6_TO_IP" }, |
| 1447 | { 0x0067, "MSR_LASTBRANCH_7_TO_IP" }, |
| 1448 | /* Write register |
| 1449 | { 0x0079, "IA32_BIOS_UPDT_TRIG" }, |
| 1450 | */ |
| 1451 | { 0x008b, "IA32_BIOS_SIGN_ID" }, |
| 1452 | { 0x00c1, "IA32_PMC0" }, |
| 1453 | { 0x00c2, "IA32_PMC1" }, |
| 1454 | { 0x00e7, "IA32_MPERF" }, |
| 1455 | { 0x00e8, "IA32_APERF" }, |
| 1456 | { 0x00fe, "IA32_MTRRCAP" }, |
| 1457 | { 0x0174, "IA32_SYSENTER_CS" }, |
| 1458 | { 0x0175, "IA32_SYSENTER_ESP" }, |
| 1459 | { 0x0176, "IA32_SYSENTER_EIP" }, |
| 1460 | { 0x0179, "IA32_MCG_CAP" }, |
| 1461 | { 0x017a, "IA32_MCG_STATUS" }, |
| 1462 | { 0x0186, "IA32_PERF_EVNTSEL0" }, |
| 1463 | { 0x0187, "IA32_PERF_EVNTSEL1" }, |
| 1464 | { 0x0199, "IA32_PERF_CONTROL" }, |
| 1465 | { 0x019a, "IA32_CLOCK_MODULATION" }, |
| 1466 | { 0x019b, "IA32_THERM_INTERRUPT" }, |
| 1467 | { 0x019c, "IA32_THERM_STATUS" }, |
| 1468 | { 0x01a0, "IA32_MISC_ENABLES" }, |
| 1469 | { 0x01b0, "IA32_ENERGY_PERF_BIAS" }, |
| 1470 | { 0x01c9, "MSR_LASTBRANCH_TOS" }, |
| 1471 | { 0x01d9, "IA32_DEBUGCTL" }, |
| 1472 | { 0x01dd, "MSR_LER_FROM_LIP" }, |
| 1473 | { 0x01de, "MSR_LER_TO_LIP" }, |
| 1474 | { 0x01f2, "IA32_SMRR_PHYSBASE" }, |
| 1475 | { 0x01f3, "IA32_SMRR_PHYSMASK" }, |
| 1476 | { 0x0200, "IA32_MTRR_PHYSBASE0" }, |
| 1477 | { 0x0201, "IA32_MTRR_PHYSMASK0" }, |
| 1478 | { 0x0202, "IA32_MTRR_PHYSBASE1" }, |
| 1479 | { 0x0203, "IA32_MTRR_PHYSMASK1" }, |
| 1480 | { 0x0204, "IA32_MTRR_PHYSBASE2" }, |
| 1481 | { 0x0205, "IA32_MTRR_PHYSMASK2" }, |
| 1482 | { 0x0206, "IA32_MTRR_PHYSBASE3" }, |
| 1483 | { 0x0207, "IA32_MTRR_PHYSMASK3" }, |
| 1484 | { 0x0208, "IA32_MTRR_PHYSBASE4" }, |
| 1485 | { 0x0209, "IA32_MTRR_PHYSMASK4" }, |
| 1486 | { 0x020a, "IA32_MTRR_PHYSBASE5" }, |
| 1487 | { 0x020b, "IA32_MTRR_PHYSMASK5" }, |
| 1488 | { 0x020c, "IA32_MTRR_PHYSBASE6" }, |
| 1489 | { 0x020d, "IA32_MTRR_PHYSMASK6" }, |
| 1490 | { 0x020e, "IA32_MTRR_PHYSBASE7" }, |
| 1491 | { 0x020f, "IA32_MTRR_PHYSMASK7" }, |
| 1492 | { 0x0250, "IA32_MTRR_FIX64K_00000" }, |
| 1493 | { 0x0258, "IA32_MTRR_FIX16K_80000" }, |
| 1494 | { 0x0259, "IA32_MTRR_FIX16K_A0000" }, |
| 1495 | { 0x0268, "IA32_MTRR_FIX4K_C0000" }, |
| 1496 | { 0x0269, "IA32_MTRR_FIX4K_C8000" }, |
| 1497 | { 0x026a, "IA32_MTRR_FIX4K_D0000" }, |
| 1498 | { 0x026b, "IA32_MTRR_FIX4K_D8000" }, |
| 1499 | { 0x026c, "IA32_MTRR_FIX4K_E0000" }, |
| 1500 | { 0x026d, "IA32_MTRR_FIX4K_E8000" }, |
| 1501 | { 0x026e, "IA32_MTRR_FIX4K_F0000" }, |
| 1502 | { 0x026f, "IA32_MTRR_FIX4K_F8000" }, |
| 1503 | { 0x0277, "IA32_PAT" }, |
| 1504 | { 0x02FF, "IA32_MTRR_DEF_TYPE" }, |
| 1505 | { 0x0309, "IA32_FIXED_CTR0" }, |
| 1506 | { 0x030a, "IA32_FIXED_CTR1" }, |
| 1507 | { 0x030b, "IA32_FIXED_CTR2" }, |
| 1508 | { 0x0345, "IA32_PERF_CAPABILITIES" }, |
| 1509 | { 0x038d, "IA32_FIXED_CTR_CTRL" }, |
| 1510 | { 0x038e, "IA32_PERF_GLOBAL_STATUS" }, |
| 1511 | { 0x038f, "IA32_PERF_GLOBAL_CTRL" }, |
| 1512 | { 0x0390, "IA32_PERF_GLOBAL_OVF_CTRL" }, |
| 1513 | { 0x03f1, "MSR_PEBS_ENABLE" }, |
| 1514 | { 0x03fd, "MSR_CORE_C6_RESIDENCY" }, |
| 1515 | { 0x40c, "IA32_MC3_CTL" }, |
| 1516 | { 0x40d, "IA32_MC3_STATUS" }, |
| 1517 | { 0x40e, "IA32_MC3_ADDR" }, |
| 1518 | { 0x410, "IA32_MC4_CTL" }, |
| 1519 | { 0x411, "IA32_MC4_STATUS" }, |
| 1520 | { 0x412, "IA32_MC4_ADDR" }, |
| 1521 | { 0x0480, "IA32_VMX_BASIC" }, |
| 1522 | { 0x0481, "IA32_VMX_PINBASED_CTLS" }, |
| 1523 | { 0x0482, "IA32_VMX_PROCBASED_CTLS" }, |
| 1524 | { 0x0483, "IA32_VMX_EXIT_CTLS" }, |
| 1525 | { 0x0484, "IA32_VMX_ENTRY_CTLS" }, |
| 1526 | { 0x0485, "IA32_VMX_MISC" }, |
| 1527 | { 0x0486, "IA32_VMX_CR0_FIXED0" }, |
| 1528 | { 0x0487, "IA32_VMX_CR0_FIXED1" }, |
| 1529 | { 0x0488, "IA32_VMX_CR4_FIXED0" }, |
| 1530 | { 0x0489, "IA32_VMX_CR4_FIXED1" }, |
| 1531 | { 0x048a, "IA32_VMX_VMCS_ENUM" }, |
| 1532 | { 0x048b, "IA32_VMX_PROCBASED_CTLS2" }, |
| 1533 | { 0x048c, "IA32_VMX_EPT_VPID_ENUM" }, |
| 1534 | { 0x048d, "IA32_VMX_TRUE_PINBASED_CTLS" }, |
| 1535 | { 0x048e, "IA32_VMX_TRUE_PROCBASED_CTLS" }, |
| 1536 | { 0x048f, "IA32_VMX_TRUE_EXIT_CTLS" }, |
| 1537 | { 0x0490, "IA32_VMX_TRUE_ENTRY_CTLS" }, |
| 1538 | { 0x0491, "IA32_VMX_FMFUNC" }, |
| 1539 | { 0x04c1, "IA32_A_PMC0" }, |
| 1540 | { 0x04c2, "IA32_A_PMC1" }, |
| 1541 | { 0x0600, "IA32_DS_AREA" }, |
| 1542 | { 0x0660, "MSR_CORE_C1_RESIDENCY" }, |
| 1543 | { 0x06e0, "IA32_TSC_DEADLINE" }, |
| 1544 | }; |
| 1545 | |
| 1546 | static const msr_entry_t silvermont_global_msrs[] = { |
| 1547 | /* |
| 1548 | * Common MSRs in Intel Processors Based on the Silvermont Microarchitecture |
| 1549 | * These are MSRs marked as "shared" or "package" |
| 1550 | */ |
| 1551 | { 0x0000, "IA32_P5_MC_ADDR" }, |
| 1552 | { 0x0001, "IA32_P5_MC_TYPE" }, |
| 1553 | { 0x0017, "IA32_PLATFORM_ID" }, |
| 1554 | { 0x002a, "MSR_EBC_HARD_POWERON" }, |
| 1555 | { 0x00cd, "MSR_FSB_FREQ" }, |
| 1556 | { 0x00e2, "MSR_PKG_CST_CONFIG_CONTROL" }, |
| 1557 | { 0x00e4, "MSR_PMG_IO_CAPTURE_BASE" }, |
| 1558 | { 0x011e, "BBL_CR_CTL3" }, |
| 1559 | { 0x0198, "IA32_PERF_STATUS" }, |
| 1560 | { 0x01A2, "MSR_TEMPERATURE_TARGET" }, |
| 1561 | { 0x01A6, "MSR_OFFCORE_RSP_0" }, |
| 1562 | { 0x01A7, "MSR_OFFCORE_RSP_1" }, |
| 1563 | { 0x01AD, "MSR_TURBO_RATIO_LIMIT" }, |
| 1564 | { 0x03fa, "MSR_PKG_C6_RESIDENCY" }, |
| 1565 | { 0x400, "IA32_MC0_CTL" }, |
| 1566 | { 0x401, "IA32_MC0_STATUS" }, |
| 1567 | { 0x402, "IA32_MC0_ADDR" }, |
| 1568 | { 0x404, "IA32_MC1_CTL" }, |
| 1569 | { 0x405, "IA32_MC1_STATUS" }, |
| 1570 | { 0x408, "IA32_MC2_CTL" }, |
| 1571 | { 0x409, "IA32_MC2_STATUS" }, |
| 1572 | { 0x40a, "IA32_MC2_ADDR" }, |
| 1573 | { 0x414, "MSR_MC5_CTL" }, |
| 1574 | { 0x415, "MSR_MC5_STATUS" }, |
| 1575 | { 0x416, "MSR_MC5_ADDR" }, |
| 1576 | }; |
| 1577 | |
Christian Walter | 9a8c5e7 | 2019-05-06 17:50:57 +0200 | [diff] [blame] | 1578 | /* |
| 1579 | * Intel 64 and IA-32 Architectures Software Developers Manual Conbined Volumes |
| 1580 | * Page 4668 |
| 1581 | * |
| 1582 | * The following two tables are for the Kaby Lake processors |
| 1583 | * 06_9EH. |
| 1584 | * |
| 1585 | */ |
| 1586 | |
| 1587 | static const msr_entry_t model96ex_global_msrs[] = { |
Maxim Polyakov | 3e7ff29 | 2019-10-08 12:29:00 +0300 | [diff] [blame] | 1588 | { 0x0017, "IA32_PLATFORM_ID"}, |
Christian Walter | 9a8c5e7 | 2019-05-06 17:50:57 +0200 | [diff] [blame] | 1589 | { 0x0080, "MSR_TRACE_HUB_STH_ACPIBAR_BASE"}, |
| 1590 | { 0x00CE, "MSR_PLATFORM_INFO"}, |
| 1591 | { 0x0198, "IA32_PERF_STATUS"}, |
| 1592 | { 0x01A2, "MSR_TEMPERATURE_TARGET"}, |
| 1593 | { 0x01AD, "MSR_TURBO_RATIO_LIMIT"}, |
| 1594 | { 0x0284, "IA32_MC4_CTL2"}, |
| 1595 | { 0x02F4, "MSR_UNCORE_PRMRR_PHYS_BASE"}, |
| 1596 | { 0x02F5, "MSR_UNCORE_PRMRR_PHYS_MASK"}, |
| 1597 | { 0x0394, "MSR_UNC_PERF_FIXED_CTRL"}, |
| 1598 | { 0x0395, "MSR_UNC_PERF_FIXED_CTR"}, |
| 1599 | { 0x060A, "MSR_PKGC3_IRTL"}, |
| 1600 | { 0x060B, "MSR_PKGC6_IRTL"}, |
| 1601 | { 0x060D, "MSR_PKG_C2_RESIDENCY"}, |
| 1602 | { 0x0610, "MSR_PKG_POWER_LIMIT"}, |
| 1603 | { 0x0614, "MSR_PKG_POWER_INFO"}, |
| 1604 | { 0x0620, "MSR_RING_RATIO_LIMIT"}, |
| 1605 | { 0x0638, "MSR_PP0_POWER_LIMIT"}, |
| 1606 | { 0x064F, "MSR_CORE_PERF_LIMIT_REASONS"}, |
| 1607 | { 0x0652, "MSR_PKG_HDC_CONFIG"}, |
| 1608 | { 0x065C, "MSR_PLATFORM_POWER_LIMIT"}, |
| 1609 | { 0x06B0, "MSR_GRAPHICS_PERF_LIMIT_REASONS"}, |
| 1610 | { 0x06B1, "MSR_RING_PERF_LIMIT_REASONS"}, |
| 1611 | { 0x0770, "IA32_PM_ENABLE"}, |
| 1612 | { 0x0DB0, "IA32_PKG_HDC_CTL"}, |
| 1613 | { 0x03B0, "MSR_UNC_ARB_PERFCTR0"}, |
| 1614 | { 0x03B1, "MSR_UNC_ARB_PERFCTR1"}, |
| 1615 | { 0x03B2, "MSR_UNC_ARB_PERFEVTSEL0"}, |
| 1616 | { 0x03B3, "MSR_UNC_ARB_PERFEVTSEL1"}, |
| 1617 | { 0x0700, "MSR_UNC_CBO_0_PERFCTR0"}, |
| 1618 | { 0x0701, "MSR_UNC_CBO_0_PERFCTR1"}, |
| 1619 | { 0x0706, "MSR_UNC_CBO_0_PERFEVTSEL0"}, |
| 1620 | { 0x0707, "MSR_UNC_CBO_0_PERFEVTSEL1"}, |
| 1621 | { 0x0710, "MSR_UNC_CBO_1_PERFCTR0"}, |
| 1622 | { 0x0711, "MSR_UNC_CBO_1_PERFCTR1"}, |
| 1623 | { 0x0716, "MSR_UNC_CBO_1_PERFEVTSEL0"}, |
| 1624 | { 0x0717, "MSR_UNC_CBO_1_PERFEVTSEL1"}, |
| 1625 | { 0x0720, "MSR_UNC_CBO_2_PERFCTR0"}, |
| 1626 | { 0x0721, "MSR_UNC_CBO_2_PERFCTR1"}, |
| 1627 | { 0x0726, "MSR_UNC_CBO_2_PERFEVTSEL0"}, |
| 1628 | { 0x0727, "MSR_UNC_CBO_2_PERFEVTSEL1"}, |
| 1629 | { 0x0730, "MSR_UNC_CBO_3_PERFCTR0"}, |
| 1630 | { 0x0731, "MSR_UNC_CBO_3_PERFCTR1"}, |
| 1631 | { 0x0736, "MSR_UNC_CBO_3_PERFEVTSEL0"}, |
| 1632 | { 0x0737, "MSR_UNC_CBO_3_PERFEVTSEL1"}, |
| 1633 | { 0x0E01, "MSR_UNC_PERF_GLOBAL_CTRL"}, |
| 1634 | { 0x0E02, "MSR_UNC_PERF_GLOBAL_STATUS"}, |
| 1635 | }; |
| 1636 | |
| 1637 | static const msr_entry_t model96ex_per_core_msrs[] = { |
| 1638 | /* Per core MSRs for Sandy Bridge and above */ |
| 1639 | { 0x0000, "IA32_P5_MC_ADDR"}, |
| 1640 | { 0x0001, "IA32_P5_MC_TYPE"}, |
| 1641 | { 0x0006, "IA32_MONITOR_FILTER_SIZE"}, |
| 1642 | { 0x0010, "IA32_TIME_STAMP_COUNTER"}, |
| 1643 | { 0x001B, "IA32_APIC_BASE"}, |
| 1644 | { 0x0034, "MSR_SMI_COUNT"}, |
| 1645 | { 0x003A, "IA32_FEATURE_CONTROL"}, |
| 1646 | { 0x008B, "IA32_BIOS_SIGN_ID"}, |
| 1647 | { 0x00C1, "IA32_PMC0" }, |
| 1648 | { 0x00C2, "IA32_PMC1" }, |
| 1649 | { 0x00C3, "IA32_PMC2" }, |
| 1650 | { 0x00C4, "IA32_PMC3" }, |
| 1651 | { 0x00E2, "MSR_PKG_CST_CONFIG_CONTROL" }, |
| 1652 | { 0x00E4, "MSR_PMG_IO_CAPTURE_BASE"}, |
| 1653 | { 0x00E7, "IA32_MPERF"}, |
| 1654 | { 0x00E8, "IA32_APERF"}, |
| 1655 | { 0x00FE, "IA32_MTRRCAP"}, |
| 1656 | { 0x013C, "MSR_FEATURE_CONFIG"}, |
| 1657 | { 0x0174, "IA32_SYSENTER_CS"}, |
| 1658 | { 0x0175, "IA32_SYSENTER_ESP"}, |
| 1659 | { 0x0176, "IA32_SYSENTER_EIP"}, |
| 1660 | { 0x0179, "IA32_MCG_CAP"}, |
| 1661 | { 0x017A, "IA32_MCG_STATUS"}, |
| 1662 | { 0x0186, "IA32_PERFEVTSEL0"}, |
| 1663 | { 0x0187, "IA32_PERFEVTSEL1"}, |
| 1664 | { 0x0188, "IA32_PERFEVTSEL2"}, |
| 1665 | { 0x0189, "IA32_PERFEVTSEL3"}, |
| 1666 | { 0x0199, "IA32_PERF_CTL"}, |
| 1667 | { 0x019A, "IA32_CLOCK_MODULATION"}, |
| 1668 | { 0x019B, "IA32_THERM_INTERRUPT"}, |
| 1669 | { 0x019C, "IA32_THERM_STATUS"}, |
| 1670 | { 0x01A0, "IA32_MISC_ENABLE"}, |
| 1671 | { 0x01A4, "IA32_MISC_FEATURE_CONTROL"}, |
| 1672 | { 0x01A6, "MSR_OFFCORE_RSP_0"}, |
| 1673 | { 0x01A7, "MSR_OFFCORE_RSP_1"}, |
| 1674 | { 0x01C8, "MSR_LBR_SELECT"}, |
| 1675 | { 0x01C9, "MSR_LASTBRANCH_TOS"}, |
| 1676 | { 0x01D9, "IA32_DEBUGCTL"}, |
| 1677 | { 0x01DD, "MSR_LER_FROM_LIP"}, |
| 1678 | { 0x01DE, "MSR_LER_TO_LIP"}, |
| 1679 | { 0x01F2, "IA32_SMRR_PHYSBASE"}, |
| 1680 | { 0x01F3, "IA32_SMRR_PHYSMASK"}, |
| 1681 | { 0x01F4, "MSR_PRMRR_PHYS_BASE"}, |
| 1682 | { 0x01F5, "MSR_PRMRR_PHYS_MASK"}, |
Christian Walter | 9a8c5e7 | 2019-05-06 17:50:57 +0200 | [diff] [blame] | 1683 | { 0x01FB, "MSR_PRMRR_VALID_CONFIG"}, |
| 1684 | { 0x01FC, "MSR_POWER_CTL"}, |
| 1685 | { 0x0200, "IA32_MTRR_PHYSBASE0"}, |
| 1686 | { 0x0201, "IA32_MTRR_PHYSBASE0"}, |
| 1687 | { 0x0202, "IA32_MTRR_PHYSBASE1"}, |
| 1688 | { 0x0203, "IA32_MTRR_PHYSBASE1"}, |
| 1689 | { 0x0204, "IA32_MTRR_PHYSBASE2"}, |
| 1690 | { 0x0205, "IA32_MTRR_PHYSBASE2"}, |
| 1691 | { 0x0206, "IA32_MTRR_PHYSBASE3"}, |
| 1692 | { 0x0207, "IA32_MTRR_PHYSBASE3"}, |
| 1693 | { 0x0208, "IA32_MTRR_PHYSBASE4"}, |
| 1694 | { 0x0209, "IA32_MTRR_PHYSBASE4"}, |
| 1695 | { 0x020A, "IA32_MTRR_PHYSBASE5"}, |
| 1696 | { 0x020B, "IA32_MTRR_PHYSBASE5"}, |
| 1697 | { 0x020C, "IA32_MTRR_PHYSBASE6"}, |
| 1698 | { 0x020D, "IA32_MTRR_PHYSBASE6"}, |
| 1699 | { 0x020E, "IA32_MTRR_PHYSBASE7"}, |
| 1700 | { 0x020F, "IA32_MTRR_PHYSBASE7"}, |
| 1701 | { 0x0210, "IA32_MTRR_PHYSBASE8"}, |
| 1702 | { 0x0211, "IA32_MTRR_PHYSBASE8"}, |
| 1703 | { 0x0212, "IA32_MTRR_PHYSBASE9"}, |
| 1704 | { 0x0213, "IA32_MTRR_PHYSBASE9"}, |
| 1705 | { 0x0250, "IA32_MTRR_FIX64K_00000"}, |
| 1706 | { 0x0258, "IA32_MTRR_FIX16K_80000"}, |
| 1707 | { 0x0259, "IA32_MTRR_FIX16K_A0000"}, |
| 1708 | { 0x0268, "IA32_MTRR_FIX4K_C0000"}, |
| 1709 | { 0x0269, "IA32_MTRR_FIX4K_C8000"}, |
| 1710 | { 0x026A, "IA32_MTRR_FIX4K_D0000"}, |
| 1711 | { 0x026B, "IA32_MTRR_FIX4K_D8000"}, |
| 1712 | { 0x026C, "IA32_MTRR_FIX4K_E0000"}, |
| 1713 | { 0x026D, "IA32_MTRR_FIX4K_E8000"}, |
| 1714 | { 0x026E, "IA32_MTRR_FIX4K_F0000"}, |
| 1715 | { 0x026F, "IA32_MTRR_FIX4K_F8000"}, |
| 1716 | { 0x0277, "IA32_PAT"}, |
| 1717 | { 0x0280, "IA32_MC0_CTL2"}, |
| 1718 | { 0x0281, "IA32_MC1_CTL2"}, |
| 1719 | { 0x0282, "IA32_MC2_CTL2"}, |
| 1720 | { 0x0283, "IA32_MC3_CTL2"}, |
| 1721 | { 0x02FF, "IA32_MTRR_DEF_TYPE"}, |
| 1722 | { 0x0309, "IA32_FIXED_CTR0"}, |
| 1723 | { 0x030A, "IA32_FIXED_CTR1"}, |
| 1724 | { 0x030B, "IA32_FIXED_CTR2"}, |
| 1725 | { 0x0345, "IA32_PERF_CAPABILITIES"}, |
| 1726 | { 0x038D, "IA32_FIXED_CTR_CTRL"}, |
| 1727 | { 0x038E, "IA32_PERF_GLOBAL_STATUS"}, |
| 1728 | { 0x038F, "IA32_PERF_GLOBAL_CTRL"}, |
| 1729 | { 0x0390, "IA32_PERF_GLOBAL_STATUS_RESET"}, |
| 1730 | { 0x0391, "IA32_PERF_GLOBAL_STATUS_SET"}, |
| 1731 | { 0x03F1, "MSR_PEBS_ENABLE"}, |
| 1732 | { 0x03F6, "MSR_PEBS_LD_LAT"}, |
| 1733 | { 0x03F7, "MSR_PEBS_FRONTEND"}, |
| 1734 | { 0x03FC, "MSR_CORE_C3_RESIDENCY"}, |
| 1735 | { 0x03FD, "MSR_CORE_C6_RESIDENCY"}, |
| 1736 | { 0x03FE, "MSR_CORE_C7_RESIDENCY"}, |
| 1737 | { 0x0400, "IA32_MC0_CTL" }, |
| 1738 | { 0x0401, "IA32_MC0_STATUS" }, |
| 1739 | { 0x0402, "IA32_MC0_ADDR" }, |
| 1740 | { 0x0403, "IA32_MC0_MISC" }, |
| 1741 | { 0x0404, "IA32_MC1_CTL" }, |
| 1742 | { 0x0405, "IA32_MC1_STATUS" }, |
| 1743 | { 0x0406, "IA32_MC1_ADDR" }, |
| 1744 | { 0x0407, "IA32_MC1_MISC" }, |
| 1745 | { 0x0408, "IA32_MC2_CTL" }, |
| 1746 | { 0x0409, "IA32_MC2_STATUS" }, |
| 1747 | { 0x040a, "IA32_MC2_ADDR" }, |
| 1748 | { 0x040c, "IA32_MC3_CTL" }, |
| 1749 | { 0x040d, "IA32_MC3_STATUS" }, |
| 1750 | { 0x040e, "IA32_MC3_ADDR" }, |
| 1751 | { 0x0410, "IA32_MC4_CTL" }, |
| 1752 | { 0x0411, "IA32_MC4_STATUS" }, |
| 1753 | { 0x0480, "IA32_VMX_BASIC" }, |
| 1754 | { 0x0481, "IA32_VMX_PINBASED_CTLS" }, |
| 1755 | { 0x0482, "IA32_VMX_PROCBASED_CTLS" }, |
| 1756 | { 0x0483, "IA32_VMX_EXIT_CTLS" }, |
| 1757 | { 0x0484, "IA32_VMX_ENTRY_CTLS" }, |
| 1758 | { 0x0485, "IA32_VMX_MISC" }, |
| 1759 | { 0x0486, "IA32_VMX_CR0_FIXED0" }, |
| 1760 | { 0x0487, "IA32_VMX_CR0_FIXED1" }, |
| 1761 | { 0x0488, "IA32_VMX_CR4_FIXED0" }, |
| 1762 | { 0x0489, "IA32_VMX_CR4_FIXED1" }, |
| 1763 | { 0x048a, "IA32_VMX_VMCS_ENUM" }, |
| 1764 | { 0x048b, "IA32_VMX_PROCBASED_CTLS2" }, |
| 1765 | { 0x048c, "IA32_VMX_EPT_VPID_ENUM" }, |
| 1766 | { 0x048d, "IA32_VMX_TRUE_PINBASED_CTLS" }, |
| 1767 | { 0x048e, "IA32_VMX_TRUE_PROCBASED_CTLS" }, |
| 1768 | { 0x048f, "IA32_VMX_TRUE_EXIT_CTLS" }, |
| 1769 | { 0x0490, "IA32_VMX_TRUE_ENTRY_CTLS" }, |
| 1770 | { 0x04C1, "IA32_A_PMC0"}, |
| 1771 | { 0x04C2, "IA32_A_PMC1"}, |
| 1772 | { 0x04C3, "IA32_A_PMC2"}, |
| 1773 | { 0x04C4, "IA32_A_PMC3"}, |
| 1774 | { 0x0500, "IA32_SGX_SVN_STATUS"}, |
| 1775 | { 0x0560, "IA32_RTIT_OUTPUT_BASE"}, |
| 1776 | { 0x0561, "IA32_RTIT_OUTPUT_MASK_PTRS"}, |
| 1777 | { 0x0570, "IA32_RTIT_CTL"}, |
| 1778 | { 0x0571, "IA32_RTIT_STATUS"}, |
| 1779 | { 0x0572, "IA32_RTIT_CR3_MATCH"}, |
| 1780 | { 0x0580, "IA32_RTIT_ADDR0_A"}, |
| 1781 | { 0x0581, "IA32_RTIT_ADDR0_B"}, |
| 1782 | { 0x0582, "IA32_RTIT_ADDR1_A"}, |
| 1783 | { 0x0583, "IA32_RTIT_ADDR1_B"}, |
| 1784 | { 0x0600, "IA32_DS_AREA" }, |
| 1785 | { 0x064E, "MSR_PPERF"}, |
| 1786 | { 0x0653, "MSR_CORE_HDC_RESIDENCY"}, |
Christian Walter | 9a8c5e7 | 2019-05-06 17:50:57 +0200 | [diff] [blame] | 1787 | { 0x0690, "MSR_LASTBRANCH_16_FROM_IP" }, |
| 1788 | { 0x0691, "MSR_LASTBRANCH_17_FROM_IP" }, |
| 1789 | { 0x0692, "MSR_LASTBRANCH_18_FROM_IP" }, |
| 1790 | { 0x0693, "MSR_LASTBRANCH_19_FROM_IP" }, |
| 1791 | { 0x0694, "MSR_LASTBRANCH_20_FROM_IP" }, |
| 1792 | { 0x0695, "MSR_LASTBRANCH_21_FROM_IP" }, |
| 1793 | { 0x0696, "MSR_LASTBRANCH_22_FROM_IP" }, |
| 1794 | { 0x0697, "MSR_LASTBRANCH_23_FROM_IP" }, |
| 1795 | { 0x0698, "MSR_LASTBRANCH_24_FROM_IP" }, |
| 1796 | { 0x0699, "MSR_LASTBRANCH_25_FROM_IP" }, |
| 1797 | { 0x069A, "MSR_LASTBRANCH_26_FROM_IP" }, |
| 1798 | { 0x069B, "MSR_LASTBRANCH_27_FROM_IP" }, |
| 1799 | { 0x069C, "MSR_LASTBRANCH_28_FROM_IP" }, |
| 1800 | { 0x069D, "MSR_LASTBRANCH_29_FROM_IP" }, |
| 1801 | { 0x069E, "MSR_LASTBRANCH_30_FROM_IP" }, |
| 1802 | { 0x069F, "MSR_LASTBRANCH_31_FROM_IP" }, |
Maxim Polyakov | 9ebf531 | 2019-10-09 11:16:07 +0300 | [diff] [blame] | 1803 | { 0x06d0, "MSR_LASTBRANCH_16_TO_IP" }, |
| 1804 | { 0x06d1, "MSR_LASTBRANCH_17_TO_IP" }, |
| 1805 | { 0x06d2, "MSR_LASTBRANCH_18_TO_IP" }, |
| 1806 | { 0x06d3, "MSR_LASTBRANCH_19_TO_IP" }, |
| 1807 | { 0x06d4, "MSR_LASTBRANCH_20_TO_IP" }, |
| 1808 | { 0x06d5, "MSR_LASTBRANCH_21_TO_IP" }, |
| 1809 | { 0x06d6, "MSR_LASTBRANCH_22_TO_IP" }, |
| 1810 | { 0x06d7, "MSR_LASTBRANCH_23_TO_IP" }, |
| 1811 | { 0x06d8, "MSR_LASTBRANCH_24_TO_IP" }, |
| 1812 | { 0x06d9, "MSR_LASTBRANCH_25_TO_IP" }, |
| 1813 | { 0x06da, "MSR_LASTBRANCH_26_TO_IP" }, |
| 1814 | { 0x06db, "MSR_LASTBRANCH_27_TO_IP" }, |
| 1815 | { 0x06dc, "MSR_LASTBRANCH_28_TO_IP" }, |
| 1816 | { 0x06dd, "MSR_LASTBRANCH_29_TO_IP" }, |
| 1817 | { 0x06de, "MSR_LASTBRANCH_30_TO_IP" }, |
| 1818 | { 0x06df, "MSR_LASTBRANCH_31_TO_IP" }, |
Christian Walter | 9a8c5e7 | 2019-05-06 17:50:57 +0200 | [diff] [blame] | 1819 | { 0x06E0, "IA32_TSC_DEADLINE"}, |
| 1820 | { 0x0771, "IA32_HWP_CAPABILITIES"}, |
| 1821 | { 0x0773, "IA32_HWP_INTERRUPT"}, |
| 1822 | { 0x0774, "IA32_HWP_REQUEST"}, |
| 1823 | { 0x0777, "IA32_HWP_STATUS"}, |
| 1824 | { 0x0D90, "IA32_BNDCFGS"}, |
| 1825 | { 0x0DA0, "IA32_XSS"}, |
| 1826 | { 0x0DB1, "IA32_PM_CTL1"}, |
| 1827 | { 0x0DB2, "IA32_THREAD_STALL"}, |
| 1828 | { 0x0DC0, "IA32_LBR_INFO_0"}, |
| 1829 | { 0x0DC1, "IA32_LBR_INFO_1"}, |
| 1830 | { 0x0DC2, "IA32_LBR_INFO_2"}, |
| 1831 | { 0x0DC3, "IA32_LBR_INFO_3"}, |
| 1832 | { 0x0DC4, "IA32_LBR_INFO_4"}, |
| 1833 | { 0x0DC5, "IA32_LBR_INFO_5"}, |
| 1834 | { 0x0DC6, "IA32_LBR_INFO_6"}, |
| 1835 | { 0x0DC7, "IA32_LBR_INFO_7"}, |
| 1836 | { 0x0DC8, "IA32_LBR_INFO_8"}, |
| 1837 | { 0x0DC9, "IA32_LBR_INFO_9"}, |
| 1838 | { 0x0DCA, "IA32_LBR_INFO_10"}, |
| 1839 | { 0x0DCB, "IA32_LBR_INFO_11"}, |
| 1840 | { 0x0DCC, "IA32_LBR_INFO_12"}, |
| 1841 | { 0x0DCD, "IA32_LBR_INFO_13"}, |
| 1842 | { 0x0DCE, "IA32_LBR_INFO_14"}, |
| 1843 | { 0x0DCF, "IA32_LBR_INFO_15"}, |
| 1844 | { 0x0DD0, "IA32_LBR_INFO_16"}, |
| 1845 | { 0x0DD1, "IA32_LBR_INFO_17"}, |
| 1846 | { 0x0DD2, "IA32_LBR_INFO_18"}, |
| 1847 | { 0x0DD3, "IA32_LBR_INFO_19"}, |
| 1848 | { 0x0DD4, "IA32_LBR_INFO_20"}, |
| 1849 | { 0x0DD5, "IA32_LBR_INFO_21"}, |
| 1850 | { 0x0DD6, "IA32_LBR_INFO_22"}, |
| 1851 | { 0x0DD7, "IA32_LBR_INFO_23"}, |
| 1852 | { 0x0DD8, "IA32_LBR_INFO_24"}, |
| 1853 | { 0x0DD9, "IA32_LBR_INFO_25"}, |
| 1854 | { 0x0DDA, "IA32_LBR_INFO_26"}, |
| 1855 | { 0x0DDB, "IA32_LBR_INFO_27"}, |
| 1856 | { 0x0DDC, "IA32_LBR_INFO_28"}, |
| 1857 | { 0x0DDD, "IA32_LBR_INFO_29"}, |
| 1858 | { 0x0DDE, "IA32_LBR_INFO_30"}, |
| 1859 | { 0x0DDF, "IA32_LBR_INFO_31"}, |
| 1860 | }; |
| 1861 | |
Maxim Polyakov | 9af10bf | 2019-10-08 17:33:59 +0300 | [diff] [blame] | 1862 | /* |
| 1863 | * Intel® 64 and IA-32 Architecture Software Developer’s Manual |
| 1864 | * Volume 4: Model-Specific Registers |
| 1865 | * Order Number: 335592-070US |
| 1866 | * page 2-265 ... 2-286 |
| 1867 | * page 2-297 ... 2-308 |
| 1868 | * |
| 1869 | * The following two tables are for the Intel(R) Xeon(R) Processor Scalable |
| 1870 | * Family based on Skylake microarchitecture, 2nd generation Intel(R) Xeon(R) |
| 1871 | * Processor Scalable Family based on Cascade Lake product, and future Cooper |
| 1872 | * Lake product |
| 1873 | * family 6 model 85 (06_55h) |
| 1874 | */ |
| 1875 | static const msr_entry_t model565x_global_msrs[] = { |
| 1876 | { 0x004e, "MSR_PPIN_CTL" }, |
| 1877 | { 0x004f, "MSR_PPIN" }, |
| 1878 | { 0x00ce, "MSR_PLATFORM_INFO" }, |
| 1879 | { 0x0198, "IA32_PERF_STATUS" }, |
| 1880 | { 0x019c, "IA32_THERM_STATUS" }, |
| 1881 | { 0x01a2, "MSR_TEMPERATURE_TARGET" }, |
| 1882 | { 0x01ad, "MSR_TURBO_RATIO_LIMIT" }, |
| 1883 | { 0x01ae, "MSR_TURBO_RATIO_LIMIT_CORES" }, |
| 1884 | { 0x0284, "IA32_MC4_CTL2" }, |
| 1885 | { 0x0285, "IA32_MC5_CTL2" }, |
| 1886 | { 0x0286, "IA32_MC6_CTL2" }, |
| 1887 | { 0x0287, "IA32_MC7_CTL2" }, |
| 1888 | { 0x0288, "IA32_MC8_CTL2" }, |
| 1889 | { 0x0289, "IA32_MC9_CTL2" }, |
| 1890 | { 0x028a, "IA32_MC10_CTL2" }, |
| 1891 | { 0x028b, "IA32_MC11_CTL2" }, |
| 1892 | { 0x028c, "IA32_MC12_CTL2" }, |
| 1893 | { 0x028d, "IA32_MC13_CTL2" }, |
| 1894 | { 0x028e, "IA32_MC14_CTL2" }, |
| 1895 | { 0x028f, "IA32_MC15_CTL2" }, |
| 1896 | { 0x0290, "IA32_MC16_CTL2" }, |
| 1897 | { 0x0291, "IA32_MC17_CTL2" }, |
| 1898 | { 0x0292, "IA32_MC18_CTL2" }, |
| 1899 | { 0x0293, "IA32_MC19_CTL2" }, |
| 1900 | { 0x0300, "MSR_SGXOWNEREPOCH0" }, |
| 1901 | { 0x0301, "MSR_SGXOWNEREPOCH1" }, |
| 1902 | { 0x0410, "IA32_MC4_CTL" }, |
| 1903 | { 0x0411, "IA32_MC4_STATUS" }, |
| 1904 | { 0x0412, "IA32_MC4_ADDR" }, |
| 1905 | { 0x0413, "IA32_MC4_MISC" }, |
| 1906 | { 0x0414, "IA32_MC5_CTL" }, |
| 1907 | { 0x0415, "IA32_MC5_STATUS" }, |
| 1908 | { 0x0416, "IA32_MC5_ADDR" }, |
| 1909 | { 0x0417, "IA32_MC5_MISC" }, |
| 1910 | { 0x0418, "IA32_MC6_CTL" }, |
| 1911 | { 0x0419, "IA32_MC6_STATUS" }, |
| 1912 | { 0x041a, "IA32_MC6_ADDR" }, |
| 1913 | { 0x041b, "IA32_MC6_MISC" }, |
| 1914 | { 0x041c, "IA32_MC7_CTL" }, |
| 1915 | { 0x041d, "IA32_MC7_STATUS" }, |
| 1916 | { 0x041e, "IA32_MC7_ADDR" }, |
| 1917 | { 0x041f, "IA32_MC7_MISC" }, |
| 1918 | { 0x0420, "IA32_MC8_CTL" }, |
| 1919 | { 0x0421, "IA32_MC8_STATUS" }, |
| 1920 | { 0x0422, "IA32_MC8_ADDR" }, |
| 1921 | { 0x0423, "IA32_MC8_MISC" }, |
| 1922 | { 0x0424, "IA32_MC9_CTL" }, |
| 1923 | { 0x0425, "IA32_MC9_STATUS" }, |
| 1924 | { 0x0426, "IA32_MC9_ADDR" }, |
| 1925 | { 0x0427, "IA32_MC9_MISC" }, |
| 1926 | { 0x0428, "IA32_MC10_CTL" }, |
| 1927 | { 0x0429, "IA32_MC10_STATUS" }, |
| 1928 | { 0x042a, "IA32_MC10_ADDR" }, |
| 1929 | { 0x042b, "IA32_MC10_MISC" }, |
| 1930 | { 0x042c, "IA32_MC11_CTL" }, |
| 1931 | { 0x042d, "IA32_MC11_STATUS" }, |
| 1932 | { 0x042e, "IA32_MC11_ADDR" }, |
| 1933 | { 0x042f, "IA32_MC11_MISC" }, |
| 1934 | { 0x0430, "IA32_MC12_CTL" }, |
| 1935 | { 0x0431, "IA32_MC12_STATUS" }, |
| 1936 | { 0x0432, "IA32_MC12_ADDR" }, |
| 1937 | { 0x0433, "IA32_MC12_MISC" }, |
| 1938 | { 0x0434, "IA32_MC13_CTL" }, |
| 1939 | { 0x0435, "IA32_MC13_STATUS" }, |
| 1940 | { 0x0436, "IA32_MC13_ADDR" }, |
| 1941 | { 0x0437, "IA32_MC13_MISC" }, |
| 1942 | { 0x0438, "IA32_MC14_CTL" }, |
| 1943 | { 0x0439, "IA32_MC14_STATUS" }, |
| 1944 | { 0x043a, "IA32_MC14_ADDR" }, |
| 1945 | { 0x043b, "IA32_MC14_MISC" }, |
| 1946 | { 0x043c, "IA32_MC15_CTL" }, |
| 1947 | { 0x043d, "IA32_MC15_STATUS" }, |
| 1948 | { 0x043e, "IA32_MC15_ADDR" }, |
| 1949 | { 0x043f, "IA32_MC15_MISC" }, |
| 1950 | { 0x0440, "IA32_MC16_CTL" }, |
| 1951 | { 0x0441, "IA32_MC16_STATUS" }, |
| 1952 | { 0x0442, "IA32_MC16_ADDR" }, |
| 1953 | { 0x0443, "IA32_MC16_MISC" }, |
| 1954 | { 0x0444, "IA32_MC17_CTL" }, |
| 1955 | { 0x0445, "IA32_MC17_STATUS" }, |
| 1956 | { 0x0446, "IA32_MC17_ADDR" }, |
| 1957 | { 0x0447, "IA32_MC17_MISC" }, |
| 1958 | { 0x0448, "IA32_MC18_CTL" }, |
| 1959 | { 0x0449, "IA32_MC18_STATUS" }, |
| 1960 | { 0x044a, "IA32_MC18_ADDR" }, |
| 1961 | { 0x044b, "IA32_MC18_MISC" }, |
| 1962 | { 0x044c, "IA32_MC19_CTL" }, |
| 1963 | { 0x044b, "IA32_MC19_STATUS" }, |
| 1964 | { 0x044e, "IA32_MC19_ADDR" }, |
| 1965 | { 0x044f, "IA32_MC19_MISC" }, |
| 1966 | { 0x0606, "MSR_RAPL_POWER_UNIT" }, |
| 1967 | { 0x0618, "MSR_DRAM_POWER_LIMIT" }, |
| 1968 | { 0x0619, "MSR_DRAM_ENERGY_STATUS" }, |
| 1969 | { 0x061b, "MSR_DRAM_PERF_STATUS" }, |
| 1970 | { 0x061c, "MSR_DRAM_POWER_INFO" }, |
| 1971 | { 0x0620, "MSR_UNCORE_RATIO_LIMIT" }, |
| 1972 | { 0x0639, "MSR_PP0_ENERGY_STATUS" }, |
| 1973 | { 0x0638, "MSR_PP0_POWER_LIMIT" }, |
| 1974 | { 0x064d, "MSR_PLATFORM_ENERGY_COUNTER" }, |
| 1975 | { 0x064f, "MSR_CORE_PERF_LIMIT_REASONS" }, |
| 1976 | { 0x0652, "MSR_PKG_HDC_CONFIG" }, |
| 1977 | { 0x0655, "MSR_PKG_HDC_SHALLOW_RESIDENCY" }, |
| 1978 | { 0x0656, "MSR_PKG_HDC_DEEP_RESIDENCY" }, |
| 1979 | { 0x0658, "MSR_WEIGHTED_CORE_C0" }, |
| 1980 | { 0x0659, "MSR_ANY_CORE_C0" }, |
| 1981 | { 0x065a, "MSR_ANY_GFXE_C0" }, |
| 1982 | { 0x065b, "MSR_CORE_GFXE_OVERLAP_C0" }, |
| 1983 | { 0x065c, "MSR_PLATFORM_POWER_LIMIT" }, |
| 1984 | { 0x06b0, "MSR_GRAPHICS_PERF_LIMIT_REASONS" }, |
| 1985 | { 0x06b1, "MSR_RING_PERF_LIMIT_REASONS" }, |
| 1986 | { 0x0770, "IA32_PM_ENABLE" }, |
| 1987 | { 0x0db0, "IA32_PKG_HDC_CTL" }, |
| 1988 | { 0x0c90, "IA32_L3_QOS_MASK_0" }, |
| 1989 | { 0x0c91, "IA32_L3_QOS_MASK_1" }, |
| 1990 | { 0x0c92, "IA32_L3_QOS_MASK_2" }, |
| 1991 | { 0x0c93, "IA32_L3_QOS_MASK_3" }, |
| 1992 | { 0x0c94, "IA32_L3_QOS_MASK_4" }, |
| 1993 | { 0x0c95, "IA32_L3_QOS_MASK_5" }, |
| 1994 | { 0x0c96, "IA32_L3_QOS_MASK_6" }, |
| 1995 | { 0x0c97, "IA32_L3_QOS_MASK_7" }, |
| 1996 | { 0x0c98, "IA32_L3_QOS_MASK_8" }, |
| 1997 | { 0x0c99, "IA32_L3_QOS_MASK_9" }, |
| 1998 | { 0x0c9a, "IA32_L3_QOS_MASK_10" }, |
| 1999 | { 0x0c9b, "IA32_L3_QOS_MASK_11" }, |
| 2000 | { 0x0c9c, "IA32_L3_QOS_MASK_12" }, |
| 2001 | { 0x0c9d, "IA32_L3_QOS_MASK_13" }, |
| 2002 | { 0x0c9e, "IA32_L3_QOS_MASK_14" }, |
| 2003 | { 0x0c9f, "IA32_L3_QOS_MASK_15" }, |
| 2004 | }; |
| 2005 | |
| 2006 | static const msr_entry_t model565x_per_core_msrs[] = { |
| 2007 | { 0x0000, "IA32_P5_MC_ADDR" }, |
| 2008 | { 0x0001, "IA32_P5_MC_TYPE" }, |
| 2009 | { 0x0006, "IA32_MONITOR_FILTER_SIZE" }, |
| 2010 | { 0x0010, "IA32_TIME_STAMP_COUNTER" }, |
| 2011 | { 0x0017, "IA32_PLATFORM_ID" }, |
| 2012 | { 0x001b, "IA32_APIC_BASE" }, |
| 2013 | { 0x0034, "MSR_SMI_COUNT" }, |
| 2014 | { 0x003a, "IA32_FEATURE_CONTROL" }, |
| 2015 | { 0x008b, "IA32_BIOS_SIGN_ID" }, |
| 2016 | { 0x00c1, "IA32_PMC0" }, |
| 2017 | { 0x00c2, "IA32_PMC1" }, |
| 2018 | { 0x00c3, "IA32_PMC2" }, |
| 2019 | { 0x00c4, "IA32_PMC3" }, |
| 2020 | { 0x00e2, "MSR_PKG_CST_CONFIG_CONTROL" }, |
| 2021 | { 0x00e4, "MSR_PMG_IO_CAPTURE_BASE" }, |
| 2022 | { 0x00e7, "IA32_MPERF" }, |
| 2023 | { 0x00e8, "IA32_APERF" }, |
| 2024 | { 0x00fe, "IA32_MTRRCAP" }, |
| 2025 | { 0x013c, "MSR_FEATURE_CONFIG" }, |
| 2026 | { 0x0174, "IA32_SYSENTER_CS" }, |
| 2027 | { 0x0175, "IA32_SYSENTER_ESP" }, |
| 2028 | { 0x0176, "IA32_SYSENTER_EIP" }, |
| 2029 | { 0x0179, "IA32_MCG_CAP" }, |
| 2030 | { 0x017a, "IA32_MCG_STATUS" }, |
| 2031 | { 0x017d, "MSR_SMM_MCA_CAP" }, |
| 2032 | { 0x0186, "IA32_PERFEVTSEL0" }, |
| 2033 | { 0x0187, "IA32_PERFEVTSEL1" }, |
| 2034 | { 0x0188, "IA32_PERFEVTSEL2" }, |
| 2035 | { 0x0189, "IA32_PERFEVTSEL3" }, |
| 2036 | { 0x019b, "IA32_THERM_INTERRUPT" }, |
| 2037 | { 0x0199, "IA32_PERF_CTL" }, |
| 2038 | { 0x019a, "IA32_CLOCK_MODULATION" }, |
| 2039 | { 0x01a0, "IA32_MISC_ENABLE" }, |
| 2040 | { 0x01a4, "IA32_MISC_FEATURE_CONTROL" }, |
| 2041 | { 0x01a6, "MSR_OFFCORE_RSP_0" }, |
| 2042 | { 0x01a7, "MSR_OFFCORE_RSP_1" }, |
| 2043 | { 0x01c8, "MSR_LBR_SELECT" }, |
| 2044 | { 0x01c9, "MSR_LASTBRANCH_TOS" }, |
| 2045 | { 0x01d9, "IA32_DEBUGCTL" }, |
| 2046 | { 0x01dd, "MSR_LER_FROM_LIP" }, |
| 2047 | { 0x01de, "MSR_LER_TO_LIP" }, |
| 2048 | { 0x01f2, "IA32_SMRR_PHYSBASE" }, |
| 2049 | { 0x01f3, "IA32_SMRR_PHYSMASK" }, |
| 2050 | { 0x01fc, "MSR_POWER_CTL" }, |
| 2051 | { 0x0200, "IA32_MTRR_PHYSBASE0" }, |
| 2052 | { 0x0201, "IA32_MTRR_PHYSBASE0" }, |
| 2053 | { 0x0202, "IA32_MTRR_PHYSBASE1" }, |
| 2054 | { 0x0203, "IA32_MTRR_PHYSBASE1" }, |
| 2055 | { 0x0204, "IA32_MTRR_PHYSBASE2" }, |
| 2056 | { 0x0205, "IA32_MTRR_PHYSBASE2" }, |
| 2057 | { 0x0206, "IA32_MTRR_PHYSBASE3" }, |
| 2058 | { 0x0207, "IA32_MTRR_PHYSBASE3" }, |
| 2059 | { 0x0208, "IA32_MTRR_PHYSBASE4" }, |
| 2060 | { 0x0209, "IA32_MTRR_PHYSBASE4" }, |
| 2061 | { 0x020a, "IA32_MTRR_PHYSBASE5" }, |
| 2062 | { 0x020b, "IA32_MTRR_PHYSBASE5" }, |
| 2063 | { 0x020c, "IA32_MTRR_PHYSBASE6" }, |
| 2064 | { 0x020d, "IA32_MTRR_PHYSBASE6" }, |
| 2065 | { 0x020e, "IA32_MTRR_PHYSBASE7" }, |
| 2066 | { 0x020f, "IA32_MTRR_PHYSBASE7" }, |
| 2067 | { 0x0210, "IA32_MTRR_PHYSBASE8" }, |
| 2068 | { 0x0211, "IA32_MTRR_PHYSBASE8" }, |
| 2069 | { 0x0212, "IA32_MTRR_PHYSBASE9" }, |
| 2070 | { 0x0213, "IA32_MTRR_PHYSBASE9" }, |
| 2071 | { 0x0250, "IA32_MTRR_FIX64K_00000" }, |
| 2072 | { 0x0258, "IA32_MTRR_FIX16K_80000" }, |
| 2073 | { 0x0259, "IA32_MTRR_FIX16K_A0000" }, |
| 2074 | { 0x0268, "IA32_MTRR_FIX4K_C0000" }, |
| 2075 | { 0x0269, "IA32_MTRR_FIX4K_C8000" }, |
| 2076 | { 0x026a, "IA32_MTRR_FIX4K_D0000" }, |
| 2077 | { 0x026b, "IA32_MTRR_FIX4K_D8000" }, |
| 2078 | { 0x026c, "IA32_MTRR_FIX4K_E0000" }, |
| 2079 | { 0x026d, "IA32_MTRR_FIX4K_E8000" }, |
| 2080 | { 0x026e, "IA32_MTRR_FIX4K_F0000" }, |
| 2081 | { 0x026f, "IA32_MTRR_FIX4K_F8000" }, |
| 2082 | { 0x0277, "IA32_PAT" }, |
| 2083 | { 0x0280, "IA32_MC0_CTL2" }, |
| 2084 | { 0x0281, "IA32_MC1_CTL2" }, |
| 2085 | { 0x0282, "IA32_MC2_CTL2" }, |
| 2086 | { 0x0283, "IA32_MC3_CTL2" }, |
| 2087 | { 0x02ff, "IA32_MTRR_DEF_TYPE" }, |
| 2088 | { 0x0309, "IA32_FIXED_CTR0" }, |
| 2089 | { 0x030a, "IA32_FIXED_CTR1" }, |
| 2090 | { 0x030b, "IA32_FIXED_CTR2" }, |
| 2091 | { 0x0345, "IA32_PERF_CAPABILITIES" }, |
| 2092 | { 0x038d, "IA32_FIXED_CTR_CTRL" }, |
| 2093 | { 0x038e, "IA32_PERF_GLOBAL_STATUS" }, |
| 2094 | { 0x038f, "IA32_PERF_GLOBAL_CTRL" }, |
| 2095 | { 0x0390, "IA32_PERF_GLOBAL_STATUS_RESET" }, |
| 2096 | { 0x0391, "IA32_PERF_GLOBAL_STATUS_SET" }, |
| 2097 | { 0x0392, "IA32_PERF_GLOBAL_INUSE" }, |
| 2098 | { 0x03f1, "MSR_PEBS_ENABLE" }, |
| 2099 | { 0x03f6, "MSR_PEBS_LD_LAT" }, |
| 2100 | { 0x03f7, "MSR_PEBS_FRONTEND" }, |
| 2101 | { 0x03fc, "MSR_CORE_C3_RESIDENCY" }, |
| 2102 | { 0x03fd, "MSR_CORE_C6_RESIDENCY" }, |
| 2103 | { 0x03fe, "MSR_CORE_C7_RESIDENCY" }, |
| 2104 | { 0x0400, "IA32_MC0_CTL" }, |
| 2105 | { 0x0401, "IA32_MC0_STATUS" }, |
| 2106 | { 0x0402, "IA32_MC0_ADDR" }, |
| 2107 | { 0x0403, "IA32_MC0_MISC" }, |
| 2108 | { 0x0404, "IA32_MC1_CTL" }, |
| 2109 | { 0x0405, "IA32_MC1_STATUS" }, |
| 2110 | { 0x0406, "IA32_MC1_ADDR" }, |
| 2111 | { 0x0407, "IA32_MC1_MISC" }, |
| 2112 | { 0x0408, "IA32_MC2_CTL" }, |
| 2113 | { 0x0409, "IA32_MC2_STATUS" }, |
| 2114 | { 0x040a, "IA32_MC2_ADDR" }, |
| 2115 | { 0x040b, "IA32_MC2_MISC" }, |
| 2116 | { 0x040c, "IA32_MC3_CTL" }, |
| 2117 | { 0x040d, "IA32_MC3_STATUS" }, |
| 2118 | { 0x040e, "IA32_MC3_ADDR" }, |
| 2119 | { 0x040f, "IA32_MC3_MISC" }, |
| 2120 | { 0x0480, "IA32_VMX_BASIC" }, |
| 2121 | { 0x0481, "IA32_VMX_PINBASED_CTLS" }, |
| 2122 | { 0x0482, "IA32_VMX_PROCBASED_CTLS" }, |
| 2123 | { 0x0483, "IA32_VMX_EXIT_CTLS" }, |
| 2124 | { 0x0484, "IA32_VMX_ENTRY_CTLS" }, |
| 2125 | { 0x0485, "IA32_VMX_MISC" }, |
| 2126 | { 0x0486, "IA32_VMX_CR0_FIXED0" }, |
| 2127 | { 0x0487, "IA32_VMX_CR0_FIXED1" }, |
| 2128 | { 0x0488, "IA32_VMX_CR4_FIXED0" }, |
| 2129 | { 0x0489, "IA32_VMX_CR4_FIXED1" }, |
| 2130 | { 0x048a, "IA32_VMX_VMCS_ENUM" }, |
| 2131 | { 0x048b, "IA32_VMX_PROCBASED_CTLS2" }, |
| 2132 | { 0x048c, "IA32_VMX_EPT_VPID_ENUM" }, |
| 2133 | { 0x048d, "IA32_VMX_TRUE_PINBASED_CTLS" }, |
| 2134 | { 0x048e, "IA32_VMX_TRUE_PROCBASED_CTLS" }, |
| 2135 | { 0x048f, "IA32_VMX_TRUE_EXIT_CTLS" }, |
| 2136 | { 0x0490, "IA32_VMX_TRUE_ENTRY_CTLS" }, |
| 2137 | { 0x04c1, "IA32_A_PMC0" }, |
| 2138 | { 0x04c2, "IA32_A_PMC1" }, |
| 2139 | { 0x04c3, "IA32_A_PMC2" }, |
| 2140 | { 0x04c4, "IA32_A_PMC3" }, |
| 2141 | { 0x04c5, "IA32_A_PMC4" }, |
| 2142 | { 0x04c6, "IA32_A_PMC5" }, |
| 2143 | { 0x04c7, "IA32_A_PMC6" }, |
| 2144 | { 0x04c8, "IA32_A_PMC7" }, |
| 2145 | { 0x0500, "IA32_SGX_SVN_STATUS" }, |
| 2146 | { 0x0560, "IA32_RTIT_OUTPUT_BASE" }, |
| 2147 | { 0x0561, "IA32_RTIT_OUTPUT_MASK_PTRS" }, |
| 2148 | { 0x0570, "IA32_RTIT_CTL" }, |
| 2149 | { 0x0571, "IA32_RTIT_STATUS" }, |
| 2150 | { 0x0572, "IA32_RTIT_CR3_MATCH" }, |
| 2151 | { 0x0580, "IA32_RTIT_ADDR0_A" }, |
| 2152 | { 0x0581, "IA32_RTIT_ADDR0_B" }, |
| 2153 | { 0x0582, "IA32_RTIT_ADDR1_A" }, |
| 2154 | { 0x0583, "IA32_RTIT_ADDR1_B" }, |
| 2155 | { 0x0600, "IA32_DS_AREA" }, |
| 2156 | { 0x064e, "MSR_PPERF" }, |
| 2157 | { 0x0653, "MSR_CORE_HDC_RESIDENCY" }, |
| 2158 | { 0x0690, "MSR_LASTBRANCH_16_FROM_IP" }, |
| 2159 | { 0x0691, "MSR_LASTBRANCH_17_FROM_IP" }, |
| 2160 | { 0x0692, "MSR_LASTBRANCH_18_FROM_IP" }, |
| 2161 | { 0x0693, "MSR_LASTBRANCH_19_FROM_IP" }, |
| 2162 | { 0x0694, "MSR_LASTBRANCH_20_FROM_IP" }, |
| 2163 | { 0x0695, "MSR_LASTBRANCH_21_FROM_IP" }, |
| 2164 | { 0x0696, "MSR_LASTBRANCH_22_FROM_IP" }, |
| 2165 | { 0x0697, "MSR_LASTBRANCH_23_FROM_IP" }, |
| 2166 | { 0x0698, "MSR_LASTBRANCH_24_FROM_IP" }, |
| 2167 | { 0x0699, "MSR_LASTBRANCH_25_FROM_IP" }, |
| 2168 | { 0x069a, "MSR_LASTBRANCH_26_FROM_IP" }, |
| 2169 | { 0x069b, "MSR_LASTBRANCH_27_FROM_IP" }, |
| 2170 | { 0x069c, "MSR_LASTBRANCH_28_FROM_IP" }, |
| 2171 | { 0x069d, "MSR_LASTBRANCH_29_FROM_IP" }, |
| 2172 | { 0x069e, "MSR_LASTBRANCH_30_FROM_IP" }, |
| 2173 | { 0x069f, "MSR_LASTBRANCH_31_FROM_IP" }, |
| 2174 | { 0x06d0, "MSR_LASTBRANCH_16_TO_IP" }, |
| 2175 | { 0x06d1, "MSR_LASTBRANCH_17_TO_IP" }, |
| 2176 | { 0x06d2, "MSR_LASTBRANCH_18_TO_IP" }, |
| 2177 | { 0x06d3, "MSR_LASTBRANCH_19_TO_IP" }, |
| 2178 | { 0x06d4, "MSR_LASTBRANCH_20_TO_IP" }, |
| 2179 | { 0x06d5, "MSR_LASTBRANCH_21_TO_IP" }, |
| 2180 | { 0x06d6, "MSR_LASTBRANCH_22_TO_IP" }, |
| 2181 | { 0x06d7, "MSR_LASTBRANCH_23_TO_IP" }, |
| 2182 | { 0x06d8, "MSR_LASTBRANCH_24_TO_IP" }, |
| 2183 | { 0x06d9, "MSR_LASTBRANCH_25_TO_IP" }, |
| 2184 | { 0x06da, "MSR_LASTBRANCH_26_TO_IP" }, |
| 2185 | { 0x06db, "MSR_LASTBRANCH_27_TO_IP" }, |
| 2186 | { 0x06dc, "MSR_LASTBRANCH_28_TO_IP" }, |
| 2187 | { 0x06dd, "MSR_LASTBRANCH_29_TO_IP" }, |
| 2188 | { 0x06de, "MSR_LASTBRANCH_30_TO_IP" }, |
| 2189 | { 0x06df, "MSR_LASTBRANCH_31_TO_IP" }, |
| 2190 | { 0x06e0, "IA32_TSC_DEADLINE" }, |
| 2191 | { 0x0771, "IA32_HWP_CAPABILITIES" }, |
| 2192 | { 0x0773, "IA32_HWP_INTERRUPT" }, |
| 2193 | { 0x0774, "IA32_HWP_REQUEST" }, |
| 2194 | { 0x0777, "IA32_HWP_STATUS" }, |
| 2195 | { 0x0c8d, "IA32_QM_EVTSEL" }, |
| 2196 | { 0x0c8f, "IA32_PQR_ASSOC" }, |
| 2197 | { 0x0d90, "IA32_BNDCFGS" }, |
| 2198 | { 0x0da0, "IA32_XSS" }, |
| 2199 | { 0x0db1, "IA32_PM_CTL1" }, |
| 2200 | { 0x0db2, "IA32_THREAD_STALL" }, |
| 2201 | { 0x0dc0, "MSR_LBR_INFO_0" }, |
| 2202 | { 0x0dc1, "MSR_LBR_INFO_1" }, |
| 2203 | { 0x0dc2, "MSR_LBR_INFO_2" }, |
| 2204 | { 0x0dc3, "MSR_LBR_INFO_3" }, |
| 2205 | { 0x0dc4, "MSR_LBR_INFO_4" }, |
| 2206 | { 0x0dc5, "MSR_LBR_INFO_5" }, |
| 2207 | { 0x0dc6, "MSR_LBR_INFO_6" }, |
| 2208 | { 0x0dc7, "MSR_LBR_INFO_7" }, |
| 2209 | { 0x0dc8, "MSR_LBR_INFO_8" }, |
| 2210 | { 0x0dc9, "MSR_LBR_INFO_9" }, |
| 2211 | { 0x0dca, "MSR_LBR_INFO_10" }, |
| 2212 | { 0x0dcb, "MSR_LBR_INFO_11" }, |
| 2213 | { 0x0dcc, "MSR_LBR_INFO_12" }, |
| 2214 | { 0x0dcd, "MSR_LBR_INFO_13" }, |
| 2215 | { 0x0dce, "MSR_LBR_INFO_14" }, |
| 2216 | { 0x0dcf, "MSR_LBR_INFO_15" }, |
| 2217 | { 0x0dd0, "MSR_LBR_INFO_16" }, |
| 2218 | { 0x0dd1, "MSR_LBR_INFO_17" }, |
| 2219 | { 0x0dd2, "MSR_LBR_INFO_18" }, |
| 2220 | { 0x0dd3, "MSR_LBR_INFO_19" }, |
| 2221 | { 0x0dd4, "MSR_LBR_INFO_20" }, |
| 2222 | { 0x0dd5, "MSR_LBR_INFO_21" }, |
| 2223 | { 0x0dd6, "MSR_LBR_INFO_22" }, |
| 2224 | { 0x0dd7, "MSR_LBR_INFO_23" }, |
| 2225 | { 0x0dd8, "MSR_LBR_INFO_24" }, |
| 2226 | { 0x0dd9, "MSR_LBR_INFO_25" }, |
| 2227 | { 0x0ddA, "MSR_LBR_INFO_26" }, |
| 2228 | { 0x0ddB, "MSR_LBR_INFO_27" }, |
| 2229 | { 0x0ddc, "MSR_LBR_INFO_28" }, |
| 2230 | { 0x0ddd, "MSR_LBR_INFO_29" }, |
| 2231 | { 0x0dde, "MSR_LBR_INFO_30" }, |
| 2232 | { 0x0ddf, "MSR_LBR_INFO_31" }, |
| 2233 | }; |
| 2234 | |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 2235 | typedef struct { |
| 2236 | unsigned int model; |
| 2237 | const msr_entry_t *global_msrs; |
| 2238 | unsigned int num_global_msrs; |
| 2239 | const msr_entry_t *per_core_msrs; |
| 2240 | unsigned int num_per_core_msrs; |
| 2241 | } cpu_t; |
| 2242 | |
| 2243 | cpu_t cpulist[] = { |
Tobias Diedrich | 3645e61 | 2010-11-27 14:44:19 +0000 | [diff] [blame] | 2244 | { 0x00670, model67x_global_msrs, ARRAY_SIZE(model67x_global_msrs), NULL, 0 }, |
Stefan Reinauer | 0484481 | 2010-02-22 11:26:06 +0000 | [diff] [blame] | 2245 | { 0x006b0, model6bx_global_msrs, ARRAY_SIZE(model6bx_global_msrs), NULL, 0 }, |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 2246 | { 0x006e0, model6ex_global_msrs, ARRAY_SIZE(model6ex_global_msrs), model6ex_per_core_msrs, ARRAY_SIZE(model6ex_per_core_msrs) }, |
| 2247 | { 0x006f0, model6fx_global_msrs, ARRAY_SIZE(model6fx_global_msrs), model6fx_per_core_msrs, ARRAY_SIZE(model6fx_per_core_msrs) }, |
Idwer Vollering | 312fc96 | 2010-12-17 22:34:58 +0000 | [diff] [blame] | 2248 | { 0x00f20, modelf2x_global_msrs, ARRAY_SIZE(modelf2x_global_msrs), modelf2x_per_core_msrs, ARRAY_SIZE(modelf2x_per_core_msrs) }, |
Pat Erley | ca3548e | 2010-04-21 06:23:19 +0000 | [diff] [blame] | 2249 | { 0x00f40, modelf4x_global_msrs, ARRAY_SIZE(modelf4x_global_msrs), modelf4x_per_core_msrs, ARRAY_SIZE(modelf4x_per_core_msrs) }, |
Elyes HAOUAS | dfe8d64 | 2018-01-31 21:29:00 +0100 | [diff] [blame] | 2250 | { 0x00f60, modelf6x_global_msrs, ARRAY_SIZE(modelf6x_global_msrs), modelf6x_per_core_msrs, ARRAY_SIZE(modelf6x_per_core_msrs) }, |
Olivier Langlois | 70f3987 | 2013-01-25 00:49:46 -0500 | [diff] [blame] | 2251 | { 0x106c0, model6_atom_global_msrs, ARRAY_SIZE(model6_atom_global_msrs), model6_atom_per_core_msrs, ARRAY_SIZE(model6_atom_per_core_msrs) }, |
Vladimir Serbinenko | e4e8e09 | 2013-03-31 13:51:37 +0200 | [diff] [blame] | 2252 | { 0x20650, model20650_global_msrs, ARRAY_SIZE(model20650_global_msrs), model20650_per_core_msrs, ARRAY_SIZE(model20650_per_core_msrs) }, |
Christian Walter | 9a8c5e7 | 2019-05-06 17:50:57 +0200 | [diff] [blame] | 2253 | { 0x906e0, model96ex_global_msrs, ARRAY_SIZE(model96ex_global_msrs), model96ex_per_core_msrs, ARRAY_SIZE(model96ex_per_core_msrs) }, |
Maxim Polyakov | 9af10bf | 2019-10-08 17:33:59 +0300 | [diff] [blame] | 2254 | { 0x50650, model565x_global_msrs, ARRAY_SIZE(model565x_global_msrs), model565x_per_core_msrs, ARRAY_SIZE(model565x_per_core_msrs) }, |
Martin Roth | 51dde6f | 2014-12-07 22:11:54 -0700 | [diff] [blame] | 2255 | |
| 2256 | { CPUID_BAYTRAIL, silvermont_global_msrs, ARRAY_SIZE(silvermont_global_msrs), silvermont_per_core_msrs, ARRAY_SIZE(silvermont_per_core_msrs) }, /* Baytrail */ |
| 2257 | |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 2258 | }; |
| 2259 | |
| 2260 | cpu_t *cpu = NULL; |
| 2261 | |
Stefan Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame] | 2262 | /* Get CPU family and model, not the stepping |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 2263 | * (TODO: extended family/model) |
| 2264 | */ |
Stefan Reinauer | 74cd5698 | 2010-06-01 10:04:28 +0000 | [diff] [blame] | 2265 | id = cpuid(1) & 0xfffff0; |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 2266 | for (i = 0; i < ARRAY_SIZE(cpulist); i++) { |
| 2267 | if(cpulist[i].model == id) { |
| 2268 | cpu = &cpulist[i]; |
| 2269 | break; |
| 2270 | } |
| 2271 | } |
| 2272 | |
| 2273 | if (!cpu) { |
| 2274 | printf("Error: Dumping MSRs on this CPU (0x%06x) is not (yet) supported.\n", id); |
| 2275 | return -1; |
| 2276 | } |
| 2277 | |
Stefan Reinauer | f7f2f25 | 2009-09-01 09:52:14 +0000 | [diff] [blame] | 2278 | #ifndef __DARWIN__ |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 2279 | fd_msr = open("/dev/cpu/0/msr", O_RDWR); |
| 2280 | if (fd_msr < 0) { |
| 2281 | perror("Error while opening /dev/cpu/0/msr"); |
| 2282 | printf("Did you run 'modprobe msr'?\n"); |
| 2283 | return -1; |
| 2284 | } |
Stefan Reinauer | 1162f25 | 2008-12-04 15:18:20 +0000 | [diff] [blame] | 2285 | #endif |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 2286 | |
| 2287 | printf("\n===================== SHARED MSRs (All Cores) =====================\n"); |
| 2288 | |
| 2289 | for (i = 0; i < cpu->num_global_msrs; i++) { |
| 2290 | msr = rdmsr(cpu->global_msrs[i].number); |
| 2291 | printf(" MSR 0x%08X = 0x%08X:0x%08X (%s)\n", |
| 2292 | cpu->global_msrs[i].number, msr.hi, msr.lo, |
| 2293 | cpu->global_msrs[i].name); |
| 2294 | } |
| 2295 | |
| 2296 | close(fd_msr); |
| 2297 | |
Maxim Polyakov | 9af10bf | 2019-10-08 17:33:59 +0300 | [diff] [blame] | 2298 | for (core = 0; core < core_num; core++) { |
Stefan Reinauer | f7f2f25 | 2009-09-01 09:52:14 +0000 | [diff] [blame] | 2299 | #ifndef __DARWIN__ |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 2300 | char msrfilename[64]; |
| 2301 | memset(msrfilename, 0, 64); |
Paul Menzel | 5f3754e | 2013-04-05 00:12:21 +0200 | [diff] [blame] | 2302 | sprintf(msrfilename, "/dev/cpu/%u/msr", core); |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 2303 | |
| 2304 | fd_msr = open(msrfilename, O_RDWR); |
| 2305 | |
| 2306 | /* If the file is not there, we're probably through. No error, |
| 2307 | * since we successfully opened /dev/cpu/0/msr before. |
| 2308 | */ |
| 2309 | if (fd_msr < 0) |
| 2310 | break; |
Stefan Reinauer | 1162f25 | 2008-12-04 15:18:20 +0000 | [diff] [blame] | 2311 | #endif |
Stefan Reinauer | 0484481 | 2010-02-22 11:26:06 +0000 | [diff] [blame] | 2312 | if (cpu->num_per_core_msrs) |
Paul Menzel | 5f3754e | 2013-04-05 00:12:21 +0200 | [diff] [blame] | 2313 | printf("\n====================== UNIQUE MSRs (core %u) ======================\n", core); |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 2314 | |
| 2315 | for (i = 0; i < cpu->num_per_core_msrs; i++) { |
| 2316 | msr = rdmsr(cpu->per_core_msrs[i].number); |
| 2317 | printf(" MSR 0x%08X = 0x%08X:0x%08X (%s)\n", |
| 2318 | cpu->per_core_msrs[i].number, msr.hi, msr.lo, |
| 2319 | cpu->per_core_msrs[i].name); |
| 2320 | } |
Stefan Reinauer | f7f2f25 | 2009-09-01 09:52:14 +0000 | [diff] [blame] | 2321 | #ifndef __DARWIN__ |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 2322 | close(fd_msr); |
Stefan Reinauer | 1162f25 | 2008-12-04 15:18:20 +0000 | [diff] [blame] | 2323 | #endif |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 2324 | } |
| 2325 | |
Stefan Reinauer | f7f2f25 | 2009-09-01 09:52:14 +0000 | [diff] [blame] | 2326 | #ifndef __DARWIN__ |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 2327 | if (msr_readerror) |
| 2328 | printf("\n(*) Some MSRs could not be read. The marked values are unreliable.\n"); |
Stefan Reinauer | 1162f25 | 2008-12-04 15:18:20 +0000 | [diff] [blame] | 2329 | #endif |
Stefan Reinauer | 2319027 | 2008-08-20 13:41:24 +0000 | [diff] [blame] | 2330 | return 0; |
| 2331 | } |