]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Register/Intel/Msr/Core2Msr.h
UefiCpuPkg|MdePkg: Move Register/ folder to MdePkg/Include/
[mirror_edk2.git] / MdePkg / Include / Register / Intel / Msr / Core2Msr.h
1 /** @file
2 MSR Definitions for the Intel(R) Core(TM) 2 Processor Family.
3
4 Provides defines for Machine Specific Registers(MSR) indexes. Data structures
5 are provided for MSRs that contain one or more bit fields. If the MSR value
6 returned is a single 32-bit or 64-bit value, then a data structure is not
7 provided for that MSR.
8
9 Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.<BR>
10 SPDX-License-Identifier: BSD-2-Clause-Patent
11
12 @par Specification Reference:
13 Intel(R) 64 and IA-32 Architectures Software Developer's Manual, Volume 4,
14 May 2018, Volume 4: Model-Specific-Registers (MSR)
15
16 **/
17
18 #ifndef __CORE2_MSR_H__
19 #define __CORE2_MSR_H__
20
21 #include <Register/Intel/ArchitecturalMsr.h>
22
23 /**
24 Is Intel(R) Core(TM) 2 Processor Family?
25
26 @param DisplayFamily Display Family ID
27 @param DisplayModel Display Model ID
28
29 @retval TRUE Yes, it is.
30 @retval FALSE No, it isn't.
31 **/
32 #define IS_CORE2_PROCESSOR(DisplayFamily, DisplayModel) \
33 (DisplayFamily == 0x06 && \
34 ( \
35 DisplayModel == 0x0F || \
36 DisplayModel == 0x17 \
37 ) \
38 )
39
40 /**
41 Shared. Model Specific Platform ID (R).
42
43 @param ECX MSR_CORE2_PLATFORM_ID (0x00000017)
44 @param EAX Lower 32-bits of MSR value.
45 Described by the type MSR_CORE2_PLATFORM_ID_REGISTER.
46 @param EDX Upper 32-bits of MSR value.
47 Described by the type MSR_CORE2_PLATFORM_ID_REGISTER.
48
49 <b>Example usage</b>
50 @code
51 MSR_CORE2_PLATFORM_ID_REGISTER Msr;
52
53 Msr.Uint64 = AsmReadMsr64 (MSR_CORE2_PLATFORM_ID);
54 @endcode
55 @note MSR_CORE2_PLATFORM_ID is defined as MSR_PLATFORM_ID in SDM.
56 **/
57 #define MSR_CORE2_PLATFORM_ID 0x00000017
58
59 /**
60 MSR information returned for MSR index #MSR_CORE2_PLATFORM_ID
61 **/
62 typedef union {
63 ///
64 /// Individual bit fields
65 ///
66 struct {
67 UINT32 Reserved1:8;
68 ///
69 /// [Bits 12:8] Maximum Qualified Ratio (R) The maximum allowed bus ratio.
70 ///
71 UINT32 MaximumQualifiedRatio:5;
72 UINT32 Reserved2:19;
73 UINT32 Reserved3:18;
74 ///
75 /// [Bits 52:50] See Table 2-2.
76 ///
77 UINT32 PlatformId:3;
78 UINT32 Reserved4:11;
79 } Bits;
80 ///
81 /// All bit fields as a 64-bit value
82 ///
83 UINT64 Uint64;
84 } MSR_CORE2_PLATFORM_ID_REGISTER;
85
86
87 /**
88 Shared. Processor Hard Power-On Configuration (R/W) Enables and disables
89 processor features; (R) indicates current processor configuration.
90
91 @param ECX MSR_CORE2_EBL_CR_POWERON (0x0000002A)
92 @param EAX Lower 32-bits of MSR value.
93 Described by the type MSR_CORE2_EBL_CR_POWERON_REGISTER.
94 @param EDX Upper 32-bits of MSR value.
95 Described by the type MSR_CORE2_EBL_CR_POWERON_REGISTER.
96
97 <b>Example usage</b>
98 @code
99 MSR_CORE2_EBL_CR_POWERON_REGISTER Msr;
100
101 Msr.Uint64 = AsmReadMsr64 (MSR_CORE2_EBL_CR_POWERON);
102 AsmWriteMsr64 (MSR_CORE2_EBL_CR_POWERON, Msr.Uint64);
103 @endcode
104 @note MSR_CORE2_EBL_CR_POWERON is defined as MSR_EBL_CR_POWERON in SDM.
105 **/
106 #define MSR_CORE2_EBL_CR_POWERON 0x0000002A
107
108 /**
109 MSR information returned for MSR index #MSR_CORE2_EBL_CR_POWERON
110 **/
111 typedef union {
112 ///
113 /// Individual bit fields
114 ///
115 struct {
116 UINT32 Reserved1:1;
117 ///
118 /// [Bit 1] Data Error Checking Enable (R/W) 1 = Enabled; 0 = Disabled
119 /// Note: Not all processor implements R/W.
120 ///
121 UINT32 DataErrorCheckingEnable:1;
122 ///
123 /// [Bit 2] Response Error Checking Enable (R/W) 1 = Enabled; 0 = Disabled
124 /// Note: Not all processor implements R/W.
125 ///
126 UINT32 ResponseErrorCheckingEnable:1;
127 ///
128 /// [Bit 3] MCERR# Drive Enable (R/W) 1 = Enabled; 0 = Disabled Note: Not
129 /// all processor implements R/W.
130 ///
131 UINT32 MCERR_DriveEnable:1;
132 ///
133 /// [Bit 4] Address Parity Enable (R/W) 1 = Enabled; 0 = Disabled Note:
134 /// Not all processor implements R/W.
135 ///
136 UINT32 AddressParityEnable:1;
137 UINT32 Reserved2:1;
138 UINT32 Reserved3:1;
139 ///
140 /// [Bit 7] BINIT# Driver Enable (R/W) 1 = Enabled; 0 = Disabled Note: Not
141 /// all processor implements R/W.
142 ///
143 UINT32 BINIT_DriverEnable:1;
144 ///
145 /// [Bit 8] Output Tri-state Enabled (R/O) 1 = Enabled; 0 = Disabled.
146 ///
147 UINT32 OutputTriStateEnable:1;
148 ///
149 /// [Bit 9] Execute BIST (R/O) 1 = Enabled; 0 = Disabled.
150 ///
151 UINT32 ExecuteBIST:1;
152 ///
153 /// [Bit 10] MCERR# Observation Enabled (R/O) 1 = Enabled; 0 = Disabled.
154 ///
155 UINT32 MCERR_ObservationEnabled:1;
156 ///
157 /// [Bit 11] Intel TXT Capable Chipset. (R/O) 1 = Present; 0 = Not Present.
158 ///
159 UINT32 IntelTXTCapableChipset:1;
160 ///
161 /// [Bit 12] BINIT# Observation Enabled (R/O) 1 = Enabled; 0 = Disabled.
162 ///
163 UINT32 BINIT_ObservationEnabled:1;
164 UINT32 Reserved4:1;
165 ///
166 /// [Bit 14] 1 MByte Power on Reset Vector (R/O) 1 = 1 MByte; 0 = 4 GBytes.
167 ///
168 UINT32 ResetVector:1;
169 UINT32 Reserved5:1;
170 ///
171 /// [Bits 17:16] APIC Cluster ID (R/O).
172 ///
173 UINT32 APICClusterID:2;
174 ///
175 /// [Bit 18] N/2 Non-Integer Bus Ratio (R/O) 0 = Integer ratio; 1 =
176 /// Non-integer ratio.
177 ///
178 UINT32 NonIntegerBusRatio:1;
179 UINT32 Reserved6:1;
180 ///
181 /// [Bits 21:20] Symmetric Arbitration ID (R/O).
182 ///
183 UINT32 SymmetricArbitrationID:2;
184 ///
185 /// [Bits 26:22] Integer Bus Frequency Ratio (R/O).
186 ///
187 UINT32 IntegerBusFrequencyRatio:5;
188 UINT32 Reserved7:5;
189 UINT32 Reserved8:32;
190 } Bits;
191 ///
192 /// All bit fields as a 32-bit value
193 ///
194 UINT32 Uint32;
195 ///
196 /// All bit fields as a 64-bit value
197 ///
198 UINT64 Uint64;
199 } MSR_CORE2_EBL_CR_POWERON_REGISTER;
200
201
202 /**
203 Unique. Control Features in Intel 64 Processor (R/W) See Table 2-2.
204
205 @param ECX MSR_CORE2_FEATURE_CONTROL (0x0000003A)
206 @param EAX Lower 32-bits of MSR value.
207 Described by the type MSR_CORE2_FEATURE_CONTROL_REGISTER.
208 @param EDX Upper 32-bits of MSR value.
209 Described by the type MSR_CORE2_FEATURE_CONTROL_REGISTER.
210
211 <b>Example usage</b>
212 @code
213 MSR_CORE2_FEATURE_CONTROL_REGISTER Msr;
214
215 Msr.Uint64 = AsmReadMsr64 (MSR_CORE2_FEATURE_CONTROL);
216 AsmWriteMsr64 (MSR_CORE2_FEATURE_CONTROL, Msr.Uint64);
217 @endcode
218 @note MSR_CORE2_FEATURE_CONTROL is defined as MSR_FEATURE_CONTROL in SDM.
219 **/
220 #define MSR_CORE2_FEATURE_CONTROL 0x0000003A
221
222 /**
223 MSR information returned for MSR index #MSR_CORE2_FEATURE_CONTROL
224 **/
225 typedef union {
226 ///
227 /// Individual bit fields
228 ///
229 struct {
230 UINT32 Reserved1:3;
231 ///
232 /// [Bit 3] Unique. SMRR Enable (R/WL) When this bit is set and the lock
233 /// bit is set makes the SMRR_PHYS_BASE and SMRR_PHYS_MASK registers read
234 /// visible and writeable while in SMM.
235 ///
236 UINT32 SMRREnable:1;
237 UINT32 Reserved2:28;
238 UINT32 Reserved3:32;
239 } Bits;
240 ///
241 /// All bit fields as a 32-bit value
242 ///
243 UINT32 Uint32;
244 ///
245 /// All bit fields as a 64-bit value
246 ///
247 UINT64 Uint64;
248 } MSR_CORE2_FEATURE_CONTROL_REGISTER;
249
250
251 /**
252 Unique. Last Branch Record n From IP (R/W) One of four pairs of last branch
253 record registers on the last branch record stack. The From_IP part of the
254 stack contains pointers to the source instruction. See also: - Last Branch
255 Record Stack TOS at 1C9H - Section 17.5.
256
257 @param ECX MSR_CORE2_LASTBRANCH_n_FROM_IP
258 @param EAX Lower 32-bits of MSR value.
259 @param EDX Upper 32-bits of MSR value.
260
261 <b>Example usage</b>
262 @code
263 UINT64 Msr;
264
265 Msr = AsmReadMsr64 (MSR_CORE2_LASTBRANCH_0_FROM_IP);
266 AsmWriteMsr64 (MSR_CORE2_LASTBRANCH_0_FROM_IP, Msr);
267 @endcode
268 @note MSR_CORE2_LASTBRANCH_0_FROM_IP is defined as MSR_LASTBRANCH_0_FROM_IP in SDM.
269 MSR_CORE2_LASTBRANCH_1_FROM_IP is defined as MSR_LASTBRANCH_1_FROM_IP in SDM.
270 MSR_CORE2_LASTBRANCH_2_FROM_IP is defined as MSR_LASTBRANCH_2_FROM_IP in SDM.
271 MSR_CORE2_LASTBRANCH_3_FROM_IP is defined as MSR_LASTBRANCH_3_FROM_IP in SDM.
272 @{
273 **/
274 #define MSR_CORE2_LASTBRANCH_0_FROM_IP 0x00000040
275 #define MSR_CORE2_LASTBRANCH_1_FROM_IP 0x00000041
276 #define MSR_CORE2_LASTBRANCH_2_FROM_IP 0x00000042
277 #define MSR_CORE2_LASTBRANCH_3_FROM_IP 0x00000043
278 /// @}
279
280
281 /**
282 Unique. Last Branch Record n To IP (R/W) One of four pairs of last branch
283 record registers on the last branch record stack. This To_IP part of the
284 stack contains pointers to the destination instruction.
285
286 @param ECX MSR_CORE2_LASTBRANCH_n_TO_IP
287 @param EAX Lower 32-bits of MSR value.
288 @param EDX Upper 32-bits of MSR value.
289
290 <b>Example usage</b>
291 @code
292 UINT64 Msr;
293
294 Msr = AsmReadMsr64 (MSR_CORE2_LASTBRANCH_0_TO_IP);
295 AsmWriteMsr64 (MSR_CORE2_LASTBRANCH_0_TO_IP, Msr);
296 @endcode
297 @note MSR_CORE2_LASTBRANCH_0_TO_IP is defined as MSR_LASTBRANCH_0_TO_IP in SDM.
298 MSR_CORE2_LASTBRANCH_1_TO_IP is defined as MSR_LASTBRANCH_1_TO_IP in SDM.
299 MSR_CORE2_LASTBRANCH_2_TO_IP is defined as MSR_LASTBRANCH_2_TO_IP in SDM.
300 MSR_CORE2_LASTBRANCH_3_TO_IP is defined as MSR_LASTBRANCH_3_TO_IP in SDM.
301 @{
302 **/
303 #define MSR_CORE2_LASTBRANCH_0_TO_IP 0x00000060
304 #define MSR_CORE2_LASTBRANCH_1_TO_IP 0x00000061
305 #define MSR_CORE2_LASTBRANCH_2_TO_IP 0x00000062
306 #define MSR_CORE2_LASTBRANCH_3_TO_IP 0x00000063
307 /// @}
308
309
310 /**
311 Unique. System Management Mode Base Address register (WO in SMM)
312 Model-specific implementation of SMRR-like interface, read visible and write
313 only in SMM.
314
315 @param ECX MSR_CORE2_SMRR_PHYSBASE (0x000000A0)
316 @param EAX Lower 32-bits of MSR value.
317 Described by the type MSR_CORE2_SMRR_PHYSBASE_REGISTER.
318 @param EDX Upper 32-bits of MSR value.
319 Described by the type MSR_CORE2_SMRR_PHYSBASE_REGISTER.
320
321 <b>Example usage</b>
322 @code
323 MSR_CORE2_SMRR_PHYSBASE_REGISTER Msr;
324
325 Msr.Uint64 = 0;
326 AsmWriteMsr64 (MSR_CORE2_SMRR_PHYSBASE, Msr.Uint64);
327 @endcode
328 @note MSR_CORE2_SMRR_PHYSBASE is defined as MSR_SMRR_PHYSBASE in SDM.
329 **/
330 #define MSR_CORE2_SMRR_PHYSBASE 0x000000A0
331
332 /**
333 MSR information returned for MSR index #MSR_CORE2_SMRR_PHYSBASE
334 **/
335 typedef union {
336 ///
337 /// Individual bit fields
338 ///
339 struct {
340 UINT32 Reserved1:12;
341 ///
342 /// [Bits 31:12] PhysBase. SMRR physical Base Address.
343 ///
344 UINT32 PhysBase:20;
345 UINT32 Reserved2:32;
346 } Bits;
347 ///
348 /// All bit fields as a 32-bit value
349 ///
350 UINT32 Uint32;
351 ///
352 /// All bit fields as a 64-bit value
353 ///
354 UINT64 Uint64;
355 } MSR_CORE2_SMRR_PHYSBASE_REGISTER;
356
357
358 /**
359 Unique. System Management Mode Physical Address Mask register (WO in SMM)
360 Model-specific implementation of SMRR-like interface, read visible and write
361 only in SMM.
362
363 @param ECX MSR_CORE2_SMRR_PHYSMASK (0x000000A1)
364 @param EAX Lower 32-bits of MSR value.
365 Described by the type MSR_CORE2_SMRR_PHYSMASK_REGISTER.
366 @param EDX Upper 32-bits of MSR value.
367 Described by the type MSR_CORE2_SMRR_PHYSMASK_REGISTER.
368
369 <b>Example usage</b>
370 @code
371 MSR_CORE2_SMRR_PHYSMASK_REGISTER Msr;
372
373 Msr.Uint64 = 0;
374 AsmWriteMsr64 (MSR_CORE2_SMRR_PHYSMASK, Msr.Uint64);
375 @endcode
376 @note MSR_CORE2_SMRR_PHYSMASK is defined as MSR_SMRR_PHYSMASK in SDM.
377 **/
378 #define MSR_CORE2_SMRR_PHYSMASK 0x000000A1
379
380 /**
381 MSR information returned for MSR index #MSR_CORE2_SMRR_PHYSMASK
382 **/
383 typedef union {
384 ///
385 /// Individual bit fields
386 ///
387 struct {
388 UINT32 Reserved1:11;
389 ///
390 /// [Bit 11] Valid. Physical address base and range mask are valid.
391 ///
392 UINT32 Valid:1;
393 ///
394 /// [Bits 31:12] PhysMask. SMRR physical address range mask.
395 ///
396 UINT32 PhysMask:20;
397 UINT32 Reserved2:32;
398 } Bits;
399 ///
400 /// All bit fields as a 32-bit value
401 ///
402 UINT32 Uint32;
403 ///
404 /// All bit fields as a 64-bit value
405 ///
406 UINT64 Uint64;
407 } MSR_CORE2_SMRR_PHYSMASK_REGISTER;
408
409
410 /**
411 Shared. Scalable Bus Speed(RO) This field indicates the intended scalable
412 bus clock speed for processors based on Intel Core microarchitecture:.
413
414 @param ECX MSR_CORE2_FSB_FREQ (0x000000CD)
415 @param EAX Lower 32-bits of MSR value.
416 Described by the type MSR_CORE2_FSB_FREQ_REGISTER.
417 @param EDX Upper 32-bits of MSR value.
418 Described by the type MSR_CORE2_FSB_FREQ_REGISTER.
419
420 <b>Example usage</b>
421 @code
422 MSR_CORE2_FSB_FREQ_REGISTER Msr;
423
424 Msr.Uint64 = AsmReadMsr64 (MSR_CORE2_FSB_FREQ);
425 @endcode
426 @note MSR_CORE2_FSB_FREQ is defined as MSR_FSB_FREQ in SDM.
427 **/
428 #define MSR_CORE2_FSB_FREQ 0x000000CD
429
430 /**
431 MSR information returned for MSR index #MSR_CORE2_FSB_FREQ
432 **/
433 typedef union {
434 ///
435 /// Individual bit fields
436 ///
437 struct {
438 ///
439 /// [Bits 2:0] - Scalable Bus Speed
440 /// 101B: 100 MHz (FSB 400)
441 /// 001B: 133 MHz (FSB 533)
442 /// 011B: 167 MHz (FSB 667)
443 /// 010B: 200 MHz (FSB 800)
444 /// 000B: 267 MHz (FSB 1067)
445 /// 100B: 333 MHz (FSB 1333)
446 ///
447 /// 133.33 MHz should be utilized if performing calculation with System
448 /// Bus Speed when encoding is 001B. 166.67 MHz should be utilized if
449 /// performing calculation with System Bus Speed when encoding is 011B.
450 /// 266.67 MHz should be utilized if performing calculation with System
451 /// Bus Speed when encoding is 000B. 333.33 MHz should be utilized if
452 /// performing calculation with System Bus Speed when encoding is 100B.
453 ///
454 UINT32 ScalableBusSpeed:3;
455 UINT32 Reserved1:29;
456 UINT32 Reserved2:32;
457 } Bits;
458 ///
459 /// All bit fields as a 32-bit value
460 ///
461 UINT32 Uint32;
462 ///
463 /// All bit fields as a 64-bit value
464 ///
465 UINT64 Uint64;
466 } MSR_CORE2_FSB_FREQ_REGISTER;
467
468 /**
469 Shared.
470
471 @param ECX MSR_CORE2_PERF_STATUS (0x00000198)
472 @param EAX Lower 32-bits of MSR value.
473 Described by the type MSR_CORE2_PERF_STATUS_REGISTER.
474 @param EDX Upper 32-bits of MSR value.
475 Described by the type MSR_CORE2_PERF_STATUS_REGISTER.
476
477 <b>Example usage</b>
478 @code
479 MSR_CORE2_PERF_STATUS_REGISTER Msr;
480
481 Msr.Uint64 = AsmReadMsr64 (MSR_CORE2_PERF_STATUS);
482 AsmWriteMsr64 (MSR_CORE2_PERF_STATUS, Msr.Uint64);
483 @endcode
484 @note MSR_CORE2_PERF_STATUS is defined as MSR_PERF_STATUS in SDM.
485 **/
486 #define MSR_CORE2_PERF_STATUS 0x00000198
487
488 /**
489 MSR information returned for MSR index #MSR_CORE2_PERF_STATUS
490 **/
491 typedef union {
492 ///
493 /// Individual bit fields
494 ///
495 struct {
496 ///
497 /// [Bits 15:0] Current Performance State Value.
498 ///
499 UINT32 CurrentPerformanceStateValue:16;
500 UINT32 Reserved1:15;
501 ///
502 /// [Bit 31] XE Operation (R/O). If set, XE operation is enabled. Default
503 /// is cleared.
504 ///
505 UINT32 XEOperation:1;
506 UINT32 Reserved2:8;
507 ///
508 /// [Bits 44:40] Maximum Bus Ratio (R/O) Indicates maximum bus ratio
509 /// configured for the processor.
510 ///
511 UINT32 MaximumBusRatio:5;
512 UINT32 Reserved3:1;
513 ///
514 /// [Bit 46] Non-Integer Bus Ratio (R/O) Indicates non-integer bus ratio
515 /// is enabled. Applies processors based on Enhanced Intel Core
516 /// microarchitecture.
517 ///
518 UINT32 NonIntegerBusRatio:1;
519 UINT32 Reserved4:17;
520 } Bits;
521 ///
522 /// All bit fields as a 64-bit value
523 ///
524 UINT64 Uint64;
525 } MSR_CORE2_PERF_STATUS_REGISTER;
526
527
528 /**
529 Unique.
530
531 @param ECX MSR_CORE2_THERM2_CTL (0x0000019D)
532 @param EAX Lower 32-bits of MSR value.
533 Described by the type MSR_CORE2_THERM2_CTL_REGISTER.
534 @param EDX Upper 32-bits of MSR value.
535 Described by the type MSR_CORE2_THERM2_CTL_REGISTER.
536
537 <b>Example usage</b>
538 @code
539 MSR_CORE2_THERM2_CTL_REGISTER Msr;
540
541 Msr.Uint64 = AsmReadMsr64 (MSR_CORE2_THERM2_CTL);
542 AsmWriteMsr64 (MSR_CORE2_THERM2_CTL, Msr.Uint64);
543 @endcode
544 @note MSR_CORE2_THERM2_CTL is defined as MSR_THERM2_CTL in SDM.
545 **/
546 #define MSR_CORE2_THERM2_CTL 0x0000019D
547
548 /**
549 MSR information returned for MSR index #MSR_CORE2_THERM2_CTL
550 **/
551 typedef union {
552 ///
553 /// Individual bit fields
554 ///
555 struct {
556 UINT32 Reserved1:16;
557 ///
558 /// [Bit 16] TM_SELECT (R/W) Mode of automatic thermal monitor: 1. =
559 /// Thermal Monitor 1 (thermally-initiated on-die modulation of the
560 /// stop-clock duty cycle) 2. = Thermal Monitor 2 (thermally-initiated
561 /// frequency transitions) If bit 3 of the IA32_MISC_ENABLE register is
562 /// cleared, TM_SELECT has no effect. Neither TM1 nor TM2 are enabled.
563 ///
564 UINT32 TM_SELECT:1;
565 UINT32 Reserved2:15;
566 UINT32 Reserved3:32;
567 } Bits;
568 ///
569 /// All bit fields as a 32-bit value
570 ///
571 UINT32 Uint32;
572 ///
573 /// All bit fields as a 64-bit value
574 ///
575 UINT64 Uint64;
576 } MSR_CORE2_THERM2_CTL_REGISTER;
577
578
579 /**
580 Enable Misc. Processor Features (R/W) Allows a variety of processor
581 functions to be enabled and disabled.
582
583 @param ECX MSR_CORE2_IA32_MISC_ENABLE (0x000001A0)
584 @param EAX Lower 32-bits of MSR value.
585 Described by the type MSR_CORE2_IA32_MISC_ENABLE_REGISTER.
586 @param EDX Upper 32-bits of MSR value.
587 Described by the type MSR_CORE2_IA32_MISC_ENABLE_REGISTER.
588
589 <b>Example usage</b>
590 @code
591 MSR_CORE2_IA32_MISC_ENABLE_REGISTER Msr;
592
593 Msr.Uint64 = AsmReadMsr64 (MSR_CORE2_IA32_MISC_ENABLE);
594 AsmWriteMsr64 (MSR_CORE2_IA32_MISC_ENABLE, Msr.Uint64);
595 @endcode
596 @note MSR_CORE2_IA32_MISC_ENABLE is defined as IA32_MISC_ENABLE in SDM.
597 **/
598 #define MSR_CORE2_IA32_MISC_ENABLE 0x000001A0
599
600 /**
601 MSR information returned for MSR index #MSR_CORE2_IA32_MISC_ENABLE
602 **/
603 typedef union {
604 ///
605 /// Individual bit fields
606 ///
607 struct {
608 ///
609 /// [Bit 0] Fast-Strings Enable See Table 2-2.
610 ///
611 UINT32 FastStrings:1;
612 UINT32 Reserved1:2;
613 ///
614 /// [Bit 3] Unique. Automatic Thermal Control Circuit Enable (R/W) See
615 /// Table 2-2.
616 ///
617 UINT32 AutomaticThermalControlCircuit:1;
618 UINT32 Reserved2:3;
619 ///
620 /// [Bit 7] Shared. Performance Monitoring Available (R) See Table 2-2.
621 ///
622 UINT32 PerformanceMonitoring:1;
623 UINT32 Reserved3:1;
624 ///
625 /// [Bit 9] Hardware Prefetcher Disable (R/W) When set, disables the
626 /// hardware prefetcher operation on streams of data. When clear
627 /// (default), enables the prefetch queue. Disabling of the hardware
628 /// prefetcher may impact processor performance.
629 ///
630 UINT32 HardwarePrefetcherDisable:1;
631 ///
632 /// [Bit 10] Shared. FERR# Multiplexing Enable (R/W) 1 = FERR# asserted by
633 /// the processor to indicate a pending break event within the processor 0
634 /// = Indicates compatible FERR# signaling behavior This bit must be set
635 /// to 1 to support XAPIC interrupt model usage.
636 ///
637 UINT32 FERR:1;
638 ///
639 /// [Bit 11] Shared. Branch Trace Storage Unavailable (RO) See Table 2-2.
640 ///
641 UINT32 BTS:1;
642 ///
643 /// [Bit 12] Shared. Processor Event Based Sampling Unavailable (RO) See
644 /// Table 2-2.
645 ///
646 UINT32 PEBS:1;
647 ///
648 /// [Bit 13] Shared. TM2 Enable (R/W) When this bit is set (1) and the
649 /// thermal sensor indicates that the die temperature is at the
650 /// pre-determined threshold, the Thermal Monitor 2 mechanism is engaged.
651 /// TM2 will reduce the bus to core ratio and voltage according to the
652 /// value last written to MSR_THERM2_CTL bits 15:0.
653 /// When this bit is clear (0, default), the processor does not change
654 /// the VID signals or the bus to core ratio when the processor enters a
655 /// thermally managed state. The BIOS must enable this feature if the
656 /// TM2 feature flag (CPUID.1:ECX[8]) is set; if the TM2 feature flag is
657 /// not set, this feature is not supported and BIOS must not alter the
658 /// contents of the TM2 bit location. The processor is operating out of
659 /// specification if both this bit and the TM1 bit are set to 0.
660 ///
661 UINT32 TM2:1;
662 UINT32 Reserved4:2;
663 ///
664 /// [Bit 16] Shared. Enhanced Intel SpeedStep Technology Enable (R/W) See
665 /// Table 2-2.
666 ///
667 UINT32 EIST:1;
668 UINT32 Reserved5:1;
669 ///
670 /// [Bit 18] Shared. ENABLE MONITOR FSM (R/W) See Table 2-2.
671 ///
672 UINT32 MONITOR:1;
673 ///
674 /// [Bit 19] Shared. Adjacent Cache Line Prefetch Disable (R/W) When set
675 /// to 1, the processor fetches the cache line that contains data
676 /// currently required by the processor. When set to 0, the processor
677 /// fetches cache lines that comprise a cache line pair (128 bytes).
678 /// Single processor platforms should not set this bit. Server platforms
679 /// should set or clear this bit based on platform performance observed in
680 /// validation and testing. BIOS may contain a setup option that controls
681 /// the setting of this bit.
682 ///
683 UINT32 AdjacentCacheLinePrefetchDisable:1;
684 ///
685 /// [Bit 20] Shared. Enhanced Intel SpeedStep Technology Select Lock
686 /// (R/WO) When set, this bit causes the following bits to become
687 /// read-only: - Enhanced Intel SpeedStep Technology Select Lock (this
688 /// bit), - Enhanced Intel SpeedStep Technology Enable bit. The bit must
689 /// be set before an Enhanced Intel SpeedStep Technology transition is
690 /// requested. This bit is cleared on reset.
691 ///
692 UINT32 EISTLock:1;
693 UINT32 Reserved6:1;
694 ///
695 /// [Bit 22] Shared. Limit CPUID Maxval (R/W) See Table 2-2.
696 ///
697 UINT32 LimitCpuidMaxval:1;
698 ///
699 /// [Bit 23] Shared. xTPR Message Disable (R/W) See Table 2-2.
700 ///
701 UINT32 xTPR_Message_Disable:1;
702 UINT32 Reserved7:8;
703 UINT32 Reserved8:2;
704 ///
705 /// [Bit 34] Unique. XD Bit Disable (R/W) See Table 2-2.
706 ///
707 UINT32 XD:1;
708 UINT32 Reserved9:2;
709 ///
710 /// [Bit 37] Unique. DCU Prefetcher Disable (R/W) When set to 1, The DCU
711 /// L1 data cache prefetcher is disabled. The default value after reset is
712 /// 0. BIOS may write '1' to disable this feature. The DCU prefetcher is
713 /// an L1 data cache prefetcher. When the DCU prefetcher detects multiple
714 /// loads from the same line done within a time limit, the DCU prefetcher
715 /// assumes the next line will be required. The next line is prefetched in
716 /// to the L1 data cache from memory or L2.
717 ///
718 UINT32 DCUPrefetcherDisable:1;
719 ///
720 /// [Bit 38] Shared. IDA Disable (R/W) When set to 1 on processors that
721 /// support IDA, the Intel Dynamic Acceleration feature (IDA) is disabled
722 /// and the IDA_Enable feature flag will be clear (CPUID.06H: EAX[1]=0).
723 /// When set to a 0 on processors that support IDA, CPUID.06H: EAX[1]
724 /// reports the processor's support of IDA is enabled. Note: the power-on
725 /// default value is used by BIOS to detect hardware support of IDA. If
726 /// power-on default value is 1, IDA is available in the processor. If
727 /// power-on default value is 0, IDA is not available.
728 ///
729 UINT32 IDADisable:1;
730 ///
731 /// [Bit 39] Unique. IP Prefetcher Disable (R/W) When set to 1, The IP
732 /// prefetcher is disabled. The default value after reset is 0. BIOS may
733 /// write '1' to disable this feature. The IP prefetcher is an L1 data
734 /// cache prefetcher. The IP prefetcher looks for sequential load history
735 /// to determine whether to prefetch the next expected data into the L1
736 /// cache from memory or L2.
737 ///
738 UINT32 IPPrefetcherDisable:1;
739 UINT32 Reserved10:24;
740 } Bits;
741 ///
742 /// All bit fields as a 64-bit value
743 ///
744 UINT64 Uint64;
745 } MSR_CORE2_IA32_MISC_ENABLE_REGISTER;
746
747
748 /**
749 Unique. Last Branch Record Stack TOS (R/W) Contains an index (bits 0-3)
750 that points to the MSR containing the most recent branch record. See
751 MSR_LASTBRANCH_0_FROM_IP (at 40H).
752
753 @param ECX MSR_CORE2_LASTBRANCH_TOS (0x000001C9)
754 @param EAX Lower 32-bits of MSR value.
755 @param EDX Upper 32-bits of MSR value.
756
757 <b>Example usage</b>
758 @code
759 UINT64 Msr;
760
761 Msr = AsmReadMsr64 (MSR_CORE2_LASTBRANCH_TOS);
762 AsmWriteMsr64 (MSR_CORE2_LASTBRANCH_TOS, Msr);
763 @endcode
764 @note MSR_CORE2_LASTBRANCH_TOS is defined as MSR_LASTBRANCH_TOS in SDM.
765 **/
766 #define MSR_CORE2_LASTBRANCH_TOS 0x000001C9
767
768
769 /**
770 Unique. Last Exception Record From Linear IP (R) Contains a pointer to the
771 last branch instruction that the processor executed prior to the last
772 exception that was generated or the last interrupt that was handled.
773
774 @param ECX MSR_CORE2_LER_FROM_LIP (0x000001DD)
775 @param EAX Lower 32-bits of MSR value.
776 @param EDX Upper 32-bits of MSR value.
777
778 <b>Example usage</b>
779 @code
780 UINT64 Msr;
781
782 Msr = AsmReadMsr64 (MSR_CORE2_LER_FROM_LIP);
783 @endcode
784 @note MSR_CORE2_LER_FROM_LIP is defined as MSR_LER_FROM_LIP in SDM.
785 **/
786 #define MSR_CORE2_LER_FROM_LIP 0x000001DD
787
788
789 /**
790 Unique. Last Exception Record To Linear IP (R) This area contains a pointer
791 to the target of the last branch instruction that the processor executed
792 prior to the last exception that was generated or the last interrupt that
793 was handled.
794
795 @param ECX MSR_CORE2_LER_TO_LIP (0x000001DE)
796 @param EAX Lower 32-bits of MSR value.
797 @param EDX Upper 32-bits of MSR value.
798
799 <b>Example usage</b>
800 @code
801 UINT64 Msr;
802
803 Msr = AsmReadMsr64 (MSR_CORE2_LER_TO_LIP);
804 @endcode
805 @note MSR_CORE2_LER_TO_LIP is defined as MSR_LER_TO_LIP in SDM.
806 **/
807 #define MSR_CORE2_LER_TO_LIP 0x000001DE
808
809
810 /**
811 Unique. Fixed-Function Performance Counter Register n (R/W).
812
813 @param ECX MSR_CORE2_PERF_FIXED_CTRn
814 @param EAX Lower 32-bits of MSR value.
815 @param EDX Upper 32-bits of MSR value.
816
817 <b>Example usage</b>
818 @code
819 UINT64 Msr;
820
821 Msr = AsmReadMsr64 (MSR_CORE2_PERF_FIXED_CTR0);
822 AsmWriteMsr64 (MSR_CORE2_PERF_FIXED_CTR0, Msr);
823 @endcode
824 @note MSR_CORE2_PERF_FIXED_CTR0 is defined as MSR_PERF_FIXED_CTR0 in SDM.
825 MSR_CORE2_PERF_FIXED_CTR1 is defined as MSR_PERF_FIXED_CTR1 in SDM.
826 MSR_CORE2_PERF_FIXED_CTR2 is defined as MSR_PERF_FIXED_CTR2 in SDM.
827 @{
828 **/
829 #define MSR_CORE2_PERF_FIXED_CTR0 0x00000309
830 #define MSR_CORE2_PERF_FIXED_CTR1 0x0000030A
831 #define MSR_CORE2_PERF_FIXED_CTR2 0x0000030B
832 /// @}
833
834
835 /**
836 Unique. RO. This applies to processors that do not support architectural
837 perfmon version 2.
838
839 @param ECX MSR_CORE2_PERF_CAPABILITIES (0x00000345)
840 @param EAX Lower 32-bits of MSR value.
841 Described by the type MSR_CORE2_PERF_CAPABILITIES_REGISTER.
842 @param EDX Upper 32-bits of MSR value.
843 Described by the type MSR_CORE2_PERF_CAPABILITIES_REGISTER.
844
845 <b>Example usage</b>
846 @code
847 MSR_CORE2_PERF_CAPABILITIES_REGISTER Msr;
848
849 Msr.Uint64 = AsmReadMsr64 (MSR_CORE2_PERF_CAPABILITIES);
850 AsmWriteMsr64 (MSR_CORE2_PERF_CAPABILITIES, Msr.Uint64);
851 @endcode
852 @note MSR_CORE2_PERF_CAPABILITIES is defined as MSR_PERF_CAPABILITIES in SDM.
853 **/
854 #define MSR_CORE2_PERF_CAPABILITIES 0x00000345
855
856 /**
857 MSR information returned for MSR index #MSR_CORE2_PERF_CAPABILITIES
858 **/
859 typedef union {
860 ///
861 /// Individual bit fields
862 ///
863 struct {
864 ///
865 /// [Bits 5:0] LBR Format. See Table 2-2.
866 ///
867 UINT32 LBR_FMT:6;
868 ///
869 /// [Bit 6] PEBS Record Format.
870 ///
871 UINT32 PEBS_FMT:1;
872 ///
873 /// [Bit 7] PEBSSaveArchRegs. See Table 2-2.
874 ///
875 UINT32 PEBS_ARCH_REG:1;
876 UINT32 Reserved1:24;
877 UINT32 Reserved2:32;
878 } Bits;
879 ///
880 /// All bit fields as a 32-bit value
881 ///
882 UINT32 Uint32;
883 ///
884 /// All bit fields as a 64-bit value
885 ///
886 UINT64 Uint64;
887 } MSR_CORE2_PERF_CAPABILITIES_REGISTER;
888
889
890 /**
891 Unique. Fixed-Function-Counter Control Register (R/W).
892
893 @param ECX MSR_CORE2_PERF_FIXED_CTR_CTRL (0x0000038D)
894 @param EAX Lower 32-bits of MSR value.
895 @param EDX Upper 32-bits of MSR value.
896
897 <b>Example usage</b>
898 @code
899 UINT64 Msr;
900
901 Msr = AsmReadMsr64 (MSR_CORE2_PERF_FIXED_CTR_CTRL);
902 AsmWriteMsr64 (MSR_CORE2_PERF_FIXED_CTR_CTRL, Msr);
903 @endcode
904 @note MSR_CORE2_PERF_FIXED_CTR_CTRL is defined as MSR_PERF_FIXED_CTR_CTRL in SDM.
905 **/
906 #define MSR_CORE2_PERF_FIXED_CTR_CTRL 0x0000038D
907
908
909 /**
910 Unique. See Section 18.6.2.2, "Global Counter Control Facilities.".
911
912 @param ECX MSR_CORE2_PERF_GLOBAL_STATUS (0x0000038E)
913 @param EAX Lower 32-bits of MSR value.
914 @param EDX Upper 32-bits of MSR value.
915
916 <b>Example usage</b>
917 @code
918 UINT64 Msr;
919
920 Msr = AsmReadMsr64 (MSR_CORE2_PERF_GLOBAL_STATUS);
921 AsmWriteMsr64 (MSR_CORE2_PERF_GLOBAL_STATUS, Msr);
922 @endcode
923 @note MSR_CORE2_PERF_GLOBAL_STATUS is defined as MSR_PERF_GLOBAL_STATUS in SDM.
924 **/
925 #define MSR_CORE2_PERF_GLOBAL_STATUS 0x0000038E
926
927
928 /**
929 Unique. See Section 18.6.2.2, "Global Counter Control Facilities.".
930
931 @param ECX MSR_CORE2_PERF_GLOBAL_CTRL (0x0000038F)
932 @param EAX Lower 32-bits of MSR value.
933 @param EDX Upper 32-bits of MSR value.
934
935 <b>Example usage</b>
936 @code
937 UINT64 Msr;
938
939 Msr = AsmReadMsr64 (MSR_CORE2_PERF_GLOBAL_CTRL);
940 AsmWriteMsr64 (MSR_CORE2_PERF_GLOBAL_CTRL, Msr);
941 @endcode
942 @note MSR_CORE2_PERF_GLOBAL_CTRL is defined as MSR_PERF_GLOBAL_CTRL in SDM.
943 **/
944 #define MSR_CORE2_PERF_GLOBAL_CTRL 0x0000038F
945
946
947 /**
948 Unique. See Section 18.6.2.2, "Global Counter Control Facilities.".
949
950 @param ECX MSR_CORE2_PERF_GLOBAL_OVF_CTRL (0x00000390)
951 @param EAX Lower 32-bits of MSR value.
952 @param EDX Upper 32-bits of MSR value.
953
954 <b>Example usage</b>
955 @code
956 UINT64 Msr;
957
958 Msr = AsmReadMsr64 (MSR_CORE2_PERF_GLOBAL_OVF_CTRL);
959 AsmWriteMsr64 (MSR_CORE2_PERF_GLOBAL_OVF_CTRL, Msr);
960 @endcode
961 @note MSR_CORE2_PERF_GLOBAL_OVF_CTRL is defined as MSR_PERF_GLOBAL_OVF_CTRL in SDM.
962 **/
963 #define MSR_CORE2_PERF_GLOBAL_OVF_CTRL 0x00000390
964
965
966 /**
967 Unique. See Table 2-2. See Section 18.6.2.4, "Processor Event Based Sampling
968 (PEBS).".
969
970 @param ECX MSR_CORE2_PEBS_ENABLE (0x000003F1)
971 @param EAX Lower 32-bits of MSR value.
972 Described by the type MSR_CORE2_PEBS_ENABLE_REGISTER.
973 @param EDX Upper 32-bits of MSR value.
974 Described by the type MSR_CORE2_PEBS_ENABLE_REGISTER.
975
976 <b>Example usage</b>
977 @code
978 MSR_CORE2_PEBS_ENABLE_REGISTER Msr;
979
980 Msr.Uint64 = AsmReadMsr64 (MSR_CORE2_PEBS_ENABLE);
981 AsmWriteMsr64 (MSR_CORE2_PEBS_ENABLE, Msr.Uint64);
982 @endcode
983 @note MSR_CORE2_PEBS_ENABLE is defined as MSR_PEBS_ENABLE in SDM.
984 **/
985 #define MSR_CORE2_PEBS_ENABLE 0x000003F1
986
987 /**
988 MSR information returned for MSR index #MSR_CORE2_PEBS_ENABLE
989 **/
990 typedef union {
991 ///
992 /// Individual bit fields
993 ///
994 struct {
995 ///
996 /// [Bit 0] Enable PEBS on IA32_PMC0. (R/W).
997 ///
998 UINT32 Enable:1;
999 UINT32 Reserved1:31;
1000 UINT32 Reserved2:32;
1001 } Bits;
1002 ///
1003 /// All bit fields as a 32-bit value
1004 ///
1005 UINT32 Uint32;
1006 ///
1007 /// All bit fields as a 64-bit value
1008 ///
1009 UINT64 Uint64;
1010 } MSR_CORE2_PEBS_ENABLE_REGISTER;
1011
1012
1013 /**
1014 Unique. GBUSQ Event Control/Counter Register (R/W) Apply to Intel Xeon
1015 processor 7400 series (processor signature 06_1D) only. See Section 17.2.2.
1016
1017 @param ECX MSR_CORE2_EMON_L3_CTR_CTLn
1018 @param EAX Lower 32-bits of MSR value.
1019 @param EDX Upper 32-bits of MSR value.
1020
1021 <b>Example usage</b>
1022 @code
1023 UINT64 Msr;
1024
1025 Msr = AsmReadMsr64 (MSR_CORE2_EMON_L3_CTR_CTL0);
1026 AsmWriteMsr64 (MSR_CORE2_EMON_L3_CTR_CTL0, Msr);
1027 @endcode
1028 @note MSR_CORE2_EMON_L3_CTR_CTL0 is defined as MSR_EMON_L3_CTR_CTL0 in SDM.
1029 MSR_CORE2_EMON_L3_CTR_CTL1 is defined as MSR_EMON_L3_CTR_CTL1 in SDM.
1030 MSR_CORE2_EMON_L3_CTR_CTL2 is defined as MSR_EMON_L3_CTR_CTL2 in SDM.
1031 MSR_CORE2_EMON_L3_CTR_CTL3 is defined as MSR_EMON_L3_CTR_CTL3 in SDM.
1032 MSR_CORE2_EMON_L3_CTR_CTL4 is defined as MSR_EMON_L3_CTR_CTL4 in SDM.
1033 MSR_CORE2_EMON_L3_CTR_CTL5 is defined as MSR_EMON_L3_CTR_CTL5 in SDM.
1034 MSR_CORE2_EMON_L3_CTR_CTL6 is defined as MSR_EMON_L3_CTR_CTL6 in SDM.
1035 MSR_CORE2_EMON_L3_CTR_CTL7 is defined as MSR_EMON_L3_CTR_CTL7 in SDM.
1036 @{
1037 **/
1038 #define MSR_CORE2_EMON_L3_CTR_CTL0 0x000107CC
1039 #define MSR_CORE2_EMON_L3_CTR_CTL1 0x000107CD
1040 #define MSR_CORE2_EMON_L3_CTR_CTL2 0x000107CE
1041 #define MSR_CORE2_EMON_L3_CTR_CTL3 0x000107CF
1042 #define MSR_CORE2_EMON_L3_CTR_CTL4 0x000107D0
1043 #define MSR_CORE2_EMON_L3_CTR_CTL5 0x000107D1
1044 #define MSR_CORE2_EMON_L3_CTR_CTL6 0x000107D2
1045 #define MSR_CORE2_EMON_L3_CTR_CTL7 0x000107D3
1046 /// @}
1047
1048
1049 /**
1050 Unique. L3/FSB Common Control Register (R/W) Apply to Intel Xeon processor
1051 7400 series (processor signature 06_1D) only. See Section 17.2.2.
1052
1053 @param ECX MSR_CORE2_EMON_L3_GL_CTL (0x000107D8)
1054 @param EAX Lower 32-bits of MSR value.
1055 @param EDX Upper 32-bits of MSR value.
1056
1057 <b>Example usage</b>
1058 @code
1059 UINT64 Msr;
1060
1061 Msr = AsmReadMsr64 (MSR_CORE2_EMON_L3_GL_CTL);
1062 AsmWriteMsr64 (MSR_CORE2_EMON_L3_GL_CTL, Msr);
1063 @endcode
1064 @note MSR_CORE2_EMON_L3_GL_CTL is defined as MSR_EMON_L3_GL_CTL in SDM.
1065 **/
1066 #define MSR_CORE2_EMON_L3_GL_CTL 0x000107D8
1067
1068 #endif