]> git.proxmox.com Git - mirror_edk2.git/blob - UefiCpuPkg/Include/Register/ArchitecturalMsr.h
UefiCpuPkg/Include: Add Skylake MSR include file
[mirror_edk2.git] / UefiCpuPkg / Include / Register / ArchitecturalMsr.h
1 /** @file
2 Architectural MSR Definitions.
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, Intel Corporation. All rights reserved.<BR>
10 This program and the accompanying materials
11 are licensed and made available under the terms and conditions of the BSD License
12 which accompanies this distribution. The full text of the license may be found at
13 http://opensource.org/licenses/bsd-license.php
14
15 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
16 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17
18 @par Specification Reference:
19 Intel(R) 64 and IA-32 Architectures Software Developer's Manual, Volume 3,
20 December 2015, Chapter 35 Model-Specific-Registers (MSR), Section 35-1.
21
22 **/
23
24 #ifndef __ARCHITECTURAL_MSR_H__
25 #define __ARCHITECTURAL_MSR_H__
26
27 /**
28 See Section 35.20, "MSRs in Pentium Processors.". Pentium Processor (05_01H).
29
30 @param ECX MSR_IA32_P5_MC_ADDR (0x00000000)
31 @param EAX Lower 32-bits of MSR value.
32 @param EDX Upper 32-bits of MSR value.
33
34 <b>Example usage</b>
35 @code
36 UINT64 Msr;
37
38 Msr = AsmReadMsr64 (MSR_IA32_P5_MC_ADDR);
39 AsmWriteMsr64 (MSR_IA32_P5_MC_ADDR, Msr);
40 @endcode
41 **/
42 #define MSR_IA32_P5_MC_ADDR 0x00000000
43
44
45 /**
46 See Section 35.20, "MSRs in Pentium Processors.". DF_DM = 05_01H.
47
48 @param ECX MSR_IA32_P5_MC_TYPE (0x00000001)
49 @param EAX Lower 32-bits of MSR value.
50 @param EDX Upper 32-bits of MSR value.
51
52 <b>Example usage</b>
53 @code
54 UINT64 Msr;
55
56 Msr = AsmReadMsr64 (MSR_IA32_P5_MC_TYPE);
57 AsmWriteMsr64 (MSR_IA32_P5_MC_TYPE, Msr);
58 @endcode
59 **/
60 #define MSR_IA32_P5_MC_TYPE 0x00000001
61
62
63 /**
64 See Section 8.10.5, "Monitor/Mwait Address Range Determination.". Introduced
65 at Display Family / Display Model 0F_03H.
66
67 @param ECX MSR_IA32_MONITOR_FILTER_SIZE (0x00000006)
68 @param EAX Lower 32-bits of MSR value.
69 @param EDX Upper 32-bits of MSR value.
70
71 <b>Example usage</b>
72 @code
73 UINT64 Msr;
74
75 Msr = AsmReadMsr64 (MSR_IA32_MONITOR_FILTER_SIZE);
76 AsmWriteMsr64 (MSR_IA32_MONITOR_FILTER_SIZE, Msr);
77 @endcode
78 **/
79 #define MSR_IA32_MONITOR_FILTER_SIZE 0x00000006
80
81
82 /**
83 See Section 17.14, "Time-Stamp Counter.". Introduced at Display Family /
84 Display Model 05_01H.
85
86 @param ECX MSR_IA32_TIME_STAMP_COUNTER (0x00000010)
87 @param EAX Lower 32-bits of MSR value.
88 @param EDX Upper 32-bits of MSR value.
89
90 <b>Example usage</b>
91 @code
92 UINT64 Msr;
93
94 Msr = AsmReadMsr64 (MSR_IA32_TIME_STAMP_COUNTER);
95 AsmWriteMsr64 (MSR_IA32_TIME_STAMP_COUNTER, Msr);
96 @endcode
97 **/
98 #define MSR_IA32_TIME_STAMP_COUNTER 0x00000010
99
100
101 /**
102 Platform ID (RO) The operating system can use this MSR to determine "slot"
103 information for the processor and the proper microcode update to load.
104 Introduced at Display Family / Display Model 06_01H.
105
106 @param ECX MSR_IA32_PLATFORM_ID (0x00000017)
107 @param EAX Lower 32-bits of MSR value.
108 Described by the type MSR_IA32_PLATFORM_ID_REGISTER.
109 @param EDX Upper 32-bits of MSR value.
110 Described by the type MSR_IA32_PLATFORM_ID_REGISTER.
111
112 <b>Example usage</b>
113 @code
114 MSR_IA32_PLATFORM_ID_REGISTER Msr;
115
116 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_PLATFORM_ID);
117 @endcode
118 **/
119 #define MSR_IA32_PLATFORM_ID 0x00000017
120
121 /**
122 MSR information returned for MSR index #MSR_IA32_PLATFORM_ID
123 **/
124 typedef union {
125 ///
126 /// Individual bit fields
127 ///
128 struct {
129 UINT32 Reserved1:32;
130 UINT32 Reserved2:18;
131 ///
132 /// [Bits 52:50] Platform Id (RO) Contains information concerning the
133 /// intended platform for the processor.
134 /// 52 51 50
135 /// -- -- --
136 /// 0 0 0 Processor Flag 0.
137 /// 0 0 1 Processor Flag 1
138 /// 0 1 0 Processor Flag 2
139 /// 0 1 1 Processor Flag 3
140 /// 1 0 0 Processor Flag 4
141 /// 1 0 1 Processor Flag 5
142 /// 1 1 0 Processor Flag 6
143 /// 1 1 1 Processor Flag 7
144 ///
145 UINT32 PlatformId:3;
146 UINT32 Reserved3:11;
147 } Bits;
148 ///
149 /// All bit fields as a 64-bit value
150 ///
151 UINT64 Uint64;
152 } MSR_IA32_PLATFORM_ID_REGISTER;
153
154
155 /**
156 06_01H.
157
158 @param ECX MSR_IA32_APIC_BASE (0x0000001B)
159 @param EAX Lower 32-bits of MSR value.
160 Described by the type MSR_IA32_APIC_BASE_REGISTER.
161 @param EDX Upper 32-bits of MSR value.
162 Described by the type MSR_IA32_APIC_BASE_REGISTER.
163
164 <b>Example usage</b>
165 @code
166 MSR_IA32_APIC_BASE_REGISTER Msr;
167
168 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_APIC_BASE);
169 AsmWriteMsr64 (MSR_IA32_APIC_BASE, Msr.Uint64);
170 @endcode
171 **/
172 #define MSR_IA32_APIC_BASE 0x0000001B
173
174 /**
175 MSR information returned for MSR index #MSR_IA32_APIC_BASE
176 **/
177 typedef union {
178 ///
179 /// Individual bit fields
180 ///
181 struct {
182 UINT32 Reserved1:8;
183 ///
184 /// [Bit 8] BSP flag (R/W).
185 ///
186 UINT32 BSP:1;
187 UINT32 Reserved2:1;
188 ///
189 /// [Bit 10] Enable x2APIC mode. Introduced at Display Family / Display
190 /// Model 06_1AH.
191 ///
192 UINT32 EXTD:1;
193 ///
194 /// [Bit 11] APIC Global Enable (R/W).
195 ///
196 UINT32 EN:1;
197 ///
198 /// [Bits 31:12] APIC Base (R/W).
199 ///
200 UINT32 ApicBase:20;
201 ///
202 /// [Bits 63:32] APIC Base (R/W).
203 ///
204 UINT32 ApicBaseHi:32;
205 } Bits;
206 ///
207 /// All bit fields as a 64-bit value
208 ///
209 UINT64 Uint64;
210 } MSR_IA32_APIC_BASE_REGISTER;
211
212
213 /**
214 Control Features in Intel 64 Processor (R/W). If any one enumeration
215 condition for defined bit field holds.
216
217 @param ECX MSR_IA32_FEATURE_CONTROL (0x0000003A)
218 @param EAX Lower 32-bits of MSR value.
219 Described by the type MSR_IA32_FEATURE_CONTROL_REGISTER.
220 @param EDX Upper 32-bits of MSR value.
221 Described by the type MSR_IA32_FEATURE_CONTROL_REGISTER.
222
223 <b>Example usage</b>
224 @code
225 MSR_IA32_FEATURE_CONTROL_REGISTER Msr;
226
227 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_FEATURE_CONTROL);
228 AsmWriteMsr64 (MSR_IA32_FEATURE_CONTROL, Msr.Uint64);
229 @endcode
230 **/
231 #define MSR_IA32_FEATURE_CONTROL 0x0000003A
232
233 /**
234 MSR information returned for MSR index #MSR_IA32_FEATURE_CONTROL
235 **/
236 typedef union {
237 ///
238 /// Individual bit fields
239 ///
240 struct {
241 ///
242 /// [Bit 0] Lock bit (R/WO): (1 = locked). When set, locks this MSR from
243 /// being written, writes to this bit will result in GP(0). Note: Once the
244 /// Lock bit is set, the contents of this register cannot be modified.
245 /// Therefore the lock bit must be set after configuring support for Intel
246 /// Virtualization Technology and prior to transferring control to an
247 /// option ROM or the OS. Hence, once the Lock bit is set, the entire
248 /// IA32_FEATURE_CONTROL contents are preserved across RESET when PWRGOOD
249 /// is not deasserted. If any one enumeration condition for defined bit
250 /// field position greater than bit 0 holds.
251 ///
252 UINT32 Lock:1;
253 ///
254 /// [Bit 1] Enable VMX inside SMX operation (R/WL): This bit enables a
255 /// system executive to use VMX in conjunction with SMX to support
256 /// Intel(R) Trusted Execution Technology. BIOS must set this bit only
257 /// when the CPUID function 1 returns VMX feature flag and SMX feature
258 /// flag set (ECX bits 5 and 6 respectively). If CPUID.01H:ECX[5] = 1 &&
259 /// CPUID.01H:ECX[6] = 1.
260 ///
261 UINT32 EnableVmxInsideSmx:1;
262 ///
263 /// [Bit 2] Enable VMX outside SMX operation (R/WL): This bit enables VMX
264 /// for system executive that do not require SMX. BIOS must set this bit
265 /// only when the CPUID function 1 returns VMX feature flag set (ECX bit
266 /// 5). If CPUID.01H:ECX[5] = 1.
267 ///
268 UINT32 EnableVmxOutsideSmx:1;
269 UINT32 Reserved1:5;
270 ///
271 /// [Bits 14:8] SENTER Local Function Enables (R/WL): When set, each bit
272 /// in the field represents an enable control for a corresponding SENTER
273 /// function. This bit is supported only if CPUID.1:ECX.[bit 6] is set. If
274 /// CPUID.01H:ECX[6] = 1.
275 ///
276 UINT32 SenterLocalFunctionEnables:7;
277 ///
278 /// [Bit 15] SENTER Global Enable (R/WL): This bit must be set to enable
279 /// SENTER leaf functions. This bit is supported only if CPUID.1:ECX.[bit
280 /// 6] is set. If CPUID.01H:ECX[6] = 1.
281 ///
282 UINT32 SenterGlobalEnable:1;
283 UINT32 Reserved2:2;
284 ///
285 /// [Bit 18] SGX Global Enable (R/WL): This bit must be set to enable SGX
286 /// leaf functions. This bit is supported only if CPUID.1:ECX.[bit 6] is
287 /// set. If CPUID.(EAX=07H, ECX=0H): EBX[2] = 1.
288 ///
289 UINT32 SgxEnable:1;
290 UINT32 Reserved3:1;
291 ///
292 /// [Bit 20] LMCE On (R/WL): When set, system software can program the
293 /// MSRs associated with LMCE to configure delivery of some machine check
294 /// exceptions to a single logical processor. If IA32_MCG_CAP[27] = 1.
295 ///
296 UINT32 LmceOn:1;
297 UINT32 Reserved4:11;
298 UINT32 Reserved5:32;
299 } Bits;
300 ///
301 /// All bit fields as a 32-bit value
302 ///
303 UINT32 Uint32;
304 ///
305 /// All bit fields as a 64-bit value
306 ///
307 UINT64 Uint64;
308 } MSR_IA32_FEATURE_CONTROL_REGISTER;
309
310
311 /**
312 Per Logical Processor TSC Adjust (R/Write to clear). If CPUID.(EAX=07H,
313 ECX=0H): EBX[1] = 1. THREAD_ADJUST: Local offset value of the IA32_TSC for
314 a logical processor. Reset value is Zero. A write to IA32_TSC will modify
315 the local offset in IA32_TSC_ADJUST and the content of IA32_TSC, but does
316 not affect the internal invariant TSC hardware.
317
318 @param ECX MSR_IA32_TSC_ADJUST (0x0000003B)
319 @param EAX Lower 32-bits of MSR value.
320 @param EDX Upper 32-bits of MSR value.
321
322 <b>Example usage</b>
323 @code
324 UINT64 Msr;
325
326 Msr = AsmReadMsr64 (MSR_IA32_TSC_ADJUST);
327 AsmWriteMsr64 (MSR_IA32_TSC_ADJUST, Msr);
328 @endcode
329 **/
330 #define MSR_IA32_TSC_ADJUST 0x0000003B
331
332
333 /**
334 BIOS Update Trigger (W) Executing a WRMSR instruction to this MSR causes a
335 microcode update to be loaded into the processor. See Section 9.11.6,
336 "Microcode Update Loader." A processor may prevent writing to this MSR when
337 loading guest states on VM entries or saving guest states on VM exits.
338 Introduced at Display Family / Display Model 06_01H.
339
340 @param ECX MSR_IA32_BIOS_UPDT_TRIG (0x00000079)
341 @param EAX Lower 32-bits of MSR value.
342 @param EDX Upper 32-bits of MSR value.
343
344 <b>Example usage</b>
345 @code
346 UINT64 Msr;
347
348 Msr = 0;
349 AsmWriteMsr64 (MSR_IA32_BIOS_UPDT_TRIG, Msr);
350 @endcode
351 **/
352 #define MSR_IA32_BIOS_UPDT_TRIG 0x00000079
353
354
355 /**
356 BIOS Update Signature (RO) Returns the microcode update signature following
357 the execution of CPUID.01H. A processor may prevent writing to this MSR when
358 loading guest states on VM entries or saving guest states on VM exits.
359 Introduced at Display Family / Display Model 06_01H.
360
361 @param ECX MSR_IA32_BIOS_SIGN_ID (0x0000008B)
362 @param EAX Lower 32-bits of MSR value.
363 Described by the type MSR_IA32_BIOS_SIGN_ID_REGISTER.
364 @param EDX Upper 32-bits of MSR value.
365 Described by the type MSR_IA32_BIOS_SIGN_ID_REGISTER.
366
367 <b>Example usage</b>
368 @code
369 MSR_IA32_BIOS_SIGN_ID_REGISTER Msr;
370
371 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_BIOS_SIGN_ID);
372 @endcode
373 **/
374 #define MSR_IA32_BIOS_SIGN_ID 0x0000008B
375
376 /**
377 MSR information returned for MSR index #MSR_IA32_BIOS_SIGN_ID
378 **/
379 typedef union {
380 ///
381 /// Individual bit fields
382 ///
383 struct {
384 UINT32 Reserved:32;
385 ///
386 /// [Bits 63:32] Microcode update signature. This field contains the
387 /// signature of the currently loaded microcode update when read following
388 /// the execution of the CPUID instruction, function 1. It is required
389 /// that this register field be pre-loaded with zero prior to executing
390 /// the CPUID, function 1. If the field remains equal to zero, then there
391 /// is no microcode update loaded. Another nonzero value will be the
392 /// signature.
393 ///
394 UINT32 MicrocodeUpdateSignature:32;
395 } Bits;
396 ///
397 /// All bit fields as a 64-bit value
398 ///
399 UINT64 Uint64;
400 } MSR_IA32_BIOS_SIGN_ID_REGISTER;
401
402
403 /**
404 SMM Monitor Configuration (R/W). If CPUID.01H: ECX[5]=1. CPUID.01H: ECX[6] =
405 1.
406
407 @param ECX MSR_IA32_SMM_MONITOR_CTL (0x0000009B)
408 @param EAX Lower 32-bits of MSR value.
409 Described by the type MSR_IA32_SMM_MONITOR_CTL_REGISTER.
410 @param EDX Upper 32-bits of MSR value.
411 Described by the type MSR_IA32_SMM_MONITOR_CTL_REGISTER.
412
413 <b>Example usage</b>
414 @code
415 MSR_IA32_SMM_MONITOR_CTL_REGISTER Msr;
416
417 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_SMM_MONITOR_CTL);
418 AsmWriteMsr64 (MSR_IA32_SMM_MONITOR_CTL, Msr.Uint64);
419 @endcode
420 **/
421 #define MSR_IA32_SMM_MONITOR_CTL 0x0000009B
422
423 /**
424 MSR information returned for MSR index #MSR_IA32_SMM_MONITOR_CTL
425 **/
426 typedef union {
427 ///
428 /// Individual bit fields
429 ///
430 struct {
431 ///
432 /// [Bit 0] Valid (R/W). The STM may be invoked using VMCALL only if this
433 /// bit is 1. Because VMCALL is used to activate the dual-monitor treatment
434 /// (see Section 34.15.6), the dual-monitor treatment cannot be activated
435 /// if the bit is 0. This bit is cleared when the logical processor is
436 /// reset.
437 ///
438 UINT32 Valid:1;
439 UINT32 Reserved1:1;
440 ///
441 /// [Bit 2] Determines whether executions of VMXOFF unblock SMIs under the
442 /// default treatment of SMIs and SMM. Executions of VMXOFF unblock SMIs
443 /// unless bit 2 is 1 (the value of bit 0 is irrelevant).
444 ///
445 UINT32 BlockSmi:1;
446 UINT32 Reserved2:9;
447 ///
448 /// [Bits 31:12] MSEG Base (R/W).
449 ///
450 UINT32 MsegBase:20;
451 UINT32 Reserved3:32;
452 } Bits;
453 ///
454 /// All bit fields as a 32-bit value
455 ///
456 UINT32 Uint32;
457 ///
458 /// All bit fields as a 64-bit value
459 ///
460 UINT64 Uint64;
461 } MSR_IA32_SMM_MONITOR_CTL_REGISTER;
462
463
464 /**
465 Base address of the logical processor's SMRAM image (RO, SMM only). If
466 IA32_VMX_MISC[15].
467
468 @param ECX MSR_IA32_SMBASE (0x0000009E)
469 @param EAX Lower 32-bits of MSR value.
470 @param EDX Upper 32-bits of MSR value.
471
472 <b>Example usage</b>
473 @code
474 UINT64 Msr;
475
476 Msr = AsmReadMsr64 (MSR_IA32_SMBASE);
477 @endcode
478 **/
479 #define MSR_IA32_SMBASE 0x0000009E
480
481
482 /**
483 General Performance Counters (R/W).
484 MSR_IA32_PMCn is supported if CPUID.0AH: EAX[15:8] > n.
485
486 @param ECX MSR_IA32_PMCn
487 @param EAX Lower 32-bits of MSR value.
488 @param EDX Upper 32-bits of MSR value.
489
490 <b>Example usage</b>
491 @code
492 UINT64 Msr;
493
494 Msr = AsmReadMsr64 (MSR_IA32_PMC0);
495 AsmWriteMsr64 (MSR_IA32_PMC0, Msr);
496 @endcode
497 @{
498 **/
499 #define MSR_IA32_PMC0 0x000000C1
500 #define MSR_IA32_PMC1 0x000000C2
501 #define MSR_IA32_PMC2 0x000000C3
502 #define MSR_IA32_PMC3 0x000000C4
503 #define MSR_IA32_PMC4 0x000000C5
504 #define MSR_IA32_PMC5 0x000000C6
505 #define MSR_IA32_PMC6 0x000000C7
506 #define MSR_IA32_PMC7 0x000000C8
507 /// @}
508
509
510 /**
511 TSC Frequency Clock Counter (R/Write to clear). If CPUID.06H: ECX[0] = 1.
512 C0_MCNT: C0 TSC Frequency Clock Count Increments at fixed interval (relative
513 to TSC freq.) when the logical processor is in C0. Cleared upon overflow /
514 wrap-around of IA32_APERF.
515
516 @param ECX MSR_IA32_MPERF (0x000000E7)
517 @param EAX Lower 32-bits of MSR value.
518 @param EDX Upper 32-bits of MSR value.
519
520 <b>Example usage</b>
521 @code
522 UINT64 Msr;
523
524 Msr = AsmReadMsr64 (MSR_IA32_MPERF);
525 AsmWriteMsr64 (MSR_IA32_MPERF, Msr);
526 @endcode
527 **/
528 #define MSR_IA32_MPERF 0x000000E7
529
530
531 /**
532 Actual Performance Clock Counter (R/Write to clear). If CPUID.06H: ECX[0] =
533 1. C0_ACNT: C0 Actual Frequency Clock Count Accumulates core clock counts at
534 the coordinated clock frequency, when the logical processor is in C0.
535 Cleared upon overflow / wrap-around of IA32_MPERF.
536
537 @param ECX MSR_IA32_APERF (0x000000E8)
538 @param EAX Lower 32-bits of MSR value.
539 @param EDX Upper 32-bits of MSR value.
540
541 <b>Example usage</b>
542 @code
543 UINT64 Msr;
544
545 Msr = AsmReadMsr64 (MSR_IA32_APERF);
546 AsmWriteMsr64 (MSR_IA32_APERF, Msr);
547 @endcode
548 **/
549 #define MSR_IA32_APERF 0x000000E8
550
551
552 /**
553 MTRR Capability (RO) Section 11.11.2.1, "IA32_MTRR_DEF_TYPE MSR.".
554 Introduced at Display Family / Display Model 06_01H.
555
556 @param ECX MSR_IA32_MTRRCAP (0x000000FE)
557 @param EAX Lower 32-bits of MSR value.
558 Described by the type MSR_IA32_MTRRCAP_REGISTER.
559 @param EDX Upper 32-bits of MSR value.
560 Described by the type MSR_IA32_MTRRCAP_REGISTER.
561
562 <b>Example usage</b>
563 @code
564 MSR_IA32_MTRRCAP_REGISTER Msr;
565
566 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_MTRRCAP);
567 @endcode
568 **/
569 #define MSR_IA32_MTRRCAP 0x000000FE
570
571 /**
572 MSR information returned for MSR index #MSR_IA32_MTRRCAP
573 **/
574 typedef union {
575 ///
576 /// Individual bit fields
577 ///
578 struct {
579 ///
580 /// [Bits 7:0] VCNT: The number of variable memory type ranges in the
581 /// processor.
582 ///
583 UINT32 VCNT:8;
584 ///
585 /// [Bit 8] Fixed range MTRRs are supported when set.
586 ///
587 UINT32 FIX:1;
588 UINT32 Reserved1:1;
589 ///
590 /// [Bit 10] WC Supported when set.
591 ///
592 UINT32 WC:1;
593 ///
594 /// [Bit 11] SMRR Supported when set.
595 ///
596 UINT32 SMRR:1;
597 UINT32 Reserved2:20;
598 UINT32 Reserved3:32;
599 } Bits;
600 ///
601 /// All bit fields as a 32-bit value
602 ///
603 UINT32 Uint32;
604 ///
605 /// All bit fields as a 64-bit value
606 ///
607 UINT64 Uint64;
608 } MSR_IA32_MTRRCAP_REGISTER;
609
610
611 /**
612 SYSENTER_CS_MSR (R/W). Introduced at Display Family / Display Model 06_01H.
613
614 @param ECX MSR_IA32_SYSENTER_CS (0x00000174)
615 @param EAX Lower 32-bits of MSR value.
616 Described by the type MSR_IA32_SYSENTER_CS_REGISTER.
617 @param EDX Upper 32-bits of MSR value.
618 Described by the type MSR_IA32_SYSENTER_CS_REGISTER.
619
620 <b>Example usage</b>
621 @code
622 MSR_IA32_SYSENTER_CS_REGISTER Msr;
623
624 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_SYSENTER_CS);
625 AsmWriteMsr64 (MSR_IA32_SYSENTER_CS, Msr.Uint64);
626 @endcode
627 **/
628 #define MSR_IA32_SYSENTER_CS 0x00000174
629
630 /**
631 MSR information returned for MSR index #MSR_IA32_SYSENTER_CS
632 **/
633 typedef union {
634 ///
635 /// Individual bit fields
636 ///
637 struct {
638 ///
639 /// [Bits 15:0] CS Selector.
640 ///
641 UINT32 CS:16;
642 UINT32 Reserved1:16;
643 UINT32 Reserved2:32;
644 } Bits;
645 ///
646 /// All bit fields as a 32-bit value
647 ///
648 UINT32 Uint32;
649 ///
650 /// All bit fields as a 64-bit value
651 ///
652 UINT64 Uint64;
653 } MSR_IA32_SYSENTER_CS_REGISTER;
654
655
656 /**
657 SYSENTER_ESP_MSR (R/W). Introduced at Display Family / Display Model 06_01H.
658
659 @param ECX MSR_IA32_SYSENTER_ESP (0x00000175)
660 @param EAX Lower 32-bits of MSR value.
661 @param EDX Upper 32-bits of MSR value.
662
663 <b>Example usage</b>
664 @code
665 UINT64 Msr;
666
667 Msr = AsmReadMsr64 (MSR_IA32_SYSENTER_ESP);
668 AsmWriteMsr64 (MSR_IA32_SYSENTER_ESP, Msr);
669 @endcode
670 **/
671 #define MSR_IA32_SYSENTER_ESP 0x00000175
672
673
674 /**
675 SYSENTER_EIP_MSR (R/W). Introduced at Display Family / Display Model 06_01H.
676
677 @param ECX MSR_IA32_SYSENTER_EIP (0x00000176)
678 @param EAX Lower 32-bits of MSR value.
679 @param EDX Upper 32-bits of MSR value.
680
681 <b>Example usage</b>
682 @code
683 UINT64 Msr;
684
685 Msr = AsmReadMsr64 (MSR_IA32_SYSENTER_EIP);
686 AsmWriteMsr64 (MSR_IA32_SYSENTER_EIP, Msr);
687 @endcode
688 **/
689 #define MSR_IA32_SYSENTER_EIP 0x00000176
690
691
692 /**
693 Global Machine Check Capability (RO). Introduced at Display Family / Display
694 Model 06_01H.
695
696 @param ECX MSR_IA32_MCG_CAP (0x00000179)
697 @param EAX Lower 32-bits of MSR value.
698 Described by the type MSR_IA32_MCG_CAP_REGISTER.
699 @param EDX Upper 32-bits of MSR value.
700 Described by the type MSR_IA32_MCG_CAP_REGISTER.
701
702 <b>Example usage</b>
703 @code
704 MSR_IA32_MCG_CAP_REGISTER Msr;
705
706 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_MCG_CAP);
707 @endcode
708 **/
709 #define MSR_IA32_MCG_CAP 0x00000179
710
711 /**
712 MSR information returned for MSR index #MSR_IA32_MCG_CAP
713 **/
714 typedef union {
715 ///
716 /// Individual bit fields
717 ///
718 struct {
719 ///
720 /// [Bits 7:0] Count: Number of reporting banks.
721 ///
722 UINT32 Count:8;
723 ///
724 /// [Bit 8] MCG_CTL_P: IA32_MCG_CTL is present if this bit is set.
725 ///
726 UINT32 MCG_CTL_P:1;
727 ///
728 /// [Bit 9] MCG_EXT_P: Extended machine check state registers are present
729 /// if this bit is set.
730 ///
731 UINT32 MCG_EXT_P:1;
732 ///
733 /// [Bit 10] MCP_CMCI_P: Support for corrected MC error event is present.
734 /// Introduced at Display Family / Display Model 06_01H.
735 ///
736 UINT32 MCP_CMCI_P:1;
737 ///
738 /// [Bit 11] MCG_TES_P: Threshold-based error status register are present
739 /// if this bit is set.
740 ///
741 UINT32 MCG_TES_P:1;
742 UINT32 Reserved1:4;
743 ///
744 /// [Bits 23:16] MCG_EXT_CNT: Number of extended machine check state
745 /// registers present.
746 ///
747 UINT32 MCG_EXT_CNT:8;
748 ///
749 /// [Bit 24] MCG_SER_P: The processor supports software error recovery if
750 /// this bit is set.
751 ///
752 UINT32 MCG_SER_P:1;
753 UINT32 Reserved2:1;
754 ///
755 /// [Bit 26] MCG_ELOG_P: Indicates that the processor allows platform
756 /// firmware to be invoked when an error is detected so that it may
757 /// provide additional platform specific information in an ACPI format
758 /// "Generic Error Data Entry" that augments the data included in machine
759 /// check bank registers. Introduced at Display Family / Display Model
760 /// 06_3EH.
761 ///
762 UINT32 MCG_ELOG_P:1;
763 ///
764 /// [Bit 27] MCG_LMCE_P: Indicates that the processor support extended
765 /// state in IA32_MCG_STATUS and associated MSR necessary to configure
766 /// Local Machine Check Exception (LMCE). Introduced at Display Family /
767 /// Display Model 06_3EH.
768 ///
769 UINT32 MCG_LMCE_P:1;
770 UINT32 Reserved3:4;
771 UINT32 Reserved4:32;
772 } Bits;
773 ///
774 /// All bit fields as a 32-bit value
775 ///
776 UINT32 Uint32;
777 ///
778 /// All bit fields as a 64-bit value
779 ///
780 UINT64 Uint64;
781 } MSR_IA32_MCG_CAP_REGISTER;
782
783
784 /**
785 Global Machine Check Status (R/W0). Introduced at Display Family / Display
786 Model 06_01H.
787
788 @param ECX MSR_IA32_MCG_STATUS (0x0000017A)
789 @param EAX Lower 32-bits of MSR value.
790 Described by the type MSR_IA32_MCG_STATUS_REGISTER.
791 @param EDX Upper 32-bits of MSR value.
792 Described by the type MSR_IA32_MCG_STATUS_REGISTER.
793
794 <b>Example usage</b>
795 @code
796 MSR_IA32_MCG_STATUS_REGISTER Msr;
797
798 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_MCG_STATUS);
799 AsmWriteMsr64 (MSR_IA32_MCG_STATUS, Msr.Uint64);
800 @endcode
801 **/
802 #define MSR_IA32_MCG_STATUS 0x0000017A
803
804 /**
805 MSR information returned for MSR index #MSR_IA32_MCG_STATUS
806 **/
807 typedef union {
808 ///
809 /// Individual bit fields
810 ///
811 struct {
812 ///
813 /// [Bit 0] RIPV. Restart IP valid. Introduced at Display Family / Display
814 /// Model 06_01H.
815 ///
816 UINT32 RIPV:1;
817 ///
818 /// [Bit 1] EIPV. Error IP valid. Introduced at Display Family / Display
819 /// Model 06_01H.
820 ///
821 UINT32 EIPV:1;
822 ///
823 /// [Bit 2] MCIP. Machine check in progress. Introduced at Display Family
824 /// / Display Model 06_01H.
825 ///
826 UINT32 MCIP:1;
827 ///
828 /// [Bit 3] LMCE_S. If IA32_MCG_CAP.LMCE_P[2 7] =1.
829 ///
830 UINT32 LMCE_S:1;
831 UINT32 Reserved1:28;
832 UINT32 Reserved2:32;
833 } Bits;
834 ///
835 /// All bit fields as a 32-bit value
836 ///
837 UINT32 Uint32;
838 ///
839 /// All bit fields as a 64-bit value
840 ///
841 UINT64 Uint64;
842 } MSR_IA32_MCG_STATUS_REGISTER;
843
844
845 /**
846 Global Machine Check Control (R/W). If IA32_MCG_CAP.CTL_P[8] =1.
847
848 @param ECX MSR_IA32_MCG_CTL (0x0000017B)
849 @param EAX Lower 32-bits of MSR value.
850 @param EDX Upper 32-bits of MSR value.
851
852 <b>Example usage</b>
853 @code
854 UINT64 Msr;
855
856 Msr = AsmReadMsr64 (MSR_IA32_MCG_CTL);
857 AsmWriteMsr64 (MSR_IA32_MCG_CTL, Msr);
858 @endcode
859 **/
860 #define MSR_IA32_MCG_CTL 0x0000017B
861
862
863 /**
864 Performance Event Select Register n (R/W). If CPUID.0AH: EAX[15:8] > n.
865
866 @param ECX MSR_IA32_PERFEVTSELn
867 @param EAX Lower 32-bits of MSR value.
868 Described by the type MSR_IA32_PERFEVTSEL_REGISTER.
869 @param EDX Upper 32-bits of MSR value.
870 Described by the type MSR_IA32_PERFEVTSEL_REGISTER.
871
872 <b>Example usage</b>
873 @code
874 MSR_IA32_PERFEVTSEL_REGISTER Msr;
875
876 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_PERFEVTSEL0);
877 AsmWriteMsr64 (MSR_IA32_PERFEVTSEL0, Msr.Uint64);
878 @endcode
879 @{
880 **/
881 #define MSR_IA32_PERFEVTSEL0 0x00000186
882 #define MSR_IA32_PERFEVTSEL1 0x00000187
883 #define MSR_IA32_PERFEVTSEL2 0x00000188
884 #define MSR_IA32_PERFEVTSEL3 0x00000189
885 /// @}
886
887 /**
888 MSR information returned for MSR indexes #MSR_IA32_PERFEVTSEL0 to
889 #MSR_IA32_PERFEVTSEL3
890 **/
891 typedef union {
892 ///
893 /// Individual bit fields
894 ///
895 struct {
896 ///
897 /// [Bits 7:0] Event Select: Selects a performance event logic unit.
898 ///
899 UINT32 EventSelect:8;
900 ///
901 /// [Bits 15:8] UMask: Qualifies the microarchitectural condition to
902 /// detect on the selected event logic.
903 ///
904 UINT32 UMASK:8;
905 ///
906 /// [Bit 16] USR: Counts while in privilege level is not ring 0.
907 ///
908 UINT32 USR:1;
909 ///
910 /// [Bit 17] OS: Counts while in privilege level is ring 0.
911 ///
912 UINT32 OS:1;
913 ///
914 /// [Bit 18] Edge: Enables edge detection if set.
915 ///
916 UINT32 E:1;
917 ///
918 /// [Bit 19] PC: enables pin control.
919 ///
920 UINT32 PC:1;
921 ///
922 /// [Bit 20] INT: enables interrupt on counter overflow.
923 ///
924 UINT32 INT:1;
925 ///
926 /// [Bit 21] AnyThread: When set to 1, it enables counting the associated
927 /// event conditions occurring across all logical processors sharing a
928 /// processor core. When set to 0, the counter only increments the
929 /// associated event conditions occurring in the logical processor which
930 /// programmed the MSR.
931 ///
932 UINT32 ANY:1;
933 ///
934 /// [Bit 22] EN: enables the corresponding performance counter to commence
935 /// counting when this bit is set.
936 ///
937 UINT32 EN:1;
938 ///
939 /// [Bit 23] INV: invert the CMASK.
940 ///
941 UINT32 INV:1;
942 ///
943 /// [Bits 31:24] CMASK: When CMASK is not zero, the corresponding
944 /// performance counter increments each cycle if the event count is
945 /// greater than or equal to the CMASK.
946 ///
947 UINT32 CMASK:8;
948 UINT32 Reserved:32;
949 } Bits;
950 ///
951 /// All bit fields as a 32-bit value
952 ///
953 UINT32 Uint32;
954 ///
955 /// All bit fields as a 64-bit value
956 ///
957 UINT64 Uint64;
958 } MSR_IA32_PERFEVTSEL_REGISTER;
959
960
961 /**
962 Current performance state(P-State) operating point (RO). Introduced at
963 Display Family / Display Model 0F_03H.
964
965 @param ECX MSR_IA32_PERF_STATUS (0x00000198)
966 @param EAX Lower 32-bits of MSR value.
967 Described by the type MSR_IA32_PERF_STATUS_REGISTER.
968 @param EDX Upper 32-bits of MSR value.
969 Described by the type MSR_IA32_PERF_STATUS_REGISTER.
970
971 <b>Example usage</b>
972 @code
973 MSR_IA32_PERF_STATUS_REGISTER Msr;
974
975 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_PERF_STATUS);
976 @endcode
977 **/
978 #define MSR_IA32_PERF_STATUS 0x00000198
979
980 /**
981 MSR information returned for MSR index #MSR_IA32_PERF_STATUS
982 **/
983 typedef union {
984 ///
985 /// Individual bit fields
986 ///
987 struct {
988 ///
989 /// [Bits 15:0] Current performance State Value.
990 ///
991 UINT32 State:16;
992 UINT32 Reserved1:16;
993 UINT32 Reserved2:32;
994 } Bits;
995 ///
996 /// All bit fields as a 32-bit value
997 ///
998 UINT32 Uint32;
999 ///
1000 /// All bit fields as a 64-bit value
1001 ///
1002 UINT64 Uint64;
1003 } MSR_IA32_PERF_STATUS_REGISTER;
1004
1005
1006 /**
1007 (R/W). Introduced at Display Family / Display Model 0F_03H.
1008
1009 @param ECX MSR_IA32_PERF_CTL (0x00000199)
1010 @param EAX Lower 32-bits of MSR value.
1011 Described by the type MSR_IA32_PERF_CTL_REGISTER.
1012 @param EDX Upper 32-bits of MSR value.
1013 Described by the type MSR_IA32_PERF_CTL_REGISTER.
1014
1015 <b>Example usage</b>
1016 @code
1017 MSR_IA32_PERF_CTL_REGISTER Msr;
1018
1019 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_PERF_CTL);
1020 AsmWriteMsr64 (MSR_IA32_PERF_CTL, Msr.Uint64);
1021 @endcode
1022 **/
1023 #define MSR_IA32_PERF_CTL 0x00000199
1024
1025 /**
1026 MSR information returned for MSR index #MSR_IA32_PERF_CTL
1027 **/
1028 typedef union {
1029 ///
1030 /// Individual bit fields
1031 ///
1032 struct {
1033 ///
1034 /// [Bits 15:0] Target performance State Value.
1035 ///
1036 UINT32 TargetState:16;
1037 UINT32 Reserved1:16;
1038 ///
1039 /// [Bit 32] IDA Engage. (R/W) When set to 1: disengages IDA. 06_0FH
1040 /// (Mobile only).
1041 ///
1042 UINT32 IDA:1;
1043 UINT32 Reserved2:31;
1044 } Bits;
1045 ///
1046 /// All bit fields as a 64-bit value
1047 ///
1048 UINT64 Uint64;
1049 } MSR_IA32_PERF_CTL_REGISTER;
1050
1051
1052 /**
1053 Clock Modulation Control (R/W) See Section 14.7.3, "Software Controlled
1054 Clock Modulation.". Introduced at Display Family / Display Model 0F_0H.
1055
1056 @param ECX MSR_IA32_CLOCK_MODULATION (0x0000019A)
1057 @param EAX Lower 32-bits of MSR value.
1058 Described by the type MSR_IA32_CLOCK_MODULATION_REGISTER.
1059 @param EDX Upper 32-bits of MSR value.
1060 Described by the type MSR_IA32_CLOCK_MODULATION_REGISTER.
1061
1062 <b>Example usage</b>
1063 @code
1064 MSR_IA32_CLOCK_MODULATION_REGISTER Msr;
1065
1066 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_CLOCK_MODULATION);
1067 AsmWriteMsr64 (MSR_IA32_CLOCK_MODULATION, Msr.Uint64);
1068 @endcode
1069 **/
1070 #define MSR_IA32_CLOCK_MODULATION 0x0000019A
1071
1072 /**
1073 MSR information returned for MSR index #MSR_IA32_CLOCK_MODULATION
1074 **/
1075 typedef union {
1076 ///
1077 /// Individual bit fields
1078 ///
1079 struct {
1080 ///
1081 /// [Bit 0] Extended On-Demand Clock Modulation Duty Cycle:. If
1082 /// CPUID.06H:EAX[5] = 1.
1083 ///
1084 UINT32 ExtendedOnDemandClockModulationDutyCycle:1;
1085 ///
1086 /// [Bits 3:1] On-Demand Clock Modulation Duty Cycle: Specific encoded
1087 /// values for target duty cycle modulation.
1088 ///
1089 UINT32 OnDemandClockModulationDutyCycle:3;
1090 ///
1091 /// [Bit 4] On-Demand Clock Modulation Enable: Set 1 to enable modulation.
1092 ///
1093 UINT32 OnDemandClockModulationEnable:1;
1094 UINT32 Reserved1:27;
1095 UINT32 Reserved2:32;
1096 } Bits;
1097 ///
1098 /// All bit fields as a 32-bit value
1099 ///
1100 UINT32 Uint32;
1101 ///
1102 /// All bit fields as a 64-bit value
1103 ///
1104 UINT64 Uint64;
1105 } MSR_IA32_CLOCK_MODULATION_REGISTER;
1106
1107
1108 /**
1109 Thermal Interrupt Control (R/W) Enables and disables the generation of an
1110 interrupt on temperature transitions detected with the processor's thermal
1111 sensors and thermal monitor. See Section 14.7.2, "Thermal Monitor.".
1112 Introduced at Display Family / Display Model 0F_0H.
1113
1114 @param ECX MSR_IA32_THERM_INTERRUPT (0x0000019B)
1115 @param EAX Lower 32-bits of MSR value.
1116 Described by the type MSR_IA32_THERM_INTERRUPT_REGISTER.
1117 @param EDX Upper 32-bits of MSR value.
1118 Described by the type MSR_IA32_THERM_INTERRUPT_REGISTER.
1119
1120 <b>Example usage</b>
1121 @code
1122 MSR_IA32_THERM_INTERRUPT_REGISTER Msr;
1123
1124 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_THERM_INTERRUPT);
1125 AsmWriteMsr64 (MSR_IA32_THERM_INTERRUPT, Msr.Uint64);
1126 @endcode
1127 **/
1128 #define MSR_IA32_THERM_INTERRUPT 0x0000019B
1129
1130 /**
1131 MSR information returned for MSR index #MSR_IA32_THERM_INTERRUPT
1132 **/
1133 typedef union {
1134 ///
1135 /// Individual bit fields
1136 ///
1137 struct {
1138 ///
1139 /// [Bit 0] High-Temperature Interrupt Enable.
1140 ///
1141 UINT32 HighTempEnable:1;
1142 ///
1143 /// [Bit 1] Low-Temperature Interrupt Enable.
1144 ///
1145 UINT32 LowTempEnable:1;
1146 ///
1147 /// [Bit 2] PROCHOT# Interrupt Enable.
1148 ///
1149 UINT32 PROCHOT_Enable:1;
1150 ///
1151 /// [Bit 3] FORCEPR# Interrupt Enable.
1152 ///
1153 UINT32 FORCEPR_Enable:1;
1154 ///
1155 /// [Bit 4] Critical Temperature Interrupt Enable.
1156 ///
1157 UINT32 CriticalTempEnable:1;
1158 UINT32 Reserved1:3;
1159 ///
1160 /// [Bits 14:8] Threshold #1 Value.
1161 ///
1162 UINT32 Threshold1:7;
1163 ///
1164 /// [Bit 15] Threshold #1 Interrupt Enable.
1165 ///
1166 UINT32 Threshold1Enable:1;
1167 ///
1168 /// [Bits 22:16] Threshold #2 Value.
1169 ///
1170 UINT32 Threshold2:7;
1171 ///
1172 /// [Bit 23] Threshold #2 Interrupt Enable.
1173 ///
1174 UINT32 Threshold2Enable:1;
1175 ///
1176 /// [Bit 24] Power Limit Notification Enable. If CPUID.06H:EAX[4] = 1.
1177 ///
1178 UINT32 PowerLimitNotificationEnable:1;
1179 UINT32 Reserved2:7;
1180 UINT32 Reserved3:32;
1181 } Bits;
1182 ///
1183 /// All bit fields as a 32-bit value
1184 ///
1185 UINT32 Uint32;
1186 ///
1187 /// All bit fields as a 64-bit value
1188 ///
1189 UINT64 Uint64;
1190 } MSR_IA32_THERM_INTERRUPT_REGISTER;
1191
1192
1193 /**
1194 Thermal Status Information (RO) Contains status information about the
1195 processor's thermal sensor and automatic thermal monitoring facilities. See
1196 Section 14.7.2, "Thermal Monitor". Introduced at Display Family / Display
1197 Model 0F_0H.
1198
1199 @param ECX MSR_IA32_THERM_STATUS (0x0000019C)
1200 @param EAX Lower 32-bits of MSR value.
1201 Described by the type MSR_IA32_THERM_STATUS_REGISTER.
1202 @param EDX Upper 32-bits of MSR value.
1203 Described by the type MSR_IA32_THERM_STATUS_REGISTER.
1204
1205 <b>Example usage</b>
1206 @code
1207 MSR_IA32_THERM_STATUS_REGISTER Msr;
1208
1209 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_THERM_STATUS);
1210 @endcode
1211 **/
1212 #define MSR_IA32_THERM_STATUS 0x0000019C
1213
1214 /**
1215 MSR information returned for MSR index #MSR_IA32_THERM_STATUS
1216 **/
1217 typedef union {
1218 ///
1219 /// Individual bit fields
1220 ///
1221 struct {
1222 ///
1223 /// [Bit 0] Thermal Status (RO):.
1224 ///
1225 UINT32 ThermalStatus:1;
1226 ///
1227 /// [Bit 1] Thermal Status Log (R/W):.
1228 ///
1229 UINT32 ThermalStatusLog:1;
1230 ///
1231 /// [Bit 2] PROCHOT # or FORCEPR# event (RO).
1232 ///
1233 UINT32 PROCHOT_FORCEPR_Event:1;
1234 ///
1235 /// [Bit 3] PROCHOT # or FORCEPR# log (R/WC0).
1236 ///
1237 UINT32 PROCHOT_FORCEPR_Log:1;
1238 ///
1239 /// [Bit 4] Critical Temperature Status (RO).
1240 ///
1241 UINT32 CriticalTempStatus:1;
1242 ///
1243 /// [Bit 5] Critical Temperature Status log (R/WC0).
1244 ///
1245 UINT32 CriticalTempStatusLog:1;
1246 ///
1247 /// [Bit 6] Thermal Threshold #1 Status (RO). If CPUID.01H:ECX[8] = 1.
1248 ///
1249 UINT32 ThermalThreshold1Status:1;
1250 ///
1251 /// [Bit 7] Thermal Threshold #1 log (R/WC0). If CPUID.01H:ECX[8] = 1.
1252 ///
1253 UINT32 ThermalThreshold1Log:1;
1254 ///
1255 /// [Bit 8] Thermal Threshold #2 Status (RO). If CPUID.01H:ECX[8] = 1.
1256 ///
1257 UINT32 ThermalThreshold2Status:1;
1258 ///
1259 /// [Bit 9] Thermal Threshold #2 log (R/WC0). If CPUID.01H:ECX[8] = 1.
1260 ///
1261 UINT32 ThermalThreshold2Log:1;
1262 ///
1263 /// [Bit 10] Power Limitation Status (RO). If CPUID.06H:EAX[4] = 1.
1264 ///
1265 UINT32 PowerLimitStatus:1;
1266 ///
1267 /// [Bit 11] Power Limitation log (R/WC0). If CPUID.06H:EAX[4] = 1.
1268 ///
1269 UINT32 PowerLimitLog:1;
1270 ///
1271 /// [Bit 12] Current Limit Status (RO). If CPUID.06H:EAX[7] = 1.
1272 ///
1273 UINT32 CurrentLimitStatus:1;
1274 ///
1275 /// [Bit 13] Current Limit log (R/WC0). If CPUID.06H:EAX[7] = 1.
1276 ///
1277 UINT32 CurrentLimitLog:1;
1278 ///
1279 /// [Bit 14] Cross Domain Limit Status (RO). If CPUID.06H:EAX[7] = 1.
1280 ///
1281 UINT32 CrossDomainLimitStatus:1;
1282 ///
1283 /// [Bit 15] Cross Domain Limit log (R/WC0). If CPUID.06H:EAX[7] = 1.
1284 ///
1285 UINT32 CrossDomainLimitLog:1;
1286 ///
1287 /// [Bits 22:16] Digital Readout (RO). If CPUID.06H:EAX[0] = 1.
1288 ///
1289 UINT32 DigitalReadout:7;
1290 UINT32 Reserved1:4;
1291 ///
1292 /// [Bits 30:27] Resolution in Degrees Celsius (RO). If CPUID.06H:EAX[0] =
1293 /// 1.
1294 ///
1295 UINT32 ResolutionInDegreesCelsius:4;
1296 ///
1297 /// [Bit 31] Reading Valid (RO). If CPUID.06H:EAX[0] = 1.
1298 ///
1299 UINT32 ReadingValid:1;
1300 UINT32 Reserved2:32;
1301 } Bits;
1302 ///
1303 /// All bit fields as a 32-bit value
1304 ///
1305 UINT32 Uint32;
1306 ///
1307 /// All bit fields as a 64-bit value
1308 ///
1309 UINT64 Uint64;
1310 } MSR_IA32_THERM_STATUS_REGISTER;
1311
1312
1313 /**
1314 Enable Misc. Processor Features (R/W) Allows a variety of processor
1315 functions to be enabled and disabled.
1316
1317 @param ECX MSR_IA32_MISC_ENABLE (0x000001A0)
1318 @param EAX Lower 32-bits of MSR value.
1319 Described by the type MSR_IA32_MISC_ENABLE_REGISTER.
1320 @param EDX Upper 32-bits of MSR value.
1321 Described by the type MSR_IA32_MISC_ENABLE_REGISTER.
1322
1323 <b>Example usage</b>
1324 @code
1325 MSR_IA32_MISC_ENABLE_REGISTER Msr;
1326
1327 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_MISC_ENABLE);
1328 AsmWriteMsr64 (MSR_IA32_MISC_ENABLE, Msr.Uint64);
1329 @endcode
1330 **/
1331 #define MSR_IA32_MISC_ENABLE 0x000001A0
1332
1333 /**
1334 MSR information returned for MSR index #MSR_IA32_MISC_ENABLE
1335 **/
1336 typedef union {
1337 ///
1338 /// Individual bit fields
1339 ///
1340 struct {
1341 ///
1342 /// [Bit 0] Fast-Strings Enable When set, the fast-strings feature (for
1343 /// REP MOVS and REP STORS) is enabled (default); when clear, fast-strings
1344 /// are disabled. Introduced at Display Family / Display Model 0F_0H.
1345 ///
1346 UINT32 FastStrings:1;
1347 UINT32 Reserved1:2;
1348 ///
1349 /// [Bit 3] Automatic Thermal Control Circuit Enable (R/W) 1 = Setting
1350 /// this bit enables the thermal control circuit (TCC) portion of the
1351 /// Intel Thermal Monitor feature. This allows the processor to
1352 /// automatically reduce power consumption in response to TCC activation.
1353 /// 0 = Disabled. Note: In some products clearing this bit might be
1354 /// ignored in critical thermal conditions, and TM1, TM2 and adaptive
1355 /// thermal throttling will still be activated. Introduced at Display
1356 /// Family / Display Model 0F_0H.
1357 ///
1358 UINT32 AutomaticThermalControlCircuit:1;
1359 UINT32 Reserved2:3;
1360 ///
1361 /// [Bit 7] Performance Monitoring Available (R) 1 = Performance
1362 /// monitoring enabled 0 = Performance monitoring disabled. Introduced at
1363 /// Display Family / Display Model 0F_0H.
1364 ///
1365 UINT32 PerformanceMonitoring:1;
1366 UINT32 Reserved3:3;
1367 ///
1368 /// [Bit 11] Branch Trace Storage Unavailable (RO) 1 = Processor doesn't
1369 /// support branch trace storage (BTS) 0 = BTS is supported. Introduced at
1370 /// Display Family / Display Model 0F_0H.
1371 ///
1372 UINT32 BTS:1;
1373 ///
1374 /// [Bit 12] Precise Event Based Sampling (PEBS) Unavailable (RO) 1 =
1375 /// PEBS is not supported; 0 = PEBS is supported. Introduced at Display
1376 /// Family / Display Model 06_0FH.
1377 ///
1378 UINT32 PEBS:1;
1379 UINT32 Reserved4:3;
1380 ///
1381 /// [Bit 16] Enhanced Intel SpeedStep Technology Enable (R/W) 0= Enhanced
1382 /// Intel SpeedStep Technology disabled 1 = Enhanced Intel SpeedStep
1383 /// Technology enabled. If CPUID.01H: ECX[7] =1.
1384 ///
1385 UINT32 EIST:1;
1386 UINT32 Reserved5:1;
1387 ///
1388 /// [Bit 18] ENABLE MONITOR FSM (R/W) When this bit is set to 0, the
1389 /// MONITOR feature flag is not set (CPUID.01H:ECX[bit 3] = 0). This
1390 /// indicates that MONITOR/MWAIT are not supported. Software attempts to
1391 /// execute MONITOR/MWAIT will cause #UD when this bit is 0. When this bit
1392 /// is set to 1 (default), MONITOR/MWAIT are supported (CPUID.01H:ECX[bit
1393 /// 3] = 1). If the SSE3 feature flag ECX[0] is not set (CPUID.01H:ECX[bit
1394 /// 0] = 0), the OS must not attempt to alter this bit. BIOS must leave it
1395 /// in the default state. Writing this bit when the SSE3 feature flag is
1396 /// set to 0 may generate a #GP exception. Introduced at Display Family /
1397 /// Display Model 0F_03H.
1398 ///
1399 UINT32 MONITOR:1;
1400 UINT32 Reserved6:3;
1401 ///
1402 /// [Bit 22] Limit CPUID Maxval (R/W) When this bit is set to 1, CPUID.00H
1403 /// returns a maximum value in EAX[7:0] of 3. BIOS should contain a setup
1404 /// question that allows users to specify when the installed OS does not
1405 /// support CPUID functions greater than 3. Before setting this bit, BIOS
1406 /// must execute the CPUID.0H and examine the maximum value returned in
1407 /// EAX[7:0]. If the maximum value is greater than 3, the bit is
1408 /// supported. Otherwise, the bit is not supported. Writing to this bit
1409 /// when the maximum value is greater than 3 may generate a #GP exception.
1410 /// Setting this bit may cause unexpected behavior in software that
1411 /// depends on the availability of CPUID leaves greater than 3. Introduced
1412 /// at Display Family / Display Model 0F_03H.
1413 ///
1414 UINT32 LimitCpuidMaxval:1;
1415 ///
1416 /// [Bit 23] xTPR Message Disable (R/W) When set to 1, xTPR messages are
1417 /// disabled. xTPR messages are optional messages that allow the processor
1418 /// to inform the chipset of its priority. if CPUID.01H:ECX[14] = 1.
1419 ///
1420 UINT32 xTPR_Message_Disable:1;
1421 UINT32 Reserved7:8;
1422 UINT32 Reserved8:2;
1423 ///
1424 /// [Bit 34] XD Bit Disable (R/W) When set to 1, the Execute Disable Bit
1425 /// feature (XD Bit) is disabled and the XD Bit extended feature flag will
1426 /// be clear (CPUID.80000001H: EDX[20]=0). When set to a 0 (default), the
1427 /// Execute Disable Bit feature (if available) allows the OS to enable PAE
1428 /// paging and take advantage of data only pages. BIOS must not alter the
1429 /// contents of this bit location, if XD bit is not supported. Writing
1430 /// this bit to 1 when the XD Bit extended feature flag is set to 0 may
1431 /// generate a #GP exception. if CPUID.80000001H:EDX[2 0] = 1.
1432 ///
1433 UINT32 XD:1;
1434 UINT32 Reserved9:29;
1435 } Bits;
1436 ///
1437 /// All bit fields as a 64-bit value
1438 ///
1439 UINT64 Uint64;
1440 } MSR_IA32_MISC_ENABLE_REGISTER;
1441
1442
1443 /**
1444 Performance Energy Bias Hint (R/W). if CPUID.6H:ECX[3] = 1.
1445
1446 @param ECX MSR_IA32_ENERGY_PERF_BIAS (0x000001B0)
1447 @param EAX Lower 32-bits of MSR value.
1448 Described by the type MSR_IA32_ENERGY_PERF_BIAS_REGISTER.
1449 @param EDX Upper 32-bits of MSR value.
1450 Described by the type MSR_IA32_ENERGY_PERF_BIAS_REGISTER.
1451
1452 <b>Example usage</b>
1453 @code
1454 MSR_IA32_ENERGY_PERF_BIAS_REGISTER Msr;
1455
1456 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_ENERGY_PERF_BIAS);
1457 AsmWriteMsr64 (MSR_IA32_ENERGY_PERF_BIAS, Msr.Uint64);
1458 @endcode
1459 **/
1460 #define MSR_IA32_ENERGY_PERF_BIAS 0x000001B0
1461
1462 /**
1463 MSR information returned for MSR index #MSR_IA32_ENERGY_PERF_BIAS
1464 **/
1465 typedef union {
1466 ///
1467 /// Individual bit fields
1468 ///
1469 struct {
1470 ///
1471 /// [Bits 3:0] Power Policy Preference: 0 indicates preference to highest
1472 /// performance. 15 indicates preference to maximize energy saving.
1473 ///
1474 UINT32 PowerPolicyPreference:4;
1475 UINT32 Reserved1:28;
1476 UINT32 Reserved2:32;
1477 } Bits;
1478 ///
1479 /// All bit fields as a 32-bit value
1480 ///
1481 UINT32 Uint32;
1482 ///
1483 /// All bit fields as a 64-bit value
1484 ///
1485 UINT64 Uint64;
1486 } MSR_IA32_ENERGY_PERF_BIAS_REGISTER;
1487
1488
1489 /**
1490 Package Thermal Status Information (RO) Contains status information about
1491 the package's thermal sensor. See Section 14.8, "Package Level Thermal
1492 Management.". If CPUID.06H: EAX[6] = 1.
1493
1494 @param ECX MSR_IA32_PACKAGE_THERM_STATUS (0x000001B1)
1495 @param EAX Lower 32-bits of MSR value.
1496 Described by the type MSR_IA32_PACKAGE_THERM_STATUS_REGISTER.
1497 @param EDX Upper 32-bits of MSR value.
1498 Described by the type MSR_IA32_PACKAGE_THERM_STATUS_REGISTER.
1499
1500 <b>Example usage</b>
1501 @code
1502 MSR_IA32_PACKAGE_THERM_STATUS_REGISTER Msr;
1503
1504 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_PACKAGE_THERM_STATUS);
1505 @endcode
1506 **/
1507 #define MSR_IA32_PACKAGE_THERM_STATUS 0x000001B1
1508
1509 /**
1510 MSR information returned for MSR index #MSR_IA32_PACKAGE_THERM_STATUS
1511 **/
1512 typedef union {
1513 ///
1514 /// Individual bit fields
1515 ///
1516 struct {
1517 ///
1518 /// [Bit 0] Pkg Thermal Status (RO):.
1519 ///
1520 UINT32 ThermalStatus:1;
1521 ///
1522 /// [Bit 1] Pkg Thermal Status Log (R/W):.
1523 ///
1524 UINT32 ThermalStatusLog:1;
1525 ///
1526 /// [Bit 2] Pkg PROCHOT # event (RO).
1527 ///
1528 UINT32 PROCHOT_Event:1;
1529 ///
1530 /// [Bit 3] Pkg PROCHOT # log (R/WC0).
1531 ///
1532 UINT32 PROCHOT_Log:1;
1533 ///
1534 /// [Bit 4] Pkg Critical Temperature Status (RO).
1535 ///
1536 UINT32 CriticalTempStatus:1;
1537 ///
1538 /// [Bit 5] Pkg Critical Temperature Status log (R/WC0).
1539 ///
1540 UINT32 CriticalTempStatusLog:1;
1541 ///
1542 /// [Bit 6] Pkg Thermal Threshold #1 Status (RO).
1543 ///
1544 UINT32 ThermalThreshold1Status:1;
1545 ///
1546 /// [Bit 7] Pkg Thermal Threshold #1 log (R/WC0).
1547 ///
1548 UINT32 ThermalThreshold1Log:1;
1549 ///
1550 /// [Bit 8] Pkg Thermal Threshold #2 Status (RO).
1551 ///
1552 UINT32 ThermalThreshold2Status:1;
1553 ///
1554 /// [Bit 9] Pkg Thermal Threshold #1 log (R/WC0).
1555 ///
1556 UINT32 ThermalThreshold2Log:1;
1557 ///
1558 /// [Bit 10] Pkg Power Limitation Status (RO).
1559 ///
1560 UINT32 PowerLimitStatus:1;
1561 ///
1562 /// [Bit 11] Pkg Power Limitation log (R/WC0).
1563 ///
1564 UINT32 PowerLimitLog:1;
1565 UINT32 Reserved1:4;
1566 ///
1567 /// [Bits 22:16] Pkg Digital Readout (RO).
1568 ///
1569 UINT32 DigitalReadout:7;
1570 UINT32 Reserved2:9;
1571 UINT32 Reserved3:32;
1572 } Bits;
1573 ///
1574 /// All bit fields as a 32-bit value
1575 ///
1576 UINT32 Uint32;
1577 ///
1578 /// All bit fields as a 64-bit value
1579 ///
1580 UINT64 Uint64;
1581 } MSR_IA32_PACKAGE_THERM_STATUS_REGISTER;
1582
1583
1584 /**
1585 Pkg Thermal Interrupt Control (R/W) Enables and disables the generation of
1586 an interrupt on temperature transitions detected with the package's thermal
1587 sensor. See Section 14.8, "Package Level Thermal Management.". If CPUID.06H:
1588 EAX[6] = 1.
1589
1590 @param ECX MSR_IA32_PACKAGE_THERM_INTERRUPT (0x000001B2)
1591 @param EAX Lower 32-bits of MSR value.
1592 Described by the type MSR_IA32_PACKAGE_THERM_INTERRUPT_REGISTER.
1593 @param EDX Upper 32-bits of MSR value.
1594 Described by the type MSR_IA32_PACKAGE_THERM_INTERRUPT_REGISTER.
1595
1596 <b>Example usage</b>
1597 @code
1598 MSR_IA32_PACKAGE_THERM_INTERRUPT_REGISTER Msr;
1599
1600 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_PACKAGE_THERM_INTERRUPT);
1601 AsmWriteMsr64 (MSR_IA32_PACKAGE_THERM_INTERRUPT, Msr.Uint64);
1602 @endcode
1603 **/
1604 #define MSR_IA32_PACKAGE_THERM_INTERRUPT 0x000001B2
1605
1606 /**
1607 MSR information returned for MSR index #MSR_IA32_PACKAGE_THERM_INTERRUPT
1608 **/
1609 typedef union {
1610 ///
1611 /// Individual bit fields
1612 ///
1613 struct {
1614 ///
1615 /// [Bit 0] Pkg High-Temperature Interrupt Enable.
1616 ///
1617 UINT32 HighTempEnable:1;
1618 ///
1619 /// [Bit 1] Pkg Low-Temperature Interrupt Enable.
1620 ///
1621 UINT32 LowTempEnable:1;
1622 ///
1623 /// [Bit 2] Pkg PROCHOT# Interrupt Enable.
1624 ///
1625 UINT32 PROCHOT_Enable:1;
1626 UINT32 Reserved1:1;
1627 ///
1628 /// [Bit 4] Pkg Overheat Interrupt Enable.
1629 ///
1630 UINT32 OverheatEnable:1;
1631 UINT32 Reserved2:3;
1632 ///
1633 /// [Bits 14:8] Pkg Threshold #1 Value.
1634 ///
1635 UINT32 Threshold1:7;
1636 ///
1637 /// [Bit 15] Pkg Threshold #1 Interrupt Enable.
1638 ///
1639 UINT32 Threshold1Enable:1;
1640 ///
1641 /// [Bits 22:16] Pkg Threshold #2 Value.
1642 ///
1643 UINT32 Threshold2:7;
1644 ///
1645 /// [Bit 23] Pkg Threshold #2 Interrupt Enable.
1646 ///
1647 UINT32 Threshold2Enable:1;
1648 ///
1649 /// [Bit 24] Pkg Power Limit Notification Enable.
1650 ///
1651 UINT32 PowerLimitNotificationEnable:1;
1652 UINT32 Reserved3:7;
1653 UINT32 Reserved4:32;
1654 } Bits;
1655 ///
1656 /// All bit fields as a 32-bit value
1657 ///
1658 UINT32 Uint32;
1659 ///
1660 /// All bit fields as a 64-bit value
1661 ///
1662 UINT64 Uint64;
1663 } MSR_IA32_PACKAGE_THERM_INTERRUPT_REGISTER;
1664
1665
1666 /**
1667 Trace/Profile Resource Control (R/W). Introduced at Display Family / Display
1668 Model 06_0EH.
1669
1670 @param ECX MSR_IA32_DEBUGCTL (0x000001D9)
1671 @param EAX Lower 32-bits of MSR value.
1672 Described by the type MSR_IA32_DEBUGCTL_REGISTER.
1673 @param EDX Upper 32-bits of MSR value.
1674 Described by the type MSR_IA32_DEBUGCTL_REGISTER.
1675
1676 <b>Example usage</b>
1677 @code
1678 MSR_IA32_DEBUGCTL_REGISTER Msr;
1679
1680 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_DEBUGCTL);
1681 AsmWriteMsr64 (MSR_IA32_DEBUGCTL, Msr.Uint64);
1682 @endcode
1683 **/
1684 #define MSR_IA32_DEBUGCTL 0x000001D9
1685
1686 /**
1687 MSR information returned for MSR index #MSR_IA32_DEBUGCTL
1688 **/
1689 typedef union {
1690 ///
1691 /// Individual bit fields
1692 ///
1693 struct {
1694 ///
1695 /// [Bit 0] LBR: Setting this bit to 1 enables the processor to record a
1696 /// running trace of the most recent branches taken by the processor in
1697 /// the LBR stack. Introduced at Display Family / Display Model 06_01H.
1698 ///
1699 UINT32 LBR:1;
1700 ///
1701 /// [Bit 1] BTF: Setting this bit to 1 enables the processor to treat
1702 /// EFLAGS.TF as single-step on branches instead of single-step on
1703 /// instructions. Introduced at Display Family / Display Model 06_01H.
1704 ///
1705 UINT32 BTF:1;
1706 UINT32 Reserved1:4;
1707 ///
1708 /// [Bit 6] TR: Setting this bit to 1 enables branch trace messages to be
1709 /// sent. Introduced at Display Family / Display Model 06_0EH.
1710 ///
1711 UINT32 TR:1;
1712 ///
1713 /// [Bit 7] BTS: Setting this bit enables branch trace messages (BTMs) to
1714 /// be logged in a BTS buffer. Introduced at Display Family / Display
1715 /// Model 06_0EH.
1716 ///
1717 UINT32 BTS:1;
1718 ///
1719 /// [Bit 8] BTINT: When clear, BTMs are logged in a BTS buffer in circular
1720 /// fashion. When this bit is set, an interrupt is generated by the BTS
1721 /// facility when the BTS buffer is full. Introduced at Display Family /
1722 /// Display Model 06_0EH.
1723 ///
1724 UINT32 BTINT:1;
1725 ///
1726 /// [Bit 9] BTS_OFF_OS: When set, BTS or BTM is skipped if CPL = 0.
1727 /// Introduced at Display Family / Display Model 06_0FH.
1728 ///
1729 UINT32 BTS_OFF_OS:1;
1730 ///
1731 /// [Bit 10] BTS_OFF_USR: When set, BTS or BTM is skipped if CPL > 0.
1732 /// Introduced at Display Family / Display Model 06_0FH.
1733 ///
1734 UINT32 BTS_OFF_USR:1;
1735 ///
1736 /// [Bit 11] FREEZE_LBRS_ON_PMI: When set, the LBR stack is frozen on a
1737 /// PMI request. If CPUID.01H: ECX[15] = 1 && CPUID.0AH: EAX[7:0] > 1.
1738 ///
1739 UINT32 FREEZE_LBRS_ON_PMI:1;
1740 ///
1741 /// [Bit 12] FREEZE_PERFMON_ON_PMI: When set, each ENABLE bit of the
1742 /// global counter control MSR are frozen (address 38FH) on a PMI request.
1743 /// If CPUID.01H: ECX[15] = 1 && CPUID.0AH: EAX[7:0] > 1.
1744 ///
1745 UINT32 FREEZE_PERFMON_ON_PMI:1;
1746 ///
1747 /// [Bit 13] ENABLE_UNCORE_PMI: When set, enables the logical processor to
1748 /// receive and generate PMI on behalf of the uncore. Introduced at
1749 /// Display Family / Display Model 06_1AH.
1750 ///
1751 UINT32 ENABLE_UNCORE_PMI:1;
1752 ///
1753 /// [Bit 14] FREEZE_WHILE_SMM: When set, freezes perfmon and trace
1754 /// messages while in SMM. If IA32_PERF_CAPABILITIES[ 12] = 1.
1755 ///
1756 UINT32 FREEZE_WHILE_SMM:1;
1757 ///
1758 /// [Bit 15] RTM_DEBUG: When set, enables DR7 debug bit on XBEGIN. If
1759 /// (CPUID.(EAX=07H, ECX=0):EBX[11] = 1).
1760 ///
1761 UINT32 RTM_DEBUG:1;
1762 UINT32 Reserved2:16;
1763 UINT32 Reserved3:32;
1764 } Bits;
1765 ///
1766 /// All bit fields as a 32-bit value
1767 ///
1768 UINT32 Uint32;
1769 ///
1770 /// All bit fields as a 64-bit value
1771 ///
1772 UINT64 Uint64;
1773 } MSR_IA32_DEBUGCTL_REGISTER;
1774
1775
1776 /**
1777 SMRR Base Address (Writeable only in SMM) Base address of SMM memory range.
1778 If IA32_MTRRCAP.SMRR[11] = 1.
1779
1780 @param ECX MSR_IA32_SMRR_PHYSBASE (0x000001F2)
1781 @param EAX Lower 32-bits of MSR value.
1782 Described by the type MSR_IA32_SMRR_PHYSBASE_REGISTER.
1783 @param EDX Upper 32-bits of MSR value.
1784 Described by the type MSR_IA32_SMRR_PHYSBASE_REGISTER.
1785
1786 <b>Example usage</b>
1787 @code
1788 MSR_IA32_SMRR_PHYSBASE_REGISTER Msr;
1789
1790 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_SMRR_PHYSBASE);
1791 AsmWriteMsr64 (MSR_IA32_SMRR_PHYSBASE, Msr.Uint64);
1792 @endcode
1793 **/
1794 #define MSR_IA32_SMRR_PHYSBASE 0x000001F2
1795
1796 /**
1797 MSR information returned for MSR index #MSR_IA32_SMRR_PHYSBASE
1798 **/
1799 typedef union {
1800 ///
1801 /// Individual bit fields
1802 ///
1803 struct {
1804 ///
1805 /// [Bits 7:0] Type. Specifies memory type of the range.
1806 ///
1807 UINT32 Type:8;
1808 UINT32 Reserved1:4;
1809 ///
1810 /// [Bits 31:12] PhysBase. SMRR physical Base Address.
1811 ///
1812 UINT32 PhysBase:20;
1813 UINT32 Reserved2:32;
1814 } Bits;
1815 ///
1816 /// All bit fields as a 32-bit value
1817 ///
1818 UINT32 Uint32;
1819 ///
1820 /// All bit fields as a 64-bit value
1821 ///
1822 UINT64 Uint64;
1823 } MSR_IA32_SMRR_PHYSBASE_REGISTER;
1824
1825
1826 /**
1827 SMRR Range Mask. (Writeable only in SMM) Range Mask of SMM memory range. If
1828 IA32_MTRRCAP[SMRR] = 1.
1829
1830 @param ECX MSR_IA32_SMRR_PHYSMASK (0x000001F3)
1831 @param EAX Lower 32-bits of MSR value.
1832 Described by the type MSR_IA32_SMRR_PHYSMASK_REGISTER.
1833 @param EDX Upper 32-bits of MSR value.
1834 Described by the type MSR_IA32_SMRR_PHYSMASK_REGISTER.
1835
1836 <b>Example usage</b>
1837 @code
1838 MSR_IA32_SMRR_PHYSMASK_REGISTER Msr;
1839
1840 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_SMRR_PHYSMASK);
1841 AsmWriteMsr64 (MSR_IA32_SMRR_PHYSMASK, Msr.Uint64);
1842 @endcode
1843 **/
1844 #define MSR_IA32_SMRR_PHYSMASK 0x000001F3
1845
1846 /**
1847 MSR information returned for MSR index #MSR_IA32_SMRR_PHYSMASK
1848 **/
1849 typedef union {
1850 ///
1851 /// Individual bit fields
1852 ///
1853 struct {
1854 UINT32 Reserved1:11;
1855 ///
1856 /// [Bit 11] Valid Enable range mask.
1857 ///
1858 UINT32 Valid:1;
1859 ///
1860 /// [Bits 31:12] PhysMask SMRR address range mask.
1861 ///
1862 UINT32 PhysMask:20;
1863 UINT32 Reserved2:32;
1864 } Bits;
1865 ///
1866 /// All bit fields as a 32-bit value
1867 ///
1868 UINT32 Uint32;
1869 ///
1870 /// All bit fields as a 64-bit value
1871 ///
1872 UINT64 Uint64;
1873 } MSR_IA32_SMRR_PHYSMASK_REGISTER;
1874
1875
1876 /**
1877 DCA Capability (R). If CPUID.01H: ECX[18] = 1.
1878
1879 @param ECX MSR_IA32_PLATFORM_DCA_CAP (0x000001F8)
1880 @param EAX Lower 32-bits of MSR value.
1881 @param EDX Upper 32-bits of MSR value.
1882
1883 <b>Example usage</b>
1884 @code
1885 UINT64 Msr;
1886
1887 Msr = AsmReadMsr64 (MSR_IA32_PLATFORM_DCA_CAP);
1888 @endcode
1889 **/
1890 #define MSR_IA32_PLATFORM_DCA_CAP 0x000001F8
1891
1892
1893 /**
1894 If set, CPU supports Prefetch-Hint type. If CPUID.01H: ECX[18] = 1.
1895
1896 @param ECX MSR_IA32_CPU_DCA_CAP (0x000001F9)
1897 @param EAX Lower 32-bits of MSR value.
1898 @param EDX Upper 32-bits of MSR value.
1899
1900 <b>Example usage</b>
1901 @code
1902 UINT64 Msr;
1903
1904 Msr = AsmReadMsr64 (MSR_IA32_CPU_DCA_CAP);
1905 AsmWriteMsr64 (MSR_IA32_CPU_DCA_CAP, Msr);
1906 @endcode
1907 **/
1908 #define MSR_IA32_CPU_DCA_CAP 0x000001F9
1909
1910
1911 /**
1912 DCA type 0 Status and Control register. If CPUID.01H: ECX[18] = 1.
1913
1914 @param ECX MSR_IA32_DCA_0_CAP (0x000001FA)
1915 @param EAX Lower 32-bits of MSR value.
1916 Described by the type MSR_IA32_DCA_0_CAP_REGISTER.
1917 @param EDX Upper 32-bits of MSR value.
1918 Described by the type MSR_IA32_DCA_0_CAP_REGISTER.
1919
1920 <b>Example usage</b>
1921 @code
1922 MSR_IA32_DCA_0_CAP_REGISTER Msr;
1923
1924 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_DCA_0_CAP);
1925 AsmWriteMsr64 (MSR_IA32_DCA_0_CAP, Msr.Uint64);
1926 @endcode
1927 **/
1928 #define MSR_IA32_DCA_0_CAP 0x000001FA
1929
1930 /**
1931 MSR information returned for MSR index #MSR_IA32_DCA_0_CAP
1932 **/
1933 typedef union {
1934 ///
1935 /// Individual bit fields
1936 ///
1937 struct {
1938 ///
1939 /// [Bit 0] DCA_ACTIVE: Set by HW when DCA is fuseenabled and no
1940 /// defeatures are set.
1941 ///
1942 UINT32 DCA_ACTIVE:1;
1943 ///
1944 /// [Bits 2:1] TRANSACTION.
1945 ///
1946 UINT32 TRANSACTION:2;
1947 ///
1948 /// [Bits 6:3] DCA_TYPE.
1949 ///
1950 UINT32 DCA_TYPE:4;
1951 ///
1952 /// [Bits 10:7] DCA_QUEUE_SIZE.
1953 ///
1954 UINT32 DCA_QUEUE_SIZE:4;
1955 UINT32 Reserved1:2;
1956 ///
1957 /// [Bits 16:13] DCA_DELAY: Writes will update the register but have no HW
1958 /// side-effect.
1959 ///
1960 UINT32 DCA_DELAY:4;
1961 UINT32 Reserved2:7;
1962 ///
1963 /// [Bit 24] SW_BLOCK: SW can request DCA block by setting this bit.
1964 ///
1965 UINT32 SW_BLOCK:1;
1966 UINT32 Reserved3:1;
1967 ///
1968 /// [Bit 26] HW_BLOCK: Set when DCA is blocked by HW (e.g. CR0.CD = 1).
1969 ///
1970 UINT32 HW_BLOCK:1;
1971 UINT32 Reserved4:5;
1972 UINT32 Reserved5:32;
1973 } Bits;
1974 ///
1975 /// All bit fields as a 32-bit value
1976 ///
1977 UINT32 Uint32;
1978 ///
1979 /// All bit fields as a 64-bit value
1980 ///
1981 UINT64 Uint64;
1982 } MSR_IA32_DCA_0_CAP_REGISTER;
1983
1984
1985 /**
1986 MTRRphysBasen. See Section 11.11.2.3, "Variable Range MTRRs".
1987 If CPUID.01H: EDX.MTRR[12] = 1 and IA32_MTRRCAP[7:0] > n.
1988
1989 @param ECX MSR_IA32_MTRR_PHYSBASEn
1990 @param EAX Lower 32-bits of MSR value.
1991 Described by the type MSR_IA32_MTRR_PHYSBASE_REGISTER.
1992 @param EDX Upper 32-bits of MSR value.
1993 Described by the type MSR_IA32_MTRR_PHYSBASE_REGISTER.
1994
1995 <b>Example usage</b>
1996 @code
1997 MSR_IA32_MTRR_PHYSBASE_REGISTER Msr;
1998
1999 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_MTRR_PHYSBASE0);
2000 AsmWriteMsr64 (MSR_IA32_MTRR_PHYSBASE0, Msr.Uint64);
2001 @endcode
2002 @{
2003 **/
2004 #define MSR_IA32_MTRR_PHYSBASE0 0x00000200
2005 #define MSR_IA32_MTRR_PHYSBASE1 0x00000202
2006 #define MSR_IA32_MTRR_PHYSBASE2 0x00000204
2007 #define MSR_IA32_MTRR_PHYSBASE3 0x00000206
2008 #define MSR_IA32_MTRR_PHYSBASE4 0x00000208
2009 #define MSR_IA32_MTRR_PHYSBASE5 0x0000020A
2010 #define MSR_IA32_MTRR_PHYSBASE6 0x0000020C
2011 #define MSR_IA32_MTRR_PHYSBASE7 0x0000020E
2012 #define MSR_IA32_MTRR_PHYSBASE8 0x00000210
2013 #define MSR_IA32_MTRR_PHYSBASE9 0x00000212
2014 /// @}
2015
2016 /**
2017 MSR information returned for MSR indexes #MSR_IA32_MTRR_PHYSBASE0 to
2018 #MSR_IA32_MTRR_PHYSBASE9
2019 **/
2020 typedef union {
2021 ///
2022 /// Individual bit fields
2023 ///
2024 struct {
2025 ///
2026 /// [Bits 7:0] Type. Specifies memory type of the range.
2027 ///
2028 UINT32 Type:8;
2029 UINT32 Reserved1:4;
2030 ///
2031 /// [Bits 31:12] PhysBase. MTRR physical Base Address.
2032 ///
2033 UINT32 PhysBase:20;
2034 ///
2035 /// [Bits MAXPHYSADDR:32] PhysBase. Upper bits of MTRR physical Base Address.
2036 /// MAXPHYADDR: The bit position indicated by MAXPHYADDR depends on the
2037 /// maximum physical address range supported by the processor. It is
2038 /// reported by CPUID leaf function 80000008H. If CPUID does not support
2039 /// leaf 80000008H, the processor supports 36-bit physical address size,
2040 /// then bit PhysMask consists of bits 35:12, and bits 63:36 are reserved.
2041 ///
2042 UINT32 PhysBaseHi:32;
2043 } Bits;
2044 ///
2045 /// All bit fields as a 64-bit value
2046 ///
2047 UINT64 Uint64;
2048 } MSR_IA32_MTRR_PHYSBASE_REGISTER;
2049
2050
2051 /**
2052 MTRRphysMaskn. See Section 11.11.2.3, "Variable Range MTRRs".
2053 If CPUID.01H: EDX.MTRR[12] = 1 and IA32_MTRRCAP[7:0] > n.
2054
2055 @param ECX MSR_IA32_MTRR_PHYSMASKn
2056 @param EAX Lower 32-bits of MSR value.
2057 Described by the type MSR_IA32_MTRR_PHYSMASK_REGISTER.
2058 @param EDX Upper 32-bits of MSR value.
2059 Described by the type MSR_IA32_MTRR_PHYSMASK_REGISTER.
2060
2061 <b>Example usage</b>
2062 @code
2063 MSR_IA32_MTRR_PHYSMASK_REGISTER Msr;
2064
2065 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_MTRR_PHYSMASK0);
2066 AsmWriteMsr64 (MSR_IA32_MTRR_PHYSMASK0, Msr.Uint64);
2067 @endcode
2068 @{
2069 **/
2070 #define MSR_IA32_MTRR_PHYSMASK0 0x00000201
2071 #define MSR_IA32_MTRR_PHYSMASK1 0x00000203
2072 #define MSR_IA32_MTRR_PHYSMASK2 0x00000205
2073 #define MSR_IA32_MTRR_PHYSMASK3 0x00000207
2074 #define MSR_IA32_MTRR_PHYSMASK4 0x00000209
2075 #define MSR_IA32_MTRR_PHYSMASK5 0x0000020B
2076 #define MSR_IA32_MTRR_PHYSMASK6 0x0000020D
2077 #define MSR_IA32_MTRR_PHYSMASK7 0x0000020F
2078 #define MSR_IA32_MTRR_PHYSMASK8 0x00000211
2079 #define MSR_IA32_MTRR_PHYSMASK9 0x00000213
2080 /// @}
2081
2082 /**
2083 MSR information returned for MSR indexes #MSR_IA32_MTRR_PHYSMASK0 to
2084 #MSR_IA32_MTRR_PHYSMASK9
2085 **/
2086 typedef union {
2087 ///
2088 /// Individual bit fields
2089 ///
2090 struct {
2091 UINT32 Reserved1:11;
2092 ///
2093 /// [Bit 11] Valid Enable range mask.
2094 ///
2095 UINT32 V:8;
2096 ///
2097 /// [Bits 31:12] PhysMask. MTRR address range mask.
2098 ///
2099 UINT32 PhysMask:20;
2100 ///
2101 /// [Bits MAXPHYSADDR:32] PhysMask. Upper bits of MTRR address range mask.
2102 /// MAXPHYADDR: The bit position indicated by MAXPHYADDR depends on the
2103 /// maximum physical address range supported by the processor. It is
2104 /// reported by CPUID leaf function 80000008H. If CPUID does not support
2105 /// leaf 80000008H, the processor supports 36-bit physical address size,
2106 /// then bit PhysMask consists of bits 35:12, and bits 63:36 are reserved.
2107 ///
2108 UINT32 PhysMaskHi:32;
2109 } Bits;
2110 ///
2111 /// All bit fields as a 64-bit value
2112 ///
2113 UINT64 Uint64;
2114 } MSR_IA32_MTRR_PHYSMASK_REGISTER;
2115
2116
2117 /**
2118 MTRRfix64K_00000. If CPUID.01H: EDX.MTRR[12] =1.
2119
2120 @param ECX MSR_IA32_MTRR_FIX64K_00000 (0x00000250)
2121 @param EAX Lower 32-bits of MSR value.
2122 @param EDX Upper 32-bits of MSR value.
2123
2124 <b>Example usage</b>
2125 @code
2126 UINT64 Msr;
2127
2128 Msr = AsmReadMsr64 (MSR_IA32_MTRR_FIX64K_00000);
2129 AsmWriteMsr64 (MSR_IA32_MTRR_FIX64K_00000, Msr);
2130 @endcode
2131 **/
2132 #define MSR_IA32_MTRR_FIX64K_00000 0x00000250
2133
2134
2135 /**
2136 MTRRfix16K_80000. If CPUID.01H: EDX.MTRR[12] =1.
2137
2138 @param ECX MSR_IA32_MTRR_FIX16K_80000 (0x00000258)
2139 @param EAX Lower 32-bits of MSR value.
2140 @param EDX Upper 32-bits of MSR value.
2141
2142 <b>Example usage</b>
2143 @code
2144 UINT64 Msr;
2145
2146 Msr = AsmReadMsr64 (MSR_IA32_MTRR_FIX16K_80000);
2147 AsmWriteMsr64 (MSR_IA32_MTRR_FIX16K_80000, Msr);
2148 @endcode
2149 **/
2150 #define MSR_IA32_MTRR_FIX16K_80000 0x00000258
2151
2152
2153 /**
2154 MTRRfix16K_A0000. If CPUID.01H: EDX.MTRR[12] =1.
2155
2156 @param ECX MSR_IA32_MTRR_FIX16K_A0000 (0x00000259)
2157 @param EAX Lower 32-bits of MSR value.
2158 @param EDX Upper 32-bits of MSR value.
2159
2160 <b>Example usage</b>
2161 @code
2162 UINT64 Msr;
2163
2164 Msr = AsmReadMsr64 (MSR_IA32_MTRR_FIX16K_A0000);
2165 AsmWriteMsr64 (MSR_IA32_MTRR_FIX16K_A0000, Msr);
2166 @endcode
2167 **/
2168 #define MSR_IA32_MTRR_FIX16K_A0000 0x00000259
2169
2170
2171 /**
2172 See Section 11.11.2.2, "Fixed Range MTRRs.". If CPUID.01H: EDX.MTRR[12] =1.
2173
2174 @param ECX MSR_IA32_MTRR_FIX4K_C0000 (0x00000268)
2175 @param EAX Lower 32-bits of MSR value.
2176 @param EDX Upper 32-bits of MSR value.
2177
2178 <b>Example usage</b>
2179 @code
2180 UINT64 Msr;
2181
2182 Msr = AsmReadMsr64 (MSR_IA32_MTRR_FIX4K_C0000);
2183 AsmWriteMsr64 (MSR_IA32_MTRR_FIX4K_C0000, Msr);
2184 @endcode
2185 **/
2186 #define MSR_IA32_MTRR_FIX4K_C0000 0x00000268
2187
2188
2189 /**
2190 MTRRfix4K_C8000. If CPUID.01H: EDX.MTRR[12] =1.
2191
2192 @param ECX MSR_IA32_MTRR_FIX4K_C8000 (0x00000269)
2193 @param EAX Lower 32-bits of MSR value.
2194 @param EDX Upper 32-bits of MSR value.
2195
2196 <b>Example usage</b>
2197 @code
2198 UINT64 Msr;
2199
2200 Msr = AsmReadMsr64 (MSR_IA32_MTRR_FIX4K_C8000);
2201 AsmWriteMsr64 (MSR_IA32_MTRR_FIX4K_C8000, Msr);
2202 @endcode
2203 **/
2204 #define MSR_IA32_MTRR_FIX4K_C8000 0x00000269
2205
2206
2207 /**
2208 MTRRfix4K_D0000. If CPUID.01H: EDX.MTRR[12] =1.
2209
2210 @param ECX MSR_IA32_MTRR_FIX4K_D0000 (0x0000026A)
2211 @param EAX Lower 32-bits of MSR value.
2212 @param EDX Upper 32-bits of MSR value.
2213
2214 <b>Example usage</b>
2215 @code
2216 UINT64 Msr;
2217
2218 Msr = AsmReadMsr64 (MSR_IA32_MTRR_FIX4K_D0000);
2219 AsmWriteMsr64 (MSR_IA32_MTRR_FIX4K_D0000, Msr);
2220 @endcode
2221 **/
2222 #define MSR_IA32_MTRR_FIX4K_D0000 0x0000026A
2223
2224
2225 /**
2226 MTRRfix4K_D8000. If CPUID.01H: EDX.MTRR[12] =1.
2227
2228 @param ECX MSR_IA32_MTRR_FIX4K_D8000 (0x0000026B)
2229 @param EAX Lower 32-bits of MSR value.
2230 @param EDX Upper 32-bits of MSR value.
2231
2232 <b>Example usage</b>
2233 @code
2234 UINT64 Msr;
2235
2236 Msr = AsmReadMsr64 (MSR_IA32_MTRR_FIX4K_D8000);
2237 AsmWriteMsr64 (MSR_IA32_MTRR_FIX4K_D8000, Msr);
2238 @endcode
2239 **/
2240 #define MSR_IA32_MTRR_FIX4K_D8000 0x0000026B
2241
2242
2243 /**
2244 MTRRfix4K_E0000. If CPUID.01H: EDX.MTRR[12] =1.
2245
2246 @param ECX MSR_IA32_MTRR_FIX4K_E0000 (0x0000026C)
2247 @param EAX Lower 32-bits of MSR value.
2248 @param EDX Upper 32-bits of MSR value.
2249
2250 <b>Example usage</b>
2251 @code
2252 UINT64 Msr;
2253
2254 Msr = AsmReadMsr64 (MSR_IA32_MTRR_FIX4K_E0000);
2255 AsmWriteMsr64 (MSR_IA32_MTRR_FIX4K_E0000, Msr);
2256 @endcode
2257 **/
2258 #define MSR_IA32_MTRR_FIX4K_E0000 0x0000026C
2259
2260
2261 /**
2262 MTRRfix4K_E8000. If CPUID.01H: EDX.MTRR[12] =1.
2263
2264 @param ECX MSR_IA32_MTRR_FIX4K_E8000 (0x0000026D)
2265 @param EAX Lower 32-bits of MSR value.
2266 @param EDX Upper 32-bits of MSR value.
2267
2268 <b>Example usage</b>
2269 @code
2270 UINT64 Msr;
2271
2272 Msr = AsmReadMsr64 (MSR_IA32_MTRR_FIX4K_E8000);
2273 AsmWriteMsr64 (MSR_IA32_MTRR_FIX4K_E8000, Msr);
2274 @endcode
2275 **/
2276 #define MSR_IA32_MTRR_FIX4K_E8000 0x0000026D
2277
2278
2279 /**
2280 MTRRfix4K_F0000. If CPUID.01H: EDX.MTRR[12] =1.
2281
2282 @param ECX MSR_IA32_MTRR_FIX4K_F0000 (0x0000026E)
2283 @param EAX Lower 32-bits of MSR value.
2284 @param EDX Upper 32-bits of MSR value.
2285
2286 <b>Example usage</b>
2287 @code
2288 UINT64 Msr;
2289
2290 Msr = AsmReadMsr64 (MSR_IA32_MTRR_FIX4K_F0000);
2291 AsmWriteMsr64 (MSR_IA32_MTRR_FIX4K_F0000, Msr);
2292 @endcode
2293 **/
2294 #define MSR_IA32_MTRR_FIX4K_F0000 0x0000026E
2295
2296
2297 /**
2298 MTRRfix4K_F8000. If CPUID.01H: EDX.MTRR[12] =1.
2299
2300 @param ECX MSR_IA32_MTRR_FIX4K_F8000 (0x0000026F)
2301 @param EAX Lower 32-bits of MSR value.
2302 @param EDX Upper 32-bits of MSR value.
2303
2304 <b>Example usage</b>
2305 @code
2306 UINT64 Msr;
2307
2308 Msr = AsmReadMsr64 (MSR_IA32_MTRR_FIX4K_F8000);
2309 AsmWriteMsr64 (MSR_IA32_MTRR_FIX4K_F8000, Msr);
2310 @endcode
2311 **/
2312 #define MSR_IA32_MTRR_FIX4K_F8000 0x0000026F
2313
2314
2315 /**
2316 IA32_PAT (R/W). If CPUID.01H: EDX.MTRR[16] =1.
2317
2318 @param ECX MSR_IA32_PAT (0x00000277)
2319 @param EAX Lower 32-bits of MSR value.
2320 Described by the type MSR_IA32_PAT_REGISTER.
2321 @param EDX Upper 32-bits of MSR value.
2322 Described by the type MSR_IA32_PAT_REGISTER.
2323
2324 <b>Example usage</b>
2325 @code
2326 MSR_IA32_PAT_REGISTER Msr;
2327
2328 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_PAT);
2329 AsmWriteMsr64 (MSR_IA32_PAT, Msr.Uint64);
2330 @endcode
2331 **/
2332 #define MSR_IA32_PAT 0x00000277
2333
2334 /**
2335 MSR information returned for MSR index #MSR_IA32_PAT
2336 **/
2337 typedef union {
2338 ///
2339 /// Individual bit fields
2340 ///
2341 struct {
2342 ///
2343 /// [Bits 2:0] PA0.
2344 ///
2345 UINT32 PA0:3;
2346 UINT32 Reserved1:5;
2347 ///
2348 /// [Bits 10:8] PA1.
2349 ///
2350 UINT32 PA1:3;
2351 UINT32 Reserved2:5;
2352 ///
2353 /// [Bits 18:16] PA2.
2354 ///
2355 UINT32 PA2:3;
2356 UINT32 Reserved3:5;
2357 ///
2358 /// [Bits 26:24] PA3.
2359 ///
2360 UINT32 PA3:3;
2361 UINT32 Reserved4:5;
2362 ///
2363 /// [Bits 34:32] PA4.
2364 ///
2365 UINT32 PA4:3;
2366 UINT32 Reserved5:5;
2367 ///
2368 /// [Bits 42:40] PA5.
2369 ///
2370 UINT32 PA5:3;
2371 UINT32 Reserved6:5;
2372 ///
2373 /// [Bits 50:48] PA6.
2374 ///
2375 UINT32 PA6:3;
2376 UINT32 Reserved7:5;
2377 ///
2378 /// [Bits 58:56] PA7.
2379 ///
2380 UINT32 PA7:3;
2381 UINT32 Reserved8:5;
2382 } Bits;
2383 ///
2384 /// All bit fields as a 64-bit value
2385 ///
2386 UINT64 Uint64;
2387 } MSR_IA32_PAT_REGISTER;
2388
2389
2390 /**
2391 Provides the programming interface to use corrected MC error signaling
2392 capability (R/W). If IA32_MCG_CAP[10] = 1 && IA32_MCG_CAP[7:0] > n.
2393
2394 @param ECX MSR_IA32_MCn_CTL2
2395 @param EAX Lower 32-bits of MSR value.
2396 Described by the type MSR_IA32_MC_CTL2_REGISTER.
2397 @param EDX Upper 32-bits of MSR value.
2398 Described by the type MSR_IA32_MC_CTL2_REGISTER.
2399
2400 <b>Example usage</b>
2401 @code
2402 MSR_IA32_MC_CTL2_REGISTER Msr;
2403
2404 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_MC0_CTL2);
2405 AsmWriteMsr64 (MSR_IA32_MC0_CTL2, Msr.Uint64);
2406 @endcode
2407 @{
2408 **/
2409 #define MSR_IA32_MC0_CTL2 0x00000280
2410 #define MSR_IA32_MC1_CTL2 0x00000281
2411 #define MSR_IA32_MC2_CTL2 0x00000282
2412 #define MSR_IA32_MC3_CTL2 0x00000283
2413 #define MSR_IA32_MC4_CTL2 0x00000284
2414 #define MSR_IA32_MC5_CTL2 0x00000285
2415 #define MSR_IA32_MC6_CTL2 0x00000286
2416 #define MSR_IA32_MC7_CTL2 0x00000287
2417 #define MSR_IA32_MC8_CTL2 0x00000288
2418 #define MSR_IA32_MC9_CTL2 0x00000289
2419 #define MSR_IA32_MC10_CTL2 0x0000028A
2420 #define MSR_IA32_MC11_CTL2 0x0000028B
2421 #define MSR_IA32_MC12_CTL2 0x0000028C
2422 #define MSR_IA32_MC13_CTL2 0x0000028D
2423 #define MSR_IA32_MC14_CTL2 0x0000028E
2424 #define MSR_IA32_MC15_CTL2 0x0000028F
2425 #define MSR_IA32_MC16_CTL2 0x00000290
2426 #define MSR_IA32_MC17_CTL2 0x00000291
2427 #define MSR_IA32_MC18_CTL2 0x00000292
2428 #define MSR_IA32_MC19_CTL2 0x00000293
2429 #define MSR_IA32_MC20_CTL2 0x00000294
2430 #define MSR_IA32_MC21_CTL2 0x00000295
2431 #define MSR_IA32_MC22_CTL2 0x00000296
2432 #define MSR_IA32_MC23_CTL2 0x00000297
2433 #define MSR_IA32_MC24_CTL2 0x00000298
2434 #define MSR_IA32_MC25_CTL2 0x00000299
2435 #define MSR_IA32_MC26_CTL2 0x0000029A
2436 #define MSR_IA32_MC27_CTL2 0x0000029B
2437 #define MSR_IA32_MC28_CTL2 0x0000029C
2438 #define MSR_IA32_MC29_CTL2 0x0000029D
2439 #define MSR_IA32_MC30_CTL2 0x0000029E
2440 #define MSR_IA32_MC31_CTL2 0x0000029F
2441 /// @}
2442
2443 /**
2444 MSR information returned for MSR indexes #MSR_IA32_MC0_CTL2
2445 to #MSR_IA32_MC31_CTL2
2446 **/
2447 typedef union {
2448 ///
2449 /// Individual bit fields
2450 ///
2451 struct {
2452 ///
2453 /// [Bits 14:0] Corrected error count threshold.
2454 ///
2455 UINT32 CorrectedErrorCountThreshold:15;
2456 UINT32 Reserved1:15;
2457 ///
2458 /// [Bit 30] CMCI_EN.
2459 ///
2460 UINT32 CMCI_EN:1;
2461 UINT32 Reserved2:1;
2462 UINT32 Reserved3:32;
2463 } Bits;
2464 ///
2465 /// All bit fields as a 32-bit value
2466 ///
2467 UINT32 Uint32;
2468 ///
2469 /// All bit fields as a 64-bit value
2470 ///
2471 UINT64 Uint64;
2472 } MSR_IA32_MC_CTL2_REGISTER;
2473
2474
2475 /**
2476 MTRRdefType (R/W). If CPUID.01H: EDX.MTRR[12] =1.
2477
2478 @param ECX MSR_IA32_MTRR_DEF_TYPE (0x000002FF)
2479 @param EAX Lower 32-bits of MSR value.
2480 Described by the type MSR_IA32_MTRR_DEF_TYPE_REGISTER.
2481 @param EDX Upper 32-bits of MSR value.
2482 Described by the type MSR_IA32_MTRR_DEF_TYPE_REGISTER.
2483
2484 <b>Example usage</b>
2485 @code
2486 MSR_IA32_MTRR_DEF_TYPE_REGISTER Msr;
2487
2488 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_MTRR_DEF_TYPE);
2489 AsmWriteMsr64 (MSR_IA32_MTRR_DEF_TYPE, Msr.Uint64);
2490 @endcode
2491 **/
2492 #define MSR_IA32_MTRR_DEF_TYPE 0x000002FF
2493
2494 /**
2495 MSR information returned for MSR index #MSR_IA32_MTRR_DEF_TYPE
2496 **/
2497 typedef union {
2498 ///
2499 /// Individual bit fields
2500 ///
2501 struct {
2502 ///
2503 /// [Bits 2:0] Default Memory Type.
2504 ///
2505 UINT32 Type:3;
2506 UINT32 Reserved1:7;
2507 ///
2508 /// [Bit 10] Fixed Range MTRR Enable.
2509 ///
2510 UINT32 FE:1;
2511 ///
2512 /// [Bit 11] MTRR Enable.
2513 ///
2514 UINT32 E:1;
2515 UINT32 Reserved2:20;
2516 UINT32 Reserved3:32;
2517 } Bits;
2518 ///
2519 /// All bit fields as a 32-bit value
2520 ///
2521 UINT32 Uint32;
2522 ///
2523 /// All bit fields as a 64-bit value
2524 ///
2525 UINT64 Uint64;
2526 } MSR_IA32_MTRR_DEF_TYPE_REGISTER;
2527
2528
2529 /**
2530 Fixed-Function Performance Counter 0 (R/W): Counts Instr_Retired.Any. If
2531 CPUID.0AH: EDX[4:0] > 0.
2532
2533 @param ECX MSR_IA32_FIXED_CTR0 (0x00000309)
2534 @param EAX Lower 32-bits of MSR value.
2535 @param EDX Upper 32-bits of MSR value.
2536
2537 <b>Example usage</b>
2538 @code
2539 UINT64 Msr;
2540
2541 Msr = AsmReadMsr64 (MSR_IA32_FIXED_CTR0);
2542 AsmWriteMsr64 (MSR_IA32_FIXED_CTR0, Msr);
2543 @endcode
2544 **/
2545 #define MSR_IA32_FIXED_CTR0 0x00000309
2546
2547
2548 /**
2549 Fixed-Function Performance Counter 1 0 (R/W): Counts CPU_CLK_Unhalted.Core.
2550 If CPUID.0AH: EDX[4:0] > 1.
2551
2552 @param ECX MSR_IA32_FIXED_CTR1 (0x0000030A)
2553 @param EAX Lower 32-bits of MSR value.
2554 @param EDX Upper 32-bits of MSR value.
2555
2556 <b>Example usage</b>
2557 @code
2558 UINT64 Msr;
2559
2560 Msr = AsmReadMsr64 (MSR_IA32_FIXED_CTR1);
2561 AsmWriteMsr64 (MSR_IA32_FIXED_CTR1, Msr);
2562 @endcode
2563 **/
2564 #define MSR_IA32_FIXED_CTR1 0x0000030A
2565
2566
2567 /**
2568 Fixed-Function Performance Counter 0 0 (R/W): Counts CPU_CLK_Unhalted.Ref.
2569 If CPUID.0AH: EDX[4:0] > 2.
2570
2571 @param ECX MSR_IA32_FIXED_CTR2 (0x0000030B)
2572 @param EAX Lower 32-bits of MSR value.
2573 @param EDX Upper 32-bits of MSR value.
2574
2575 <b>Example usage</b>
2576 @code
2577 UINT64 Msr;
2578
2579 Msr = AsmReadMsr64 (MSR_IA32_FIXED_CTR2);
2580 AsmWriteMsr64 (MSR_IA32_FIXED_CTR2, Msr);
2581 @endcode
2582 **/
2583 #define MSR_IA32_FIXED_CTR2 0x0000030B
2584
2585
2586 /**
2587 RO. If CPUID.01H: ECX[15] = 1.
2588
2589 @param ECX MSR_IA32_PERF_CAPABILITIES (0x00000345)
2590 @param EAX Lower 32-bits of MSR value.
2591 Described by the type MSR_IA32_PERF_CAPABILITIES_REGISTER.
2592 @param EDX Upper 32-bits of MSR value.
2593 Described by the type MSR_IA32_PERF_CAPABILITIES_REGISTER.
2594
2595 <b>Example usage</b>
2596 @code
2597 MSR_IA32_PERF_CAPABILITIES_REGISTER Msr;
2598
2599 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_PERF_CAPABILITIES);
2600 AsmWriteMsr64 (MSR_IA32_PERF_CAPABILITIES, Msr.Uint64);
2601 @endcode
2602 **/
2603 #define MSR_IA32_PERF_CAPABILITIES 0x00000345
2604
2605 /**
2606 MSR information returned for MSR index #MSR_IA32_PERF_CAPABILITIES
2607 **/
2608 typedef union {
2609 ///
2610 /// Individual bit fields
2611 ///
2612 struct {
2613 ///
2614 /// [Bits 5:0] LBR format.
2615 ///
2616 UINT32 LBR_FMT:6;
2617 ///
2618 /// [Bit 6] PEBS Trap.
2619 ///
2620 UINT32 PEBS_TRAP:1;
2621 ///
2622 /// [Bit 7] PEBSSaveArchRegs.
2623 ///
2624 UINT32 PEBS_ARCH_REG:1;
2625 ///
2626 /// [Bits 11:8] PEBS Record Format.
2627 ///
2628 UINT32 PEBS_REC_FMT:4;
2629 ///
2630 /// [Bit 12] 1: Freeze while SMM is supported.
2631 ///
2632 UINT32 SMM_FREEZE:1;
2633 ///
2634 /// [Bit 13] 1: Full width of counter writable via IA32_A_PMCx.
2635 ///
2636 UINT32 FW_WRITE:1;
2637 UINT32 Reserved1:18;
2638 UINT32 Reserved2:32;
2639 } Bits;
2640 ///
2641 /// All bit fields as a 32-bit value
2642 ///
2643 UINT32 Uint32;
2644 ///
2645 /// All bit fields as a 64-bit value
2646 ///
2647 UINT64 Uint64;
2648 } MSR_IA32_PERF_CAPABILITIES_REGISTER;
2649
2650
2651 /**
2652 Fixed-Function Performance Counter Control (R/W) Counter increments while
2653 the results of ANDing respective enable bit in IA32_PERF_GLOBAL_CTRL with
2654 the corresponding OS or USR bits in this MSR is true. If CPUID.0AH: EAX[7:0]
2655 > 1.
2656
2657 @param ECX MSR_IA32_FIXED_CTR_CTRL (0x0000038D)
2658 @param EAX Lower 32-bits of MSR value.
2659 Described by the type MSR_IA32_FIXED_CTR_CTRL_REGISTER.
2660 @param EDX Upper 32-bits of MSR value.
2661 Described by the type MSR_IA32_FIXED_CTR_CTRL_REGISTER.
2662
2663 <b>Example usage</b>
2664 @code
2665 MSR_IA32_FIXED_CTR_CTRL_REGISTER Msr;
2666
2667 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_FIXED_CTR_CTRL);
2668 AsmWriteMsr64 (MSR_IA32_FIXED_CTR_CTRL, Msr.Uint64);
2669 @endcode
2670 **/
2671 #define MSR_IA32_FIXED_CTR_CTRL 0x0000038D
2672
2673 /**
2674 MSR information returned for MSR index #MSR_IA32_FIXED_CTR_CTRL
2675 **/
2676 typedef union {
2677 ///
2678 /// Individual bit fields
2679 ///
2680 struct {
2681 ///
2682 /// [Bit 0] EN0_OS: Enable Fixed Counter 0 to count while CPL = 0.
2683 ///
2684 UINT32 EN0_OS:1;
2685 ///
2686 /// [Bit 1] EN0_Usr: Enable Fixed Counter 0 to count while CPL > 0.
2687 ///
2688 UINT32 EN0_Usr:1;
2689 ///
2690 /// [Bit 2] AnyThread: When set to 1, it enables counting the associated
2691 /// event conditions occurring across all logical processors sharing a
2692 /// processor core. When set to 0, the counter only increments the
2693 /// associated event conditions occurring in the logical processor which
2694 /// programmed the MSR. If CPUID.0AH: EAX[7:0] > 2.
2695 ///
2696 UINT32 AnyThread0:1;
2697 ///
2698 /// [Bit 3] EN0_PMI: Enable PMI when fixed counter 0 overflows.
2699 ///
2700 UINT32 EN0_PMI:1;
2701 ///
2702 /// [Bit 4] EN1_OS: Enable Fixed Counter 1 to count while CPL = 0.
2703 ///
2704 UINT32 EN1_OS:1;
2705 ///
2706 /// [Bit 5] EN1_Usr: Enable Fixed Counter 1 to count while CPL > 0.
2707 ///
2708 UINT32 EN1_Usr:1;
2709 ///
2710 /// [Bit 6] AnyThread: When set to 1, it enables counting the associated
2711 /// event conditions occurring across all logical processors sharing a
2712 /// processor core. When set to 0, the counter only increments the
2713 /// associated event conditions occurring in the logical processor which
2714 /// programmed the MSR. If CPUID.0AH: EAX[7:0] > 2.
2715 ///
2716 UINT32 AnyThread1:1;
2717 ///
2718 /// [Bit 7] EN1_PMI: Enable PMI when fixed counter 1 overflows.
2719 ///
2720 UINT32 EN1_PMI:1;
2721 ///
2722 /// [Bit 8] EN2_OS: Enable Fixed Counter 2 to count while CPL = 0.
2723 ///
2724 UINT32 EN2_OS:1;
2725 ///
2726 /// [Bit 9] EN2_Usr: Enable Fixed Counter 2 to count while CPL > 0.
2727 ///
2728 UINT32 EN2_Usr:1;
2729 ///
2730 /// [Bit 10] AnyThread: When set to 1, it enables counting the associated
2731 /// event conditions occurring across all logical processors sharing a
2732 /// processor core. When set to 0, the counter only increments the
2733 /// associated event conditions occurring in the logical processor which
2734 /// programmed the MSR. If CPUID.0AH: EAX[7:0] > 2.
2735 ///
2736 UINT32 AnyThread2:1;
2737 ///
2738 /// [Bit 11] EN2_PMI: Enable PMI when fixed counter 2 overflows.
2739 ///
2740 UINT32 EN2_PMI:1;
2741 UINT32 Reserved1:20;
2742 UINT32 Reserved2:32;
2743 } Bits;
2744 ///
2745 /// All bit fields as a 32-bit value
2746 ///
2747 UINT32 Uint32;
2748 ///
2749 /// All bit fields as a 64-bit value
2750 ///
2751 UINT64 Uint64;
2752 } MSR_IA32_FIXED_CTR_CTRL_REGISTER;
2753
2754
2755 /**
2756 Global Performance Counter Status (RO). If CPUID.0AH: EAX[7:0] > 0.
2757
2758 @param ECX MSR_IA32_PERF_GLOBAL_STATUS (0x0000038E)
2759 @param EAX Lower 32-bits of MSR value.
2760 Described by the type MSR_IA32_PERF_GLOBAL_STATUS_REGISTER.
2761 @param EDX Upper 32-bits of MSR value.
2762 Described by the type MSR_IA32_PERF_GLOBAL_STATUS_REGISTER.
2763
2764 <b>Example usage</b>
2765 @code
2766 MSR_IA32_PERF_GLOBAL_STATUS_REGISTER Msr;
2767
2768 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_PERF_GLOBAL_STATUS);
2769 @endcode
2770 **/
2771 #define MSR_IA32_PERF_GLOBAL_STATUS 0x0000038E
2772
2773 /**
2774 MSR information returned for MSR index #MSR_IA32_PERF_GLOBAL_STATUS
2775 **/
2776 typedef union {
2777 ///
2778 /// Individual bit fields
2779 ///
2780 struct {
2781 ///
2782 /// [Bit 0] Ovf_PMC0: Overflow status of IA32_PMC0. If CPUID.0AH:
2783 /// EAX[15:8] > 0.
2784 ///
2785 UINT32 Ovf_PMC0:1;
2786 ///
2787 /// [Bit 1] Ovf_PMC1: Overflow status of IA32_PMC1. If CPUID.0AH:
2788 /// EAX[15:8] > 1.
2789 ///
2790 UINT32 Ovf_PMC1:1;
2791 ///
2792 /// [Bit 2] Ovf_PMC2: Overflow status of IA32_PMC2. If CPUID.0AH:
2793 /// EAX[15:8] > 2.
2794 ///
2795 UINT32 Ovf_PMC2:1;
2796 ///
2797 /// [Bit 3] Ovf_PMC3: Overflow status of IA32_PMC3. If CPUID.0AH:
2798 /// EAX[15:8] > 3.
2799 ///
2800 UINT32 Ovf_PMC3:1;
2801 UINT32 Reserved1:28;
2802 ///
2803 /// [Bit 32] Ovf_FixedCtr0: Overflow status of IA32_FIXED_CTR0. If
2804 /// CPUID.0AH: EAX[7:0] > 1.
2805 ///
2806 UINT32 Ovf_FixedCtr0:1;
2807 ///
2808 /// [Bit 33] Ovf_FixedCtr1: Overflow status of IA32_FIXED_CTR1. If
2809 /// CPUID.0AH: EAX[7:0] > 1.
2810 ///
2811 UINT32 Ovf_FixedCtr1:1;
2812 ///
2813 /// [Bit 34] Ovf_FixedCtr2: Overflow status of IA32_FIXED_CTR2. If
2814 /// CPUID.0AH: EAX[7:0] > 1.
2815 ///
2816 UINT32 Ovf_FixedCtr2:1;
2817 UINT32 Reserved2:20;
2818 ///
2819 /// [Bit 55] Trace_ToPA_PMI: A PMI occurred due to a ToPA entry memory
2820 /// buffer was completely filled. If (CPUID.(EAX=07H, ECX=0):EBX[25] = 1)
2821 /// && IA32_RTIT_CTL.ToPA = 1.
2822 ///
2823 UINT32 Trace_ToPA_PMI:1;
2824 UINT32 Reserved3:2;
2825 ///
2826 /// [Bit 58] LBR_Frz: LBRs are frozen due to -
2827 /// IA32_DEBUGCTL.FREEZE_LBR_ON_PMI=1, - The LBR stack overflowed. If
2828 /// CPUID.0AH: EAX[7:0] > 3.
2829 ///
2830 UINT32 LBR_Frz:1;
2831 ///
2832 /// [Bit 59] CTR_Frz: Performance counters in the core PMU are frozen due
2833 /// to - IA32_DEBUGCTL.FREEZE_PERFMON_ON_ PMI=1, - one or more core PMU
2834 /// counters overflowed. If CPUID.0AH: EAX[7:0] > 3.
2835 ///
2836 UINT32 CTR_Frz:1;
2837 ///
2838 /// [Bit 60] ASCI: Data in the performance counters in the core PMU may
2839 /// include contributions from the direct or indirect operation intel SGX
2840 /// to protect an enclave. If CPUID.(EAX=07H, ECX=0):EBX[2] = 1.
2841 ///
2842 UINT32 ASCI:1;
2843 ///
2844 /// [Bit 61] Ovf_Uncore: Uncore counter overflow status. If CPUID.0AH:
2845 /// EAX[7:0] > 2.
2846 ///
2847 UINT32 Ovf_Uncore:1;
2848 ///
2849 /// [Bit 62] OvfBuf: DS SAVE area Buffer overflow status. If CPUID.0AH:
2850 /// EAX[7:0] > 0.
2851 ///
2852 UINT32 OvfBuf:1;
2853 ///
2854 /// [Bit 63] CondChgd: status bits of this register has changed. If
2855 /// CPUID.0AH: EAX[7:0] > 0.
2856 ///
2857 UINT32 CondChgd:1;
2858 } Bits;
2859 ///
2860 /// All bit fields as a 64-bit value
2861 ///
2862 UINT64 Uint64;
2863 } MSR_IA32_PERF_GLOBAL_STATUS_REGISTER;
2864
2865
2866 /**
2867 Global Performance Counter Control (R/W) Counter increments while the result
2868 of ANDing respective enable bit in this MSR with the corresponding OS or USR
2869 bits in the general-purpose or fixed counter control MSR is true. If
2870 CPUID.0AH: EAX[7:0] > 0.
2871
2872 @param ECX MSR_IA32_PERF_GLOBAL_CTRL (0x0000038F)
2873 @param EAX Lower 32-bits of MSR value.
2874 Described by the type MSR_IA32_PERF_GLOBAL_CTRL_REGISTER.
2875 @param EDX Upper 32-bits of MSR value.
2876 Described by the type MSR_IA32_PERF_GLOBAL_CTRL_REGISTER.
2877
2878 <b>Example usage</b>
2879 @code
2880 MSR_IA32_PERF_GLOBAL_CTRL_REGISTER Msr;
2881
2882 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_PERF_GLOBAL_CTRL);
2883 AsmWriteMsr64 (MSR_IA32_PERF_GLOBAL_CTRL, Msr.Uint64);
2884 @endcode
2885 **/
2886 #define MSR_IA32_PERF_GLOBAL_CTRL 0x0000038F
2887
2888 /**
2889 MSR information returned for MSR index #MSR_IA32_PERF_GLOBAL_CTRL
2890 **/
2891 typedef union {
2892 ///
2893 /// Individual bit fields
2894 ///
2895 struct {
2896 ///
2897 /// [Bits 31:0] EN_PMCn. If CPUID.0AH: EAX[15:8] > n.
2898 /// Enable bitmask. Only the first n-1 bits are valid.
2899 /// Bits n..31 are reserved.
2900 ///
2901 UINT32 EN_PMCn:32;
2902 ///
2903 /// [Bits 63:32] EN_FIXED_CTRn. If CPUID.0AH: EDX[4:0] > n.
2904 /// Enable bitmask. Only the first n-1 bits are valid.
2905 /// Bits 31:n are reserved.
2906 ///
2907 UINT32 EN_FIXED_CTRn:32;
2908 } Bits;
2909 ///
2910 /// All bit fields as a 64-bit value
2911 ///
2912 UINT64 Uint64;
2913 } MSR_IA32_PERF_GLOBAL_CTRL_REGISTER;
2914
2915
2916 /**
2917 Global Performance Counter Overflow Control (R/W). If CPUID.0AH: EAX[7:0] >
2918 0 && CPUID.0AH: EAX[7:0] <= 3.
2919
2920 @param ECX MSR_IA32_PERF_GLOBAL_OVF_CTRL (0x00000390)
2921 @param EAX Lower 32-bits of MSR value.
2922 Described by the type MSR_IA32_PERF_GLOBAL_OVF_CTRL_REGISTER.
2923 @param EDX Upper 32-bits of MSR value.
2924 Described by the type MSR_IA32_PERF_GLOBAL_OVF_CTRL_REGISTER.
2925
2926 <b>Example usage</b>
2927 @code
2928 MSR_IA32_PERF_GLOBAL_OVF_CTRL_REGISTER Msr;
2929
2930 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_PERF_GLOBAL_OVF_CTRL);
2931 AsmWriteMsr64 (MSR_IA32_PERF_GLOBAL_OVF_CTRL, Msr.Uint64);
2932 @endcode
2933 **/
2934 #define MSR_IA32_PERF_GLOBAL_OVF_CTRL 0x00000390
2935
2936 /**
2937 MSR information returned for MSR index #MSR_IA32_PERF_GLOBAL_OVF_CTRL
2938 **/
2939 typedef union {
2940 ///
2941 /// Individual bit fields
2942 ///
2943 struct {
2944 ///
2945 /// [Bits 31:0] Set 1 to Clear Ovf_PMC0 bit. If CPUID.0AH: EAX[15:8] > n.
2946 /// Clear bitmask. Only the first n-1 bits are valid.
2947 /// Bits 31:n are reserved.
2948 ///
2949 UINT32 Ovf_PMCn:32;
2950 ///
2951 /// [Bits 54:32] Set 1 to Clear Ovf_FIXED_CTR0 bit.
2952 /// If CPUID.0AH: EDX[4:0] > n.
2953 /// Clear bitmask. Only the first n-1 bits are valid.
2954 /// Bits 22:n are reserved.
2955 ///
2956 UINT32 Ovf_FIXED_CTRn:23;
2957 ///
2958 /// [Bit 55] Set 1 to Clear Trace_ToPA_PMI bit. If (CPUID.(EAX=07H,
2959 /// ECX=0):EBX[25] = 1) && IA32_RTIT_CTL.ToPA = 1.
2960 ///
2961 UINT32 Trace_ToPA_PMI:1;
2962 UINT32 Reserved2:5;
2963 ///
2964 /// [Bit 61] Set 1 to Clear Ovf_Uncore bit. Introduced at Display Family /
2965 /// Display Model 06_2EH.
2966 ///
2967 UINT32 Ovf_Uncore:1;
2968 ///
2969 /// [Bit 62] Set 1 to Clear OvfBuf: bit. If CPUID.0AH: EAX[7:0] > 0.
2970 ///
2971 UINT32 OvfBuf:1;
2972 ///
2973 /// [Bit 63] Set to 1to clear CondChgd: bit. If CPUID.0AH: EAX[7:0] > 0.
2974 ///
2975 UINT32 CondChgd:1;
2976 } Bits;
2977 ///
2978 /// All bit fields as a 64-bit value
2979 ///
2980 UINT64 Uint64;
2981 } MSR_IA32_PERF_GLOBAL_OVF_CTRL_REGISTER;
2982
2983
2984 /**
2985 Global Performance Counter Overflow Reset Control (R/W). If CPUID.0AH:
2986 EAX[7:0] > 3.
2987
2988 @param ECX MSR_IA32_PERF_GLOBAL_STATUS_RESET (0x00000390)
2989 @param EAX Lower 32-bits of MSR value.
2990 Described by the type MSR_IA32_PERF_GLOBAL_STATUS_RESET_REGISTER.
2991 @param EDX Upper 32-bits of MSR value.
2992 Described by the type MSR_IA32_PERF_GLOBAL_STATUS_RESET_REGISTER.
2993
2994 <b>Example usage</b>
2995 @code
2996 MSR_IA32_PERF_GLOBAL_STATUS_RESET_REGISTER Msr;
2997
2998 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_PERF_GLOBAL_STATUS_RESET);
2999 AsmWriteMsr64 (MSR_IA32_PERF_GLOBAL_STATUS_RESET, Msr.Uint64);
3000 @endcode
3001 **/
3002 #define MSR_IA32_PERF_GLOBAL_STATUS_RESET 0x00000390
3003
3004 /**
3005 MSR information returned for MSR index #MSR_IA32_PERF_GLOBAL_STATUS_RESET
3006 **/
3007 typedef union {
3008 ///
3009 /// Individual bit fields
3010 ///
3011 struct {
3012 ///
3013 /// [Bits 31:0] Set 1 to Clear Ovf_PMC0 bit. If CPUID.0AH: EAX[15:8] > n.
3014 /// Clear bitmask. Only the first n-1 bits are valid.
3015 /// Bits 31:n are reserved.
3016 ///
3017 UINT32 Ovf_PMCn:32;
3018 ///
3019 /// [Bits 54:32] Set 1 to Clear Ovf_FIXED_CTR0 bit.
3020 /// If CPUID.0AH: EDX[4:0] > n.
3021 /// Clear bitmask. Only the first n-1 bits are valid.
3022 /// Bits 22:n are reserved.
3023 ///
3024 UINT32 Ovf_FIXED_CTRn:23;
3025 ///
3026 /// [Bit 55] Set 1 to Clear Trace_ToPA_PMI bit. If (CPUID.(EAX=07H,
3027 /// ECX=0):EBX[25] = 1) && IA32_RTIT_CTL.ToPA[8] = 1.
3028 ///
3029 UINT32 Trace_ToPA_PMI:1;
3030 UINT32 Reserved2:2;
3031 ///
3032 /// [Bit 58] Set 1 to Clear LBR_Frz bit. If CPUID.0AH: EAX[7:0] > 3.
3033 ///
3034 UINT32 LBR_Frz:1;
3035 ///
3036 /// [Bit 59] Set 1 to Clear CTR_Frz bit. If CPUID.0AH: EAX[7:0] > 3.
3037 ///
3038 UINT32 CTR_Frz:1;
3039 ///
3040 /// [Bit 60] Set 1 to Clear ASCI bit. If CPUID.0AH: EAX[7:0] > 3.
3041 ///
3042 UINT32 ASCI:1;
3043 ///
3044 /// [Bit 61] Set 1 to Clear Ovf_Uncore bit. Introduced at Display Family /
3045 /// Display Model 06_2EH.
3046 ///
3047 UINT32 Ovf_Uncore:1;
3048 ///
3049 /// [Bit 62] Set 1 to Clear OvfBuf: bit. If CPUID.0AH: EAX[7:0] > 0.
3050 ///
3051 UINT32 OvfBuf:1;
3052 ///
3053 /// [Bit 63] Set to 1to clear CondChgd: bit. If CPUID.0AH: EAX[7:0] > 0.
3054 ///
3055 UINT32 CondChgd:1;
3056 } Bits;
3057 ///
3058 /// All bit fields as a 64-bit value
3059 ///
3060 UINT64 Uint64;
3061 } MSR_IA32_PERF_GLOBAL_STATUS_RESET_REGISTER;
3062
3063
3064 /**
3065 Global Performance Counter Overflow Set Control (R/W). If CPUID.0AH:
3066 EAX[7:0] > 3.
3067
3068 @param ECX MSR_IA32_PERF_GLOBAL_STATUS_SET (0x00000391)
3069 @param EAX Lower 32-bits of MSR value.
3070 Described by the type MSR_IA32_PERF_GLOBAL_STATUS_SET_REGISTER.
3071 @param EDX Upper 32-bits of MSR value.
3072 Described by the type MSR_IA32_PERF_GLOBAL_STATUS_SET_REGISTER.
3073
3074 <b>Example usage</b>
3075 @code
3076 MSR_IA32_PERF_GLOBAL_STATUS_SET_REGISTER Msr;
3077
3078 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_PERF_GLOBAL_STATUS_SET);
3079 AsmWriteMsr64 (MSR_IA32_PERF_GLOBAL_STATUS_SET, Msr.Uint64);
3080 @endcode
3081 **/
3082 #define MSR_IA32_PERF_GLOBAL_STATUS_SET 0x00000391
3083
3084 /**
3085 MSR information returned for MSR index #MSR_IA32_PERF_GLOBAL_STATUS_SET
3086 **/
3087 typedef union {
3088 ///
3089 /// Individual bit fields
3090 ///
3091 struct {
3092 ///
3093 /// [Bits 31:0] Set 1 to cause Ovf_PMCn = 1. If CPUID.0AH: EAX[7:0] > n.
3094 /// Set bitmask. Only the first n-1 bits are valid.
3095 /// Bits 31:n are reserved.
3096 ///
3097 UINT32 Ovf_PMCn:32;
3098 ///
3099 /// [Bits 54:32] Set 1 to cause Ovf_FIXED_CTRn = 1.
3100 /// If CPUID.0AH: EAX[7:0] > n.
3101 /// Set bitmask. Only the first n-1 bits are valid.
3102 /// Bits 22:n are reserved.
3103 ///
3104 UINT32 Ovf_FIXED_CTRn:23;
3105 ///
3106 /// [Bit 55] Set 1 to cause Trace_ToPA_PMI = 1. If CPUID.0AH: EAX[7:0] > 3.
3107 ///
3108 UINT32 Trace_ToPA_PMI:1;
3109 UINT32 Reserved2:2;
3110 ///
3111 /// [Bit 58] Set 1 to cause LBR_Frz = 1. If CPUID.0AH: EAX[7:0] > 3.
3112 ///
3113 UINT32 LBR_Frz:1;
3114 ///
3115 /// [Bit 59] Set 1 to cause CTR_Frz = 1. If CPUID.0AH: EAX[7:0] > 3.
3116 ///
3117 UINT32 CTR_Frz:1;
3118 ///
3119 /// [Bit 60] Set 1 to cause ASCI = 1. If CPUID.0AH: EAX[7:0] > 3.
3120 ///
3121 UINT32 ASCI:1;
3122 ///
3123 /// [Bit 61] Set 1 to cause Ovf_Uncore = 1. If CPUID.0AH: EAX[7:0] > 3.
3124 ///
3125 UINT32 Ovf_Uncore:1;
3126 ///
3127 /// [Bit 62] Set 1 to cause OvfBuf = 1. If CPUID.0AH: EAX[7:0] > 3.
3128 ///
3129 UINT32 OvfBuf:1;
3130 UINT32 Reserved3:1;
3131 } Bits;
3132 ///
3133 /// All bit fields as a 64-bit value
3134 ///
3135 UINT64 Uint64;
3136 } MSR_IA32_PERF_GLOBAL_STATUS_SET_REGISTER;
3137
3138
3139 /**
3140 Indicator of core perfmon interface is in use (RO). If CPUID.0AH: EAX[7:0] >
3141 3.
3142
3143 @param ECX MSR_IA32_PERF_GLOBAL_INUSE (0x00000392)
3144 @param EAX Lower 32-bits of MSR value.
3145 Described by the type MSR_IA32_PERF_GLOBAL_INUSE_REGISTER.
3146 @param EDX Upper 32-bits of MSR value.
3147 Described by the type MSR_IA32_PERF_GLOBAL_INUSE_REGISTER.
3148
3149 <b>Example usage</b>
3150 @code
3151 MSR_IA32_PERF_GLOBAL_INUSE_REGISTER Msr;
3152
3153 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_PERF_GLOBAL_INUSE);
3154 @endcode
3155 **/
3156 #define MSR_IA32_PERF_GLOBAL_INUSE 0x00000392
3157
3158 /**
3159 MSR information returned for MSR index #MSR_IA32_PERF_GLOBAL_INUSE
3160 **/
3161 typedef union {
3162 ///
3163 /// Individual bit fields
3164 ///
3165 struct {
3166 ///
3167 /// [Bits 31:0] IA32_PERFEVTSELn in use. If CPUID.0AH: EAX[7:0] > n.
3168 /// Status bitmask. Only the first n-1 bits are valid.
3169 /// Bits 31:n are reserved.
3170 ///
3171 UINT32 IA32_PERFEVTSELn:32;
3172 ///
3173 /// [Bits 62:32] IA32_FIXED_CTRn in use.
3174 /// If CPUID.0AH: EAX[7:0] > n.
3175 /// Status bitmask. Only the first n-1 bits are valid.
3176 /// Bits 30:n are reserved.
3177 ///
3178 UINT32 IA32_FIXED_CTRn:31;
3179 ///
3180 /// [Bit 63] PMI in use.
3181 ///
3182 UINT32 PMI:1;
3183 } Bits;
3184 ///
3185 /// All bit fields as a 64-bit value
3186 ///
3187 UINT64 Uint64;
3188 } MSR_IA32_PERF_GLOBAL_INUSE_REGISTER;
3189
3190
3191 /**
3192 PEBS Control (R/W).
3193
3194 @param ECX MSR_IA32_PEBS_ENABLE (0x000003F1)
3195 @param EAX Lower 32-bits of MSR value.
3196 Described by the type MSR_IA32_PEBS_ENABLE_REGISTER.
3197 @param EDX Upper 32-bits of MSR value.
3198 Described by the type MSR_IA32_PEBS_ENABLE_REGISTER.
3199
3200 <b>Example usage</b>
3201 @code
3202 MSR_IA32_PEBS_ENABLE_REGISTER Msr;
3203
3204 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_PEBS_ENABLE);
3205 AsmWriteMsr64 (MSR_IA32_PEBS_ENABLE, Msr.Uint64);
3206 @endcode
3207 **/
3208 #define MSR_IA32_PEBS_ENABLE 0x000003F1
3209
3210 /**
3211 MSR information returned for MSR index #MSR_IA32_PEBS_ENABLE
3212 **/
3213 typedef union {
3214 ///
3215 /// Individual bit fields
3216 ///
3217 struct {
3218 ///
3219 /// [Bit 0] Enable PEBS on IA32_PMC0. Introduced at Display Family /
3220 /// Display Model 06_0FH.
3221 ///
3222 UINT32 Enable:1;
3223 ///
3224 /// [Bits 3:1] Reserved or Model specific.
3225 ///
3226 UINT32 Reserved1:3;
3227 UINT32 Reserved2:28;
3228 ///
3229 /// [Bits 35:32] Reserved or Model specific.
3230 ///
3231 UINT32 Reserved3:4;
3232 UINT32 Reserved4:28;
3233 } Bits;
3234 ///
3235 /// All bit fields as a 64-bit value
3236 ///
3237 UINT64 Uint64;
3238 } MSR_IA32_PEBS_ENABLE_REGISTER;
3239
3240
3241 /**
3242 MCn_CTL. If IA32_MCG_CAP.CNT > n.
3243
3244 @param ECX MSR_IA32_MCn_CTL
3245 @param EAX Lower 32-bits of MSR value.
3246 @param EDX Upper 32-bits of MSR value.
3247
3248 <b>Example usage</b>
3249 @code
3250 UINT64 Msr;
3251
3252 Msr = AsmReadMsr64 (MSR_IA32_MC0_CTL);
3253 AsmWriteMsr64 (MSR_IA32_MC0_CTL, Msr);
3254 @endcode
3255 @{
3256 **/
3257 #define MSR_IA32_MC0_CTL 0x00000400
3258 #define MSR_IA32_MC1_CTL 0x00000404
3259 #define MSR_IA32_MC2_CTL 0x00000408
3260 #define MSR_IA32_MC3_CTL 0x0000040C
3261 #define MSR_IA32_MC4_CTL 0x00000410
3262 #define MSR_IA32_MC5_CTL 0x00000414
3263 #define MSR_IA32_MC6_CTL 0x00000418
3264 #define MSR_IA32_MC7_CTL 0x0000041C
3265 #define MSR_IA32_MC8_CTL 0x00000420
3266 #define MSR_IA32_MC9_CTL 0x00000424
3267 #define MSR_IA32_MC10_CTL 0x00000428
3268 #define MSR_IA32_MC11_CTL 0x0000042C
3269 #define MSR_IA32_MC12_CTL 0x00000430
3270 #define MSR_IA32_MC13_CTL 0x00000434
3271 #define MSR_IA32_MC14_CTL 0x00000438
3272 #define MSR_IA32_MC15_CTL 0x0000043C
3273 #define MSR_IA32_MC16_CTL 0x00000440
3274 #define MSR_IA32_MC17_CTL 0x00000444
3275 #define MSR_IA32_MC18_CTL 0x00000448
3276 #define MSR_IA32_MC19_CTL 0x0000044C
3277 #define MSR_IA32_MC20_CTL 0x00000450
3278 #define MSR_IA32_MC21_CTL 0x00000454
3279 #define MSR_IA32_MC22_CTL 0x00000458
3280 #define MSR_IA32_MC23_CTL 0x0000045C
3281 #define MSR_IA32_MC24_CTL 0x00000460
3282 #define MSR_IA32_MC25_CTL 0x00000464
3283 #define MSR_IA32_MC26_CTL 0x00000468
3284 #define MSR_IA32_MC27_CTL 0x0000046C
3285 #define MSR_IA32_MC28_CTL 0x00000470
3286 /// @}
3287
3288
3289 /**
3290 MCn_STATUS. If IA32_MCG_CAP.CNT > n.
3291
3292 @param ECX MSR_IA32_MCn_STATUS
3293 @param EAX Lower 32-bits of MSR value.
3294 @param EDX Upper 32-bits of MSR value.
3295
3296 <b>Example usage</b>
3297 @code
3298 UINT64 Msr;
3299
3300 Msr = AsmReadMsr64 (MSR_IA32_MC0_STATUS);
3301 AsmWriteMsr64 (MSR_IA32_MC0_STATUS, Msr);
3302 @endcode
3303 @{
3304 **/
3305 #define MSR_IA32_MC0_STATUS 0x00000401
3306 #define MSR_IA32_MC1_STATUS 0x00000405
3307 #define MSR_IA32_MC2_STATUS 0x00000409
3308 #define MSR_IA32_MC3_STATUS 0x0000040D
3309 #define MSR_IA32_MC4_STATUS 0x00000411
3310 #define MSR_IA32_MC5_STATUS 0x00000415
3311 #define MSR_IA32_MC6_STATUS 0x00000419
3312 #define MSR_IA32_MC7_STATUS 0x0000041D
3313 #define MSR_IA32_MC8_STATUS 0x00000421
3314 #define MSR_IA32_MC9_STATUS 0x00000425
3315 #define MSR_IA32_MC10_STATUS 0x00000429
3316 #define MSR_IA32_MC11_STATUS 0x0000042D
3317 #define MSR_IA32_MC12_STATUS 0x00000431
3318 #define MSR_IA32_MC13_STATUS 0x00000435
3319 #define MSR_IA32_MC14_STATUS 0x00000439
3320 #define MSR_IA32_MC15_STATUS 0x0000043D
3321 #define MSR_IA32_MC16_STATUS 0x00000441
3322 #define MSR_IA32_MC17_STATUS 0x00000445
3323 #define MSR_IA32_MC18_STATUS 0x00000449
3324 #define MSR_IA32_MC19_STATUS 0x0000044D
3325 #define MSR_IA32_MC20_STATUS 0x00000451
3326 #define MSR_IA32_MC21_STATUS 0x00000455
3327 #define MSR_IA32_MC22_STATUS 0x00000459
3328 #define MSR_IA32_MC23_STATUS 0x0000045D
3329 #define MSR_IA32_MC24_STATUS 0x00000461
3330 #define MSR_IA32_MC25_STATUS 0x00000465
3331 #define MSR_IA32_MC26_STATUS 0x00000469
3332 #define MSR_IA32_MC27_STATUS 0x0000046D
3333 #define MSR_IA32_MC28_STATUS 0x00000471
3334 /// @}
3335
3336
3337 /**
3338 MCn_ADDR. If IA32_MCG_CAP.CNT > n.
3339
3340 @param ECX MSR_IA32_MCn_ADDR
3341 @param EAX Lower 32-bits of MSR value.
3342 @param EDX Upper 32-bits of MSR value.
3343
3344 <b>Example usage</b>
3345 @code
3346 UINT64 Msr;
3347
3348 Msr = AsmReadMsr64 (MSR_IA32_MC0_ADDR);
3349 AsmWriteMsr64 (MSR_IA32_MC0_ADDR, Msr);
3350 @endcode
3351 @{
3352 **/
3353 #define MSR_IA32_MC0_ADDR 0x00000402
3354 #define MSR_IA32_MC1_ADDR 0x00000406
3355 #define MSR_IA32_MC2_ADDR 0x0000040A
3356 #define MSR_IA32_MC3_ADDR 0x0000040E
3357 #define MSR_IA32_MC4_ADDR 0x00000412
3358 #define MSR_IA32_MC5_ADDR 0x00000416
3359 #define MSR_IA32_MC6_ADDR 0x0000041A
3360 #define MSR_IA32_MC7_ADDR 0x0000041E
3361 #define MSR_IA32_MC8_ADDR 0x00000422
3362 #define MSR_IA32_MC9_ADDR 0x00000426
3363 #define MSR_IA32_MC10_ADDR 0x0000042A
3364 #define MSR_IA32_MC11_ADDR 0x0000042E
3365 #define MSR_IA32_MC12_ADDR 0x00000432
3366 #define MSR_IA32_MC13_ADDR 0x00000436
3367 #define MSR_IA32_MC14_ADDR 0x0000043A
3368 #define MSR_IA32_MC15_ADDR 0x0000043E
3369 #define MSR_IA32_MC16_ADDR 0x00000442
3370 #define MSR_IA32_MC17_ADDR 0x00000446
3371 #define MSR_IA32_MC18_ADDR 0x0000044A
3372 #define MSR_IA32_MC19_ADDR 0x0000044E
3373 #define MSR_IA32_MC20_ADDR 0x00000452
3374 #define MSR_IA32_MC21_ADDR 0x00000456
3375 #define MSR_IA32_MC22_ADDR 0x0000045A
3376 #define MSR_IA32_MC23_ADDR 0x0000045E
3377 #define MSR_IA32_MC24_ADDR 0x00000462
3378 #define MSR_IA32_MC25_ADDR 0x00000466
3379 #define MSR_IA32_MC26_ADDR 0x0000046A
3380 #define MSR_IA32_MC27_ADDR 0x0000046E
3381 #define MSR_IA32_MC28_ADDR 0x00000472
3382 /// @}
3383
3384
3385 /**
3386 MCn_MISC. If IA32_MCG_CAP.CNT > n.
3387
3388 @param ECX MSR_IA32_MCn_MISC
3389 @param EAX Lower 32-bits of MSR value.
3390 @param EDX Upper 32-bits of MSR value.
3391
3392 <b>Example usage</b>
3393 @code
3394 UINT64 Msr;
3395
3396 Msr = AsmReadMsr64 (MSR_IA32_MC0_MISC);
3397 AsmWriteMsr64 (MSR_IA32_MC0_MISC, Msr);
3398 @endcode
3399 @{
3400 **/
3401 #define MSR_IA32_MC0_MISC 0x00000403
3402 #define MSR_IA32_MC1_MISC 0x00000407
3403 #define MSR_IA32_MC2_MISC 0x0000040B
3404 #define MSR_IA32_MC3_MISC 0x0000040F
3405 #define MSR_IA32_MC4_MISC 0x00000413
3406 #define MSR_IA32_MC5_MISC 0x00000417
3407 #define MSR_IA32_MC6_MISC 0x0000041B
3408 #define MSR_IA32_MC7_MISC 0x0000041F
3409 #define MSR_IA32_MC8_MISC 0x00000423
3410 #define MSR_IA32_MC9_MISC 0x00000427
3411 #define MSR_IA32_MC10_MISC 0x0000042B
3412 #define MSR_IA32_MC11_MISC 0x0000042F
3413 #define MSR_IA32_MC12_MISC 0x00000433
3414 #define MSR_IA32_MC13_MISC 0x00000437
3415 #define MSR_IA32_MC14_MISC 0x0000043B
3416 #define MSR_IA32_MC15_MISC 0x0000043F
3417 #define MSR_IA32_MC16_MISC 0x00000443
3418 #define MSR_IA32_MC17_MISC 0x00000447
3419 #define MSR_IA32_MC18_MISC 0x0000044B
3420 #define MSR_IA32_MC19_MISC 0x0000044F
3421 #define MSR_IA32_MC20_MISC 0x00000453
3422 #define MSR_IA32_MC21_MISC 0x00000457
3423 #define MSR_IA32_MC22_MISC 0x0000045B
3424 #define MSR_IA32_MC23_MISC 0x0000045F
3425 #define MSR_IA32_MC24_MISC 0x00000463
3426 #define MSR_IA32_MC25_MISC 0x00000467
3427 #define MSR_IA32_MC26_MISC 0x0000046B
3428 #define MSR_IA32_MC27_MISC 0x0000046F
3429 #define MSR_IA32_MC28_MISC 0x00000473
3430 /// @}
3431
3432
3433 /**
3434 Reporting Register of Basic VMX Capabilities (R/O) See Appendix A.1, "Basic
3435 VMX Information.". If CPUID.01H:ECX.[5] = 1.
3436
3437 @param ECX MSR_IA32_VMX_BASIC (0x00000480)
3438 @param EAX Lower 32-bits of MSR value.
3439 @param EDX Upper 32-bits of MSR value.
3440
3441 <b>Example usage</b>
3442 @code
3443 UINT64 Msr;
3444
3445 Msr = AsmReadMsr64 (MSR_IA32_VMX_BASIC);
3446 @endcode
3447 **/
3448 #define MSR_IA32_VMX_BASIC 0x00000480
3449
3450
3451 /**
3452 Capability Reporting Register of Pinbased VM-execution Controls (R/O) See
3453 Appendix A.3.1, "Pin-Based VMExecution Controls.". If CPUID.01H:ECX.[5] = 1.
3454
3455 @param ECX MSR_IA32_VMX_PINBASED_CTLS (0x00000481)
3456 @param EAX Lower 32-bits of MSR value.
3457 @param EDX Upper 32-bits of MSR value.
3458
3459 <b>Example usage</b>
3460 @code
3461 UINT64 Msr;
3462
3463 Msr = AsmReadMsr64 (MSR_IA32_VMX_PINBASED_CTLS);
3464 @endcode
3465 **/
3466 #define MSR_IA32_VMX_PINBASED_CTLS 0x00000481
3467
3468
3469 /**
3470 Capability Reporting Register of Primary Processor-based VM-execution
3471 Controls (R/O) See Appendix A.3.2, "Primary Processor- Based VM-Execution
3472 Controls.". If CPUID.01H:ECX.[5] = 1.
3473
3474 @param ECX MSR_IA32_VMX_PROCBASED_CTLS (0x00000482)
3475 @param EAX Lower 32-bits of MSR value.
3476 @param EDX Upper 32-bits of MSR value.
3477
3478 <b>Example usage</b>
3479 @code
3480 UINT64 Msr;
3481
3482 Msr = AsmReadMsr64 (MSR_IA32_VMX_PROCBASED_CTLS);
3483 @endcode
3484 **/
3485 #define MSR_IA32_VMX_PROCBASED_CTLS 0x00000482
3486
3487
3488 /**
3489 Capability Reporting Register of VM-exit Controls (R/O) See Appendix A.4,
3490 "VM-Exit Controls.". If CPUID.01H:ECX.[5] = 1.
3491
3492 @param ECX MSR_IA32_VMX_EXIT_CTLS (0x00000483)
3493 @param EAX Lower 32-bits of MSR value.
3494 @param EDX Upper 32-bits of MSR value.
3495
3496 <b>Example usage</b>
3497 @code
3498 UINT64 Msr;
3499
3500 Msr = AsmReadMsr64 (MSR_IA32_VMX_EXIT_CTLS);
3501 @endcode
3502 **/
3503 #define MSR_IA32_VMX_EXIT_CTLS 0x00000483
3504
3505
3506 /**
3507 Capability Reporting Register of VMentry Controls (R/O) See Appendix A.5,
3508 "VM-Entry Controls.". If CPUID.01H:ECX.[5] = 1.
3509
3510 @param ECX MSR_IA32_VMX_ENTRY_CTLS (0x00000484)
3511 @param EAX Lower 32-bits of MSR value.
3512 @param EDX Upper 32-bits of MSR value.
3513
3514 <b>Example usage</b>
3515 @code
3516 UINT64 Msr;
3517
3518 Msr = AsmReadMsr64 (MSR_IA32_VMX_ENTRY_CTLS);
3519 @endcode
3520 **/
3521 #define MSR_IA32_VMX_ENTRY_CTLS 0x00000484
3522
3523
3524 /**
3525 Reporting Register of Miscellaneous VMX Capabilities (R/O) See Appendix A.6,
3526 "Miscellaneous Data.". If CPUID.01H:ECX.[5] = 1.
3527
3528 @param ECX MSR_IA32_VMX_MISC (0x00000485)
3529 @param EAX Lower 32-bits of MSR value.
3530 @param EDX Upper 32-bits of MSR value.
3531
3532 <b>Example usage</b>
3533 @code
3534 UINT64 Msr;
3535
3536 Msr = AsmReadMsr64 (MSR_IA32_VMX_MISC);
3537 @endcode
3538 **/
3539 #define MSR_IA32_VMX_MISC 0x00000485
3540
3541
3542 /**
3543 Capability Reporting Register of CR0 Bits Fixed to 0 (R/O) See Appendix A.7,
3544 "VMX-Fixed Bits in CR0.". If CPUID.01H:ECX.[5] = 1.
3545
3546 @param ECX MSR_IA32_VMX_CR0_FIXED0 (0x00000486)
3547 @param EAX Lower 32-bits of MSR value.
3548 @param EDX Upper 32-bits of MSR value.
3549
3550 <b>Example usage</b>
3551 @code
3552 UINT64 Msr;
3553
3554 Msr = AsmReadMsr64 (MSR_IA32_VMX_CR0_FIXED0);
3555 @endcode
3556 **/
3557 #define MSR_IA32_VMX_CR0_FIXED0 0x00000486
3558
3559
3560 /**
3561 Capability Reporting Register of CR0 Bits Fixed to 1 (R/O) See Appendix A.7,
3562 "VMX-Fixed Bits in CR0.". If CPUID.01H:ECX.[5] = 1.
3563
3564 @param ECX MSR_IA32_VMX_CR0_FIXED1 (0x00000487)
3565 @param EAX Lower 32-bits of MSR value.
3566 @param EDX Upper 32-bits of MSR value.
3567
3568 <b>Example usage</b>
3569 @code
3570 UINT64 Msr;
3571
3572 Msr = AsmReadMsr64 (MSR_IA32_VMX_CR0_FIXED1);
3573 @endcode
3574 **/
3575 #define MSR_IA32_VMX_CR0_FIXED1 0x00000487
3576
3577
3578 /**
3579 Capability Reporting Register of CR4 Bits Fixed to 0 (R/O) See Appendix A.8,
3580 "VMX-Fixed Bits in CR4.". If CPUID.01H:ECX.[5] = 1.
3581
3582 @param ECX MSR_IA32_VMX_CR4_FIXED0 (0x00000488)
3583 @param EAX Lower 32-bits of MSR value.
3584 @param EDX Upper 32-bits of MSR value.
3585
3586 <b>Example usage</b>
3587 @code
3588 UINT64 Msr;
3589
3590 Msr = AsmReadMsr64 (MSR_IA32_VMX_CR4_FIXED0);
3591 @endcode
3592 **/
3593 #define MSR_IA32_VMX_CR4_FIXED0 0x00000488
3594
3595
3596 /**
3597 Capability Reporting Register of CR4 Bits Fixed to 1 (R/O) See Appendix A.8,
3598 "VMX-Fixed Bits in CR4.". If CPUID.01H:ECX.[5] = 1.
3599
3600 @param ECX MSR_IA32_VMX_CR4_FIXED1 (0x00000489)
3601 @param EAX Lower 32-bits of MSR value.
3602 @param EDX Upper 32-bits of MSR value.
3603
3604 <b>Example usage</b>
3605 @code
3606 UINT64 Msr;
3607
3608 Msr = AsmReadMsr64 (MSR_IA32_VMX_CR4_FIXED1);
3609 @endcode
3610 **/
3611 #define MSR_IA32_VMX_CR4_FIXED1 0x00000489
3612
3613
3614 /**
3615 Capability Reporting Register of VMCS Field Enumeration (R/O) See Appendix
3616 A.9, "VMCS Enumeration.". If CPUID.01H:ECX.[5] = 1.
3617
3618 @param ECX MSR_IA32_VMX_VMCS_ENUM (0x0000048A)
3619 @param EAX Lower 32-bits of MSR value.
3620 @param EDX Upper 32-bits of MSR value.
3621
3622 <b>Example usage</b>
3623 @code
3624 UINT64 Msr;
3625
3626 Msr = AsmReadMsr64 (MSR_IA32_VMX_VMCS_ENUM);
3627 @endcode
3628 **/
3629 #define MSR_IA32_VMX_VMCS_ENUM 0x0000048A
3630
3631
3632 /**
3633 Capability Reporting Register of Secondary Processor-based VM-execution
3634 Controls (R/O) See Appendix A.3.3, "Secondary Processor- Based VM-Execution
3635 Controls.". If ( CPUID.01H:ECX.[5] && IA32_VMX_PROCBASED_C TLS[63]).
3636
3637 @param ECX MSR_IA32_VMX_PROCBASED_CTLS2 (0x0000048B)
3638 @param EAX Lower 32-bits of MSR value.
3639 @param EDX Upper 32-bits of MSR value.
3640
3641 <b>Example usage</b>
3642 @code
3643 UINT64 Msr;
3644
3645 Msr = AsmReadMsr64 (MSR_IA32_VMX_PROCBASED_CTLS2);
3646 @endcode
3647 **/
3648 #define MSR_IA32_VMX_PROCBASED_CTLS2 0x0000048B
3649
3650
3651 /**
3652 Capability Reporting Register of EPT and VPID (R/O) See Appendix A.10,
3653 "VPID and EPT Capabilities.". If ( CPUID.01H:ECX.[5] && IA32_VMX_PROCBASED_C
3654 TLS[63] && ( IA32_VMX_PROCBASED_C TLS2[33] IA32_VMX_PROCBASED_C TLS2[37]) ).
3655
3656 @param ECX MSR_IA32_VMX_EPT_VPID_CAP (0x0000048C)
3657 @param EAX Lower 32-bits of MSR value.
3658 @param EDX Upper 32-bits of MSR value.
3659
3660 <b>Example usage</b>
3661 @code
3662 UINT64 Msr;
3663
3664 Msr = AsmReadMsr64 (MSR_IA32_VMX_EPT_VPID_CAP);
3665 @endcode
3666 **/
3667 #define MSR_IA32_VMX_EPT_VPID_CAP 0x0000048C
3668
3669
3670 /**
3671 Capability Reporting Register of Pinbased VM-execution Flex Controls (R/O)
3672 See Appendix A.3.1, "Pin-Based VMExecution Controls.". If (
3673 CPUID.01H:ECX.[5] = 1 && IA32_VMX_BASIC[55] ).
3674
3675 @param ECX MSR_IA32_VMX_TRUE_PINBASED_CTLS (0x0000048D)
3676 @param EAX Lower 32-bits of MSR value.
3677 @param EDX Upper 32-bits of MSR value.
3678
3679 <b>Example usage</b>
3680 @code
3681 UINT64 Msr;
3682
3683 Msr = AsmReadMsr64 (MSR_IA32_VMX_TRUE_PINBASED_CTLS);
3684 @endcode
3685 **/
3686 #define MSR_IA32_VMX_TRUE_PINBASED_CTLS 0x0000048D
3687
3688
3689 /**
3690 Capability Reporting Register of Primary Processor-based VM-execution Flex
3691 Controls (R/O) See Appendix A.3.2, "Primary Processor- Based VM-Execution
3692 Controls.". If( CPUID.01H:ECX.[5] = 1 && IA32_VMX_BASIC[55] ).
3693
3694 @param ECX MSR_IA32_VMX_TRUE_PROCBASED_CTLS (0x0000048E)
3695 @param EAX Lower 32-bits of MSR value.
3696 @param EDX Upper 32-bits of MSR value.
3697
3698 <b>Example usage</b>
3699 @code
3700 UINT64 Msr;
3701
3702 Msr = AsmReadMsr64 (MSR_IA32_VMX_TRUE_PROCBASED_CTLS);
3703 @endcode
3704 **/
3705 #define MSR_IA32_VMX_TRUE_PROCBASED_CTLS 0x0000048E
3706
3707
3708 /**
3709 Capability Reporting Register of VM-exit Flex Controls (R/O) See Appendix
3710 A.4, "VM-Exit Controls.". If( CPUID.01H:ECX.[5] = 1 && IA32_VMX_BASIC[55] ).
3711
3712 @param ECX MSR_IA32_VMX_TRUE_EXIT_CTLS (0x0000048F)
3713 @param EAX Lower 32-bits of MSR value.
3714 @param EDX Upper 32-bits of MSR value.
3715
3716 <b>Example usage</b>
3717 @code
3718 UINT64 Msr;
3719
3720 Msr = AsmReadMsr64 (MSR_IA32_VMX_TRUE_EXIT_CTLS);
3721 @endcode
3722 **/
3723 #define MSR_IA32_VMX_TRUE_EXIT_CTLS 0x0000048F
3724
3725
3726 /**
3727 Capability Reporting Register of VMentry Flex Controls (R/O) See Appendix
3728 A.5, "VM-Entry Controls.". If( CPUID.01H:ECX.[5] = 1 && IA32_VMX_BASIC[55] ).
3729
3730 @param ECX MSR_IA32_VMX_TRUE_ENTRY_CTLS (0x00000490)
3731 @param EAX Lower 32-bits of MSR value.
3732 @param EDX Upper 32-bits of MSR value.
3733
3734 <b>Example usage</b>
3735 @code
3736 UINT64 Msr;
3737
3738 Msr = AsmReadMsr64 (MSR_IA32_VMX_TRUE_ENTRY_CTLS);
3739 @endcode
3740 **/
3741 #define MSR_IA32_VMX_TRUE_ENTRY_CTLS 0x00000490
3742
3743
3744 /**
3745 Capability Reporting Register of VMfunction Controls (R/O). If(
3746 CPUID.01H:ECX.[5] = 1 && IA32_VMX_BASIC[55] ).
3747
3748 @param ECX MSR_IA32_VMX_VMFUNC (0x00000491)
3749 @param EAX Lower 32-bits of MSR value.
3750 @param EDX Upper 32-bits of MSR value.
3751
3752 <b>Example usage</b>
3753 @code
3754 UINT64 Msr;
3755
3756 Msr = AsmReadMsr64 (MSR_IA32_VMX_VMFUNC);
3757 @endcode
3758 **/
3759 #define MSR_IA32_VMX_VMFUNC 0x00000491
3760
3761
3762 /**
3763 Full Width Writable IA32_PMCn Alias (R/W). (If CPUID.0AH: EAX[15:8] > n) &&
3764 IA32_PERF_CAPABILITIES[ 13] = 1.
3765
3766 @param ECX MSR_IA32_A_PMCn
3767 @param EAX Lower 32-bits of MSR value.
3768 @param EDX Upper 32-bits of MSR value.
3769
3770 <b>Example usage</b>
3771 @code
3772 UINT64 Msr;
3773
3774 Msr = AsmReadMsr64 (MSR_IA32_A_PMC0);
3775 AsmWriteMsr64 (MSR_IA32_A_PMC0, Msr);
3776 @endcode
3777 @{
3778 **/
3779 #define MSR_IA32_A_PMC0 0x000004C1
3780 #define MSR_IA32_A_PMC1 0x000004C2
3781 #define MSR_IA32_A_PMC2 0x000004C3
3782 #define MSR_IA32_A_PMC3 0x000004C4
3783 #define MSR_IA32_A_PMC4 0x000004C5
3784 #define MSR_IA32_A_PMC5 0x000004C6
3785 #define MSR_IA32_A_PMC6 0x000004C7
3786 #define MSR_IA32_A_PMC7 0x000004C8
3787 /// @}
3788
3789
3790 /**
3791 (R/W). If IA32_MCG_CAP.LMCE_P =1.
3792
3793 @param ECX MSR_IA32_MCG_EXT_CTL (0x000004D0)
3794 @param EAX Lower 32-bits of MSR value.
3795 Described by the type MSR_IA32_MCG_EXT_CTL_REGISTER.
3796 @param EDX Upper 32-bits of MSR value.
3797 Described by the type MSR_IA32_MCG_EXT_CTL_REGISTER.
3798
3799 <b>Example usage</b>
3800 @code
3801 MSR_IA32_MCG_EXT_CTL_REGISTER Msr;
3802
3803 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_MCG_EXT_CTL);
3804 AsmWriteMsr64 (MSR_IA32_MCG_EXT_CTL, Msr.Uint64);
3805 @endcode
3806 **/
3807 #define MSR_IA32_MCG_EXT_CTL 0x000004D0
3808
3809 /**
3810 MSR information returned for MSR index #MSR_IA32_MCG_EXT_CTL
3811 **/
3812 typedef union {
3813 ///
3814 /// Individual bit fields
3815 ///
3816 struct {
3817 ///
3818 /// [Bit 0] LMCE_EN.
3819 ///
3820 UINT32 LMCE_EN:1;
3821 UINT32 Reserved1:31;
3822 UINT32 Reserved2:32;
3823 } Bits;
3824 ///
3825 /// All bit fields as a 32-bit value
3826 ///
3827 UINT32 Uint32;
3828 ///
3829 /// All bit fields as a 64-bit value
3830 ///
3831 UINT64 Uint64;
3832 } MSR_IA32_MCG_EXT_CTL_REGISTER;
3833
3834
3835 /**
3836 Status and SVN Threshold of SGX Support for ACM (RO). If CPUID.(EAX=07H,
3837 ECX=0H): EBX[2] = 1.
3838
3839 @param ECX MSR_IA32_SGX_SVN_STATUS (0x00000500)
3840 @param EAX Lower 32-bits of MSR value.
3841 Described by the type MSR_IA32_SGX_SVN_STATUS_REGISTER.
3842 @param EDX Upper 32-bits of MSR value.
3843 Described by the type MSR_IA32_SGX_SVN_STATUS_REGISTER.
3844
3845 <b>Example usage</b>
3846 @code
3847 MSR_IA32_SGX_SVN_STATUS_REGISTER Msr;
3848
3849 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_SGX_SVN_STATUS);
3850 @endcode
3851 **/
3852 #define MSR_IA32_SGX_SVN_STATUS 0x00000500
3853
3854 /**
3855 MSR information returned for MSR index #MSR_IA32_SGX_SVN_STATUS
3856 **/
3857 typedef union {
3858 ///
3859 /// Individual bit fields
3860 ///
3861 struct {
3862 ///
3863 /// [Bit 0] Lock. See Section 42.12.3, "Interactions with Authenticated
3864 /// Code Modules (ACMs)".
3865 ///
3866 UINT32 Lock:1;
3867 UINT32 Reserved1:15;
3868 ///
3869 /// [Bits 23:16] SGX_SVN_SINIT. See Section 42.12.3, "Interactions with
3870 /// Authenticated Code Modules (ACMs)".
3871 ///
3872 UINT32 SGX_SVN_SINIT:8;
3873 UINT32 Reserved2:8;
3874 UINT32 Reserved3:32;
3875 } Bits;
3876 ///
3877 /// All bit fields as a 32-bit value
3878 ///
3879 UINT32 Uint32;
3880 ///
3881 /// All bit fields as a 64-bit value
3882 ///
3883 UINT64 Uint64;
3884 } MSR_IA32_SGX_SVN_STATUS_REGISTER;
3885
3886
3887 /**
3888 Trace Output Base Register (R/W). If ((CPUID.(EAX=07H, ECX=0):EBX[25] = 1)
3889 && ( (CPUID.(EAX=14H,ECX=0): ECX[0] = 1) (CPUID.(EAX=14H,ECX=0): ECX[2] = 1)
3890 ) ).
3891
3892 @param ECX MSR_IA32_RTIT_OUTPUT_BASE (0x00000560)
3893 @param EAX Lower 32-bits of MSR value.
3894 Described by the type MSR_IA32_RTIT_OUTPUT_BASE_REGISTER.
3895 @param EDX Upper 32-bits of MSR value.
3896 Described by the type MSR_IA32_RTIT_OUTPUT_BASE_REGISTER.
3897
3898 <b>Example usage</b>
3899 @code
3900 MSR_IA32_RTIT_OUTPUT_BASE_REGISTER Msr;
3901
3902 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_RTIT_OUTPUT_BASE);
3903 AsmWriteMsr64 (MSR_IA32_RTIT_OUTPUT_BASE, Msr.Uint64);
3904 @endcode
3905 **/
3906 #define MSR_IA32_RTIT_OUTPUT_BASE 0x00000560
3907
3908 /**
3909 MSR information returned for MSR index #MSR_IA32_RTIT_OUTPUT_BASE
3910 **/
3911 typedef union {
3912 ///
3913 /// Individual bit fields
3914 ///
3915 struct {
3916 UINT32 Reserved:7;
3917 ///
3918 /// [Bits 31:7] Base physical address.
3919 ///
3920 UINT32 Base:25;
3921 ///
3922 /// [Bits 63:32] Base physical address.
3923 ///
3924 UINT32 BaseHi:32;
3925 } Bits;
3926 ///
3927 /// All bit fields as a 64-bit value
3928 ///
3929 UINT64 Uint64;
3930 } MSR_IA32_RTIT_OUTPUT_BASE_REGISTER;
3931
3932
3933 /**
3934 Trace Output Mask Pointers Register (R/W). If ((CPUID.(EAX=07H,
3935 ECX=0):EBX[25] = 1) && ( (CPUID.(EAX=14H,ECX=0): ECX[0] = 1)
3936 (CPUID.(EAX=14H,ECX=0): ECX[2] = 1) ) ).
3937
3938 @param ECX MSR_IA32_RTIT_OUTPUT_MASK_PTRS (0x00000561)
3939 @param EAX Lower 32-bits of MSR value.
3940 Described by the type MSR_IA32_RTIT_OUTPUT_MASK_PTRS_REGISTER.
3941 @param EDX Upper 32-bits of MSR value.
3942 Described by the type MSR_IA32_RTIT_OUTPUT_MASK_PTRS_REGISTER.
3943
3944 <b>Example usage</b>
3945 @code
3946 MSR_IA32_RTIT_OUTPUT_MASK_PTRS_REGISTER Msr;
3947
3948 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_RTIT_OUTPUT_MASK_PTRS);
3949 AsmWriteMsr64 (MSR_IA32_RTIT_OUTPUT_MASK_PTRS, Msr.Uint64);
3950 @endcode
3951 **/
3952 #define MSR_IA32_RTIT_OUTPUT_MASK_PTRS 0x00000561
3953
3954 /**
3955 MSR information returned for MSR index #MSR_IA32_RTIT_OUTPUT_MASK_PTRS
3956 **/
3957 typedef union {
3958 ///
3959 /// Individual bit fields
3960 ///
3961 struct {
3962 UINT32 Reserved:7;
3963 ///
3964 /// [Bits 31:7] MaskOrTableOffset.
3965 ///
3966 UINT32 MaskOrTableOffset:25;
3967 ///
3968 /// [Bits 63:32] Output Offset.
3969 ///
3970 UINT32 OutputOffset:32;
3971 } Bits;
3972 ///
3973 /// All bit fields as a 64-bit value
3974 ///
3975 UINT64 Uint64;
3976 } MSR_IA32_RTIT_OUTPUT_MASK_PTRS_REGISTER;
3977
3978
3979 /**
3980 Trace Control Register (R/W). If (CPUID.(EAX=07H, ECX=0):EBX[25] = 1).
3981
3982 @param ECX MSR_IA32_RTIT_CTL (0x00000570)
3983 @param EAX Lower 32-bits of MSR value.
3984 Described by the type MSR_IA32_RTIT_CTL_REGISTER.
3985 @param EDX Upper 32-bits of MSR value.
3986 Described by the type MSR_IA32_RTIT_CTL_REGISTER.
3987
3988 <b>Example usage</b>
3989 @code
3990 MSR_IA32_RTIT_CTL_REGISTER Msr;
3991
3992 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_RTIT_CTL);
3993 AsmWriteMsr64 (MSR_IA32_RTIT_CTL, Msr.Uint64);
3994 @endcode
3995 **/
3996 #define MSR_IA32_RTIT_CTL 0x00000570
3997
3998 /**
3999 MSR information returned for MSR index #MSR_IA32_RTIT_CTL
4000 **/
4001 typedef union {
4002 ///
4003 /// Individual bit fields
4004 ///
4005 struct {
4006 ///
4007 /// [Bit 0] TraceEn.
4008 ///
4009 UINT32 TraceEn:1;
4010 ///
4011 /// [Bit 1] CYCEn. If (CPUID.(EAX=07H, ECX=0):EBX[1] = 1).
4012 ///
4013 UINT32 CYCEn:1;
4014 ///
4015 /// [Bit 2] OS.
4016 ///
4017 UINT32 OS:1;
4018 ///
4019 /// [Bit 3] User.
4020 ///
4021 UINT32 User:1;
4022 UINT32 Reserved1:2;
4023 ///
4024 /// [Bit 6] FabricEn. If (CPUID.(EAX=07H, ECX=0):ECX[3] = 1).
4025 ///
4026 UINT32 FabricEn:1;
4027 ///
4028 /// [Bit 7] CR3 filter.
4029 ///
4030 UINT32 CR3:1;
4031 ///
4032 /// [Bit 8] ToPA.
4033 ///
4034 UINT32 ToPA:1;
4035 ///
4036 /// [Bit 9] MTCEn. If (CPUID.(EAX=07H, ECX=0):EBX[3] = 1).
4037 ///
4038 UINT32 MTCEn:1;
4039 ///
4040 /// [Bit 10] TSCEn.
4041 ///
4042 UINT32 TSCEn:1;
4043 ///
4044 /// [Bit 11] DisRETC.
4045 ///
4046 UINT32 DisRETC:1;
4047 UINT32 Reserved2:1;
4048 ///
4049 /// [Bit 13] BranchEn.
4050 ///
4051 UINT32 BranchEn:1;
4052 ///
4053 /// [Bits 17:14] MTCFreq. If (CPUID.(EAX=07H, ECX=0):EBX[3] = 1).
4054 ///
4055 UINT32 MTCFreq:4;
4056 UINT32 Reserved3:1;
4057 ///
4058 /// [Bits 22:19] CYCThresh. If (CPUID.(EAX=07H, ECX=0):EBX[1] = 1).
4059 ///
4060 UINT32 CYCThresh:4;
4061 UINT32 Reserved4:1;
4062 ///
4063 /// [Bits 27:24] PSBFreq. If (CPUID.(EAX=07H, ECX=0):EBX[1] = 1).
4064 ///
4065 UINT32 PSBFreq:4;
4066 UINT32 Reserved5:4;
4067 ///
4068 /// [Bits 35:32] ADDR0_CFG. If (CPUID.(EAX=07H, ECX=1):EAX[2:0] > 0).
4069 ///
4070 UINT32 ADDR0_CFG:4;
4071 ///
4072 /// [Bits 39:36] ADDR1_CFG. If (CPUID.(EAX=07H, ECX=1):EAX[2:0] > 1).
4073 ///
4074 UINT32 ADDR1_CFG:4;
4075 ///
4076 /// [Bits 43:40] ADDR2_CFG. If (CPUID.(EAX=07H, ECX=1):EAX[2:0] > 2).
4077 ///
4078 UINT32 ADDR2_CFG:4;
4079 ///
4080 /// [Bits 47:44] ADDR3_CFG. If (CPUID.(EAX=07H, ECX=1):EAX[2:0] > 3).
4081 ///
4082 UINT32 ADDR3_CFG:4;
4083 UINT32 Reserved6:16;
4084 } Bits;
4085 ///
4086 /// All bit fields as a 64-bit value
4087 ///
4088 UINT64 Uint64;
4089 } MSR_IA32_RTIT_CTL_REGISTER;
4090
4091
4092 /**
4093 Tracing Status Register (R/W). If (CPUID.(EAX=07H, ECX=0):EBX[25] = 1).
4094
4095 @param ECX MSR_IA32_RTIT_STATUS (0x00000571)
4096 @param EAX Lower 32-bits of MSR value.
4097 Described by the type MSR_IA32_RTIT_STATUS_REGISTER.
4098 @param EDX Upper 32-bits of MSR value.
4099 Described by the type MSR_IA32_RTIT_STATUS_REGISTER.
4100
4101 <b>Example usage</b>
4102 @code
4103 MSR_IA32_RTIT_STATUS_REGISTER Msr;
4104
4105 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_RTIT_STATUS);
4106 AsmWriteMsr64 (MSR_IA32_RTIT_STATUS, Msr.Uint64);
4107 @endcode
4108 **/
4109 #define MSR_IA32_RTIT_STATUS 0x00000571
4110
4111 /**
4112 MSR information returned for MSR index #MSR_IA32_RTIT_STATUS
4113 **/
4114 typedef union {
4115 ///
4116 /// Individual bit fields
4117 ///
4118 struct {
4119 ///
4120 /// [Bit 0] FilterEn, (writes ignored).
4121 /// If (CPUID.(EAX=07H, ECX=0):EBX[2] = 1).
4122 ///
4123 UINT32 FilterEn:1;
4124 ///
4125 /// [Bit 1] ContexEn, (writes ignored).
4126 ///
4127 UINT32 ContexEn:1;
4128 ///
4129 /// [Bit 2] TriggerEn, (writes ignored).
4130 ///
4131 UINT32 TriggerEn:1;
4132 UINT32 Reserved1:1;
4133 ///
4134 /// [Bit 4] Error.
4135 ///
4136 UINT32 Error:1;
4137 ///
4138 /// [Bit 5] Stopped.
4139 ///
4140 UINT32 Stopped:1;
4141 UINT32 Reserved2:26;
4142 ///
4143 /// [Bits 48:32] PacketByteCnt. If (CPUID.(EAX=07H, ECX=0):EBX[1] > 3).
4144 ///
4145 UINT32 PacketByteCnt:17;
4146 UINT32 Reserved3:15;
4147 } Bits;
4148 ///
4149 /// All bit fields as a 64-bit value
4150 ///
4151 UINT64 Uint64;
4152 } MSR_IA32_RTIT_STATUS_REGISTER;
4153
4154
4155 /**
4156 Trace Filter CR3 Match Register (R/W).
4157 If (CPUID.(EAX=07H, ECX=0):EBX[25] = 1).
4158
4159 @param ECX MSR_IA32_RTIT_CR3_MATCH (0x00000572)
4160 @param EAX Lower 32-bits of MSR value.
4161 Described by the type MSR_IA32_RTIT_CR3_MATCH_REGISTER.
4162 @param EDX Upper 32-bits of MSR value.
4163 Described by the type MSR_IA32_RTIT_CR3_MATCH_REGISTER.
4164
4165 <b>Example usage</b>
4166 @code
4167 MSR_IA32_RTIT_CR3_MATCH_REGISTER Msr;
4168
4169 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_RTIT_CR3_MATCH);
4170 AsmWriteMsr64 (MSR_IA32_RTIT_CR3_MATCH, Msr.Uint64);
4171 @endcode
4172 **/
4173 #define MSR_IA32_RTIT_CR3_MATCH 0x00000572
4174
4175 /**
4176 MSR information returned for MSR index #MSR_IA32_RTIT_CR3_MATCH
4177 **/
4178 typedef union {
4179 ///
4180 /// Individual bit fields
4181 ///
4182 struct {
4183 UINT32 Reserved:5;
4184 ///
4185 /// [Bits 31:5] CR3[63:5] value to match.
4186 ///
4187 UINT32 Cr3:27;
4188 ///
4189 /// [Bits 63:32] CR3[63:5] value to match.
4190 ///
4191 UINT32 Cr3Hi:32;
4192 } Bits;
4193 ///
4194 /// All bit fields as a 64-bit value
4195 ///
4196 UINT64 Uint64;
4197 } MSR_IA32_RTIT_CR3_MATCH_REGISTER;
4198
4199
4200 /**
4201 Region n Start Address (R/W). If (CPUID.(EAX=07H, ECX=1):EAX[2:0] > n).
4202
4203 @param ECX MSR_IA32_RTIT_ADDRn_A
4204 @param EAX Lower 32-bits of MSR value.
4205 Described by the type MSR_IA32_RTIT_ADDR_REGISTER.
4206 @param EDX Upper 32-bits of MSR value.
4207 Described by the type MSR_IA32_RTIT_ADDR_REGISTER.
4208
4209 <b>Example usage</b>
4210 @code
4211 MSR_IA32_RTIT_ADDR_REGISTER Msr;
4212
4213 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_RTIT_ADDR0_A);
4214 AsmWriteMsr64 (MSR_IA32_RTIT_ADDR0_A, Msr.Uint64);
4215 @endcode
4216 @{
4217 **/
4218 #define MSR_IA32_RTIT_ADDR0_A 0x00000580
4219 #define MSR_IA32_RTIT_ADDR1_A 0x00000582
4220 #define MSR_IA32_RTIT_ADDR2_A 0x00000584
4221 #define MSR_IA32_RTIT_ADDR3_A 0x00000586
4222 /// @}
4223
4224
4225 /**
4226 Region n End Address (R/W). If (CPUID.(EAX=07H, ECX=1):EAX[2:0] > n).
4227
4228 @param ECX MSR_IA32_RTIT_ADDRn_B
4229 @param EAX Lower 32-bits of MSR value.
4230 Described by the type MSR_IA32_RTIT_ADDR_REGISTER.
4231 @param EDX Upper 32-bits of MSR value.
4232 Described by the type MSR_IA32_RTIT_ADDR_REGISTER.
4233
4234 <b>Example usage</b>
4235 @code
4236 MSR_IA32_RTIT_ADDR_REGISTER Msr;
4237
4238 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_RTIT_ADDR0_B);
4239 AsmWriteMsr64 (MSR_IA32_RTIT_ADDR0_B, Msr.Uint64);
4240 @endcode
4241 @{
4242 **/
4243 #define MSR_IA32_RTIT_ADDR0_B 0x00000581
4244 #define MSR_IA32_RTIT_ADDR1_B 0x00000583
4245 #define MSR_IA32_RTIT_ADDR2_B 0x00000585
4246 #define MSR_IA32_RTIT_ADDR3_B 0x00000587
4247 /// @}
4248
4249
4250 /**
4251 MSR information returned for MSR indexes
4252 #MSR_IA32_RTIT_ADDR0_A to #MSR_IA32_RTIT_ADDR3_A and
4253 #MSR_IA32_RTIT_ADDR0_B to #MSR_IA32_RTIT_ADDR3_B
4254 **/
4255 typedef union {
4256 ///
4257 /// Individual bit fields
4258 ///
4259 struct {
4260 ///
4261 /// [Bits 31:0] Virtual Address.
4262 ///
4263 UINT32 VirtualAddress:32;
4264 ///
4265 /// [Bits 47:32] Virtual Address.
4266 ///
4267 UINT32 VirtualAddressHi:16;
4268 ///
4269 /// [Bits 63:48] SignExt_VA.
4270 ///
4271 UINT32 SignExt_VA:16;
4272 } Bits;
4273 ///
4274 /// All bit fields as a 64-bit value
4275 ///
4276 UINT64 Uint64;
4277 } MSR_IA32_RTIT_ADDR_REGISTER;
4278
4279
4280 /**
4281 DS Save Area (R/W) Points to the linear address of the first byte of the DS
4282 buffer management area, which is used to manage the BTS and PEBS buffers.
4283 See Section 18.12.4, "Debug Store (DS) Mechanism.". If( CPUID.01H:EDX.DS[21]
4284 = 1.
4285
4286 [Bits 31..0] The linear address of the first byte of the DS buffer
4287 management area, if not in IA-32e mode.
4288
4289 [Bits 63..0] The linear address of the first byte of the DS buffer
4290 management area, if IA-32e mode is active.
4291
4292 @param ECX MSR_IA32_DS_AREA (0x00000600)
4293 @param EAX Lower 32-bits of MSR value.
4294 Described by the type MSR_IA32_DS_AREA_REGISTER.
4295 @param EDX Upper 32-bits of MSR value.
4296 Described by the type MSR_IA32_DS_AREA_REGISTER.
4297
4298 <b>Example usage</b>
4299 @code
4300 UINT64 Msr;
4301
4302 Msr = AsmReadMsr64 (MSR_IA32_DS_AREA);
4303 AsmWriteMsr64 (MSR_IA32_DS_AREA, Msr);
4304 @endcode
4305 **/
4306 #define MSR_IA32_DS_AREA 0x00000600
4307
4308
4309 /**
4310 TSC Target of Local APIC's TSC Deadline Mode (R/W). If CPUID.01H:ECX.[24] =
4311 1.
4312
4313 @param ECX MSR_IA32_TSC_DEADLINE (0x000006E0)
4314 @param EAX Lower 32-bits of MSR value.
4315 @param EDX Upper 32-bits of MSR value.
4316
4317 <b>Example usage</b>
4318 @code
4319 UINT64 Msr;
4320
4321 Msr = AsmReadMsr64 (MSR_IA32_TSC_DEADLINE);
4322 AsmWriteMsr64 (MSR_IA32_TSC_DEADLINE, Msr);
4323 @endcode
4324 **/
4325 #define MSR_IA32_TSC_DEADLINE 0x000006E0
4326
4327
4328 /**
4329 Enable/disable HWP (R/W). If CPUID.06H:EAX.[7] = 1.
4330
4331 @param ECX MSR_IA32_PM_ENABLE (0x00000770)
4332 @param EAX Lower 32-bits of MSR value.
4333 Described by the type MSR_IA32_PM_ENABLE_REGISTER.
4334 @param EDX Upper 32-bits of MSR value.
4335 Described by the type MSR_IA32_PM_ENABLE_REGISTER.
4336
4337 <b>Example usage</b>
4338 @code
4339 MSR_IA32_PM_ENABLE_REGISTER Msr;
4340
4341 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_PM_ENABLE);
4342 AsmWriteMsr64 (MSR_IA32_PM_ENABLE, Msr.Uint64);
4343 @endcode
4344 **/
4345 #define MSR_IA32_PM_ENABLE 0x00000770
4346
4347 /**
4348 MSR information returned for MSR index #MSR_IA32_PM_ENABLE
4349 **/
4350 typedef union {
4351 ///
4352 /// Individual bit fields
4353 ///
4354 struct {
4355 ///
4356 /// [Bit 0] HWP_ENABLE (R/W1-Once). See Section 14.4.2, "Enabling HWP". If
4357 /// CPUID.06H:EAX.[7] = 1.
4358 ///
4359 UINT32 HWP_ENABLE:1;
4360 UINT32 Reserved1:31;
4361 UINT32 Reserved2:32;
4362 } Bits;
4363 ///
4364 /// All bit fields as a 32-bit value
4365 ///
4366 UINT32 Uint32;
4367 ///
4368 /// All bit fields as a 64-bit value
4369 ///
4370 UINT64 Uint64;
4371 } MSR_IA32_PM_ENABLE_REGISTER;
4372
4373
4374 /**
4375 HWP Performance Range Enumeration (RO). If CPUID.06H:EAX.[7] = 1.
4376
4377 @param ECX MSR_IA32_HWP_CAPABILITIES (0x00000771)
4378 @param EAX Lower 32-bits of MSR value.
4379 Described by the type MSR_IA32_HWP_CAPABILITIES_REGISTER.
4380 @param EDX Upper 32-bits of MSR value.
4381 Described by the type MSR_IA32_HWP_CAPABILITIES_REGISTER.
4382
4383 <b>Example usage</b>
4384 @code
4385 MSR_IA32_HWP_CAPABILITIES_REGISTER Msr;
4386
4387 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_HWP_CAPABILITIES);
4388 @endcode
4389 **/
4390 #define MSR_IA32_HWP_CAPABILITIES 0x00000771
4391
4392 /**
4393 MSR information returned for MSR index #MSR_IA32_HWP_CAPABILITIES
4394 **/
4395 typedef union {
4396 ///
4397 /// Individual bit fields
4398 ///
4399 struct {
4400 ///
4401 /// [Bits 7:0] Highest_Performance See Section 14.4.3, "HWP Performance
4402 /// Range and Dynamic Capabilities". If CPUID.06H:EAX.[7] = 1.
4403 ///
4404 UINT32 Highest_Performance:8;
4405 ///
4406 /// [Bits 15:8] Guaranteed_Performance See Section 14.4.3, "HWP
4407 /// Performance Range and Dynamic Capabilities". If CPUID.06H:EAX.[7] = 1.
4408 ///
4409 UINT32 Guaranteed_Performance:8;
4410 ///
4411 /// [Bits 23:16] Most_Efficient_Performance See Section 14.4.3, "HWP
4412 /// Performance Range and Dynamic Capabilities". If CPUID.06H:EAX.[7] = 1.
4413 ///
4414 UINT32 Most_Efficient_Performance:8;
4415 ///
4416 /// [Bits 31:24] Lowest_Performance See Section 14.4.3, "HWP Performance
4417 /// Range and Dynamic Capabilities". If CPUID.06H:EAX.[7] = 1.
4418 ///
4419 UINT32 Lowest_Performance:8;
4420 UINT32 Reserved:32;
4421 } Bits;
4422 ///
4423 /// All bit fields as a 32-bit value
4424 ///
4425 UINT32 Uint32;
4426 ///
4427 /// All bit fields as a 64-bit value
4428 ///
4429 UINT64 Uint64;
4430 } MSR_IA32_HWP_CAPABILITIES_REGISTER;
4431
4432
4433 /**
4434 Power Management Control Hints for All Logical Processors in a Package
4435 (R/W). If CPUID.06H:EAX.[11] = 1.
4436
4437 @param ECX MSR_IA32_HWP_REQUEST_PKG (0x00000772)
4438 @param EAX Lower 32-bits of MSR value.
4439 Described by the type MSR_IA32_HWP_REQUEST_PKG_REGISTER.
4440 @param EDX Upper 32-bits of MSR value.
4441 Described by the type MSR_IA32_HWP_REQUEST_PKG_REGISTER.
4442
4443 <b>Example usage</b>
4444 @code
4445 MSR_IA32_HWP_REQUEST_PKG_REGISTER Msr;
4446
4447 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_HWP_REQUEST_PKG);
4448 AsmWriteMsr64 (MSR_IA32_HWP_REQUEST_PKG, Msr.Uint64);
4449 @endcode
4450 **/
4451 #define MSR_IA32_HWP_REQUEST_PKG 0x00000772
4452
4453 /**
4454 MSR information returned for MSR index #MSR_IA32_HWP_REQUEST_PKG
4455 **/
4456 typedef union {
4457 ///
4458 /// Individual bit fields
4459 ///
4460 struct {
4461 ///
4462 /// [Bits 7:0] Minimum_Performance See Section 14.4.4, "Managing HWP". If
4463 /// CPUID.06H:EAX.[11] = 1.
4464 ///
4465 UINT32 Minimum_Performance:8;
4466 ///
4467 /// [Bits 15:8] Maximum_Performance See Section 14.4.4, "Managing HWP". If
4468 /// CPUID.06H:EAX.[11] = 1.
4469 ///
4470 UINT32 Maximum_Performance:8;
4471 ///
4472 /// [Bits 23:16] Desired_Performance See Section 14.4.4, "Managing HWP".
4473 /// If CPUID.06H:EAX.[11] = 1.
4474 ///
4475 UINT32 Desired_Performance:8;
4476 ///
4477 /// [Bits 31:24] Energy_Performance_Preference See Section 14.4.4,
4478 /// "Managing HWP". If CPUID.06H:EAX.[11] = 1 && CPUID.06H:EAX.[10] = 1.
4479 ///
4480 UINT32 Energy_Performance_Preference:8;
4481 ///
4482 /// [Bits 41:32] Activity_Window See Section 14.4.4, "Managing HWP". If
4483 /// CPUID.06H:EAX.[11] = 1 && CPUID.06H:EAX.[9] = 1.
4484 ///
4485 UINT32 Activity_Window:10;
4486 UINT32 Reserved:22;
4487 } Bits;
4488 ///
4489 /// All bit fields as a 64-bit value
4490 ///
4491 UINT64 Uint64;
4492 } MSR_IA32_HWP_REQUEST_PKG_REGISTER;
4493
4494
4495 /**
4496 Control HWP Native Interrupts (R/W). If CPUID.06H:EAX.[8] = 1.
4497
4498 @param ECX MSR_IA32_HWP_INTERRUPT (0x00000773)
4499 @param EAX Lower 32-bits of MSR value.
4500 Described by the type MSR_IA32_HWP_INTERRUPT_REGISTER.
4501 @param EDX Upper 32-bits of MSR value.
4502 Described by the type MSR_IA32_HWP_INTERRUPT_REGISTER.
4503
4504 <b>Example usage</b>
4505 @code
4506 MSR_IA32_HWP_INTERRUPT_REGISTER Msr;
4507
4508 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_HWP_INTERRUPT);
4509 AsmWriteMsr64 (MSR_IA32_HWP_INTERRUPT, Msr.Uint64);
4510 @endcode
4511 **/
4512 #define MSR_IA32_HWP_INTERRUPT 0x00000773
4513
4514 /**
4515 MSR information returned for MSR index #MSR_IA32_HWP_INTERRUPT
4516 **/
4517 typedef union {
4518 ///
4519 /// Individual bit fields
4520 ///
4521 struct {
4522 ///
4523 /// [Bit 0] EN_Guaranteed_Performance_Change. See Section 14.4.6, "HWP
4524 /// Notifications". If CPUID.06H:EAX.[8] = 1.
4525 ///
4526 UINT32 EN_Guaranteed_Performance_Change:1;
4527 ///
4528 /// [Bit 1] EN_Excursion_Minimum. See Section 14.4.6, "HWP Notifications".
4529 /// If CPUID.06H:EAX.[8] = 1.
4530 ///
4531 UINT32 EN_Excursion_Minimum:1;
4532 UINT32 Reserved1:30;
4533 UINT32 Reserved2:32;
4534 } Bits;
4535 ///
4536 /// All bit fields as a 32-bit value
4537 ///
4538 UINT32 Uint32;
4539 ///
4540 /// All bit fields as a 64-bit value
4541 ///
4542 UINT64 Uint64;
4543 } MSR_IA32_HWP_INTERRUPT_REGISTER;
4544
4545
4546 /**
4547 Power Management Control Hints to a Logical Processor (R/W). If
4548 CPUID.06H:EAX.[7] = 1.
4549
4550 @param ECX MSR_IA32_HWP_REQUEST (0x00000774)
4551 @param EAX Lower 32-bits of MSR value.
4552 Described by the type MSR_IA32_HWP_REQUEST_REGISTER.
4553 @param EDX Upper 32-bits of MSR value.
4554 Described by the type MSR_IA32_HWP_REQUEST_REGISTER.
4555
4556 <b>Example usage</b>
4557 @code
4558 MSR_IA32_HWP_REQUEST_REGISTER Msr;
4559
4560 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_HWP_REQUEST);
4561 AsmWriteMsr64 (MSR_IA32_HWP_REQUEST, Msr.Uint64);
4562 @endcode
4563 **/
4564 #define MSR_IA32_HWP_REQUEST 0x00000774
4565
4566 /**
4567 MSR information returned for MSR index #MSR_IA32_HWP_REQUEST
4568 **/
4569 typedef union {
4570 ///
4571 /// Individual bit fields
4572 ///
4573 struct {
4574 ///
4575 /// [Bits 7:0] Minimum_Performance See Section 14.4.4, "Managing HWP". If
4576 /// CPUID.06H:EAX.[7] = 1.
4577 ///
4578 UINT32 Minimum_Performance:8;
4579 ///
4580 /// [Bits 15:8] Maximum_Performance See Section 14.4.4, "Managing HWP". If
4581 /// CPUID.06H:EAX.[7] = 1.
4582 ///
4583 UINT32 Maximum_Performance:8;
4584 ///
4585 /// [Bits 23:16] Desired_Performance See Section 14.4.4, "Managing HWP".
4586 /// If CPUID.06H:EAX.[7] = 1.
4587 ///
4588 UINT32 Desired_Performance:8;
4589 ///
4590 /// [Bits 31:24] Energy_Performance_Preference See Section 14.4.4,
4591 /// "Managing HWP". If CPUID.06H:EAX.[7] = 1 && CPUID.06H:EAX.[10] = 1.
4592 ///
4593 UINT32 Energy_Performance_Preference:8;
4594 ///
4595 /// [Bits 41:32] Activity_Window See Section 14.4.4, "Managing HWP". If
4596 /// CPUID.06H:EAX.[7] = 1 && CPUID.06H:EAX.[9] = 1.
4597 ///
4598 UINT32 Activity_Window:10;
4599 ///
4600 /// [Bit 42] Package_Control See Section 14.4.4, "Managing HWP". If
4601 /// CPUID.06H:EAX.[7] = 1 && CPUID.06H:EAX.[11] = 1.
4602 ///
4603 UINT32 Package_Control:1;
4604 UINT32 Reserved:21;
4605 } Bits;
4606 ///
4607 /// All bit fields as a 64-bit value
4608 ///
4609 UINT64 Uint64;
4610 } MSR_IA32_HWP_REQUEST_REGISTER;
4611
4612
4613 /**
4614 Log bits indicating changes to Guaranteed & excursions to Minimum (R/W). If
4615 CPUID.06H:EAX.[7] = 1.
4616
4617 @param ECX MSR_IA32_HWP_STATUS (0x00000777)
4618 @param EAX Lower 32-bits of MSR value.
4619 Described by the type MSR_IA32_HWP_STATUS_REGISTER.
4620 @param EDX Upper 32-bits of MSR value.
4621 Described by the type MSR_IA32_HWP_STATUS_REGISTER.
4622
4623 <b>Example usage</b>
4624 @code
4625 MSR_IA32_HWP_STATUS_REGISTER Msr;
4626
4627 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_HWP_STATUS);
4628 AsmWriteMsr64 (MSR_IA32_HWP_STATUS, Msr.Uint64);
4629 @endcode
4630 **/
4631 #define MSR_IA32_HWP_STATUS 0x00000777
4632
4633 /**
4634 MSR information returned for MSR index #MSR_IA32_HWP_STATUS
4635 **/
4636 typedef union {
4637 ///
4638 /// Individual bit fields
4639 ///
4640 struct {
4641 ///
4642 /// [Bit 0] Guaranteed_Performance_Change (R/WC0). See Section 14.4.5,
4643 /// "HWP Feedback". If CPUID.06H:EAX.[7] = 1.
4644 ///
4645 UINT32 Guaranteed_Performance_Change:1;
4646 UINT32 Reserved1:1;
4647 ///
4648 /// [Bit 2] Excursion_To_Minimum (R/WC0). See Section 14.4.5, "HWP
4649 /// Feedback". If CPUID.06H:EAX.[7] = 1.
4650 ///
4651 UINT32 Excursion_To_Minimum:1;
4652 UINT32 Reserved2:29;
4653 UINT32 Reserved3:32;
4654 } Bits;
4655 ///
4656 /// All bit fields as a 32-bit value
4657 ///
4658 UINT32 Uint32;
4659 ///
4660 /// All bit fields as a 64-bit value
4661 ///
4662 UINT64 Uint64;
4663 } MSR_IA32_HWP_STATUS_REGISTER;
4664
4665
4666 /**
4667 x2APIC ID Register (R/O) See x2APIC Specification. If CPUID.01H:ECX[21] = 1
4668 && IA32_APIC_BASE.[10] = 1.
4669
4670 @param ECX MSR_IA32_X2APIC_APICID (0x00000802)
4671 @param EAX Lower 32-bits of MSR value.
4672 @param EDX Upper 32-bits of MSR value.
4673
4674 <b>Example usage</b>
4675 @code
4676 UINT64 Msr;
4677
4678 Msr = AsmReadMsr64 (MSR_IA32_X2APIC_APICID);
4679 @endcode
4680 **/
4681 #define MSR_IA32_X2APIC_APICID 0x00000802
4682
4683
4684 /**
4685 x2APIC Version Register (R/O). If CPUID.01H:ECX.[21] = 1 &&
4686 IA32_APIC_BASE.[10] = 1.
4687
4688 @param ECX MSR_IA32_X2APIC_VERSION (0x00000803)
4689 @param EAX Lower 32-bits of MSR value.
4690 @param EDX Upper 32-bits of MSR value.
4691
4692 <b>Example usage</b>
4693 @code
4694 UINT64 Msr;
4695
4696 Msr = AsmReadMsr64 (MSR_IA32_X2APIC_VERSION);
4697 @endcode
4698 **/
4699 #define MSR_IA32_X2APIC_VERSION 0x00000803
4700
4701
4702 /**
4703 x2APIC Task Priority Register (R/W). If CPUID.01H:ECX.[21] = 1 &&
4704 IA32_APIC_BASE.[10] = 1.
4705
4706 @param ECX MSR_IA32_X2APIC_TPR (0x00000808)
4707 @param EAX Lower 32-bits of MSR value.
4708 @param EDX Upper 32-bits of MSR value.
4709
4710 <b>Example usage</b>
4711 @code
4712 UINT64 Msr;
4713
4714 Msr = AsmReadMsr64 (MSR_IA32_X2APIC_TPR);
4715 AsmWriteMsr64 (MSR_IA32_X2APIC_TPR, Msr);
4716 @endcode
4717 **/
4718 #define MSR_IA32_X2APIC_TPR 0x00000808
4719
4720
4721 /**
4722 x2APIC Processor Priority Register (R/O). If CPUID.01H:ECX.[21] = 1 &&
4723 IA32_APIC_BASE.[10] = 1.
4724
4725 @param ECX MSR_IA32_X2APIC_PPR (0x0000080A)
4726 @param EAX Lower 32-bits of MSR value.
4727 @param EDX Upper 32-bits of MSR value.
4728
4729 <b>Example usage</b>
4730 @code
4731 UINT64 Msr;
4732
4733 Msr = AsmReadMsr64 (MSR_IA32_X2APIC_PPR);
4734 @endcode
4735 **/
4736 #define MSR_IA32_X2APIC_PPR 0x0000080A
4737
4738
4739 /**
4740 x2APIC EOI Register (W/O). If CPUID.01H:ECX.[21] = 1 && IA32_APIC_BASE.[10]
4741 = 1.
4742
4743 @param ECX MSR_IA32_X2APIC_EOI (0x0000080B)
4744 @param EAX Lower 32-bits of MSR value.
4745 @param EDX Upper 32-bits of MSR value.
4746
4747 <b>Example usage</b>
4748 @code
4749 UINT64 Msr;
4750
4751 Msr = 0;
4752 AsmWriteMsr64 (MSR_IA32_X2APIC_EOI, Msr);
4753 @endcode
4754 **/
4755 #define MSR_IA32_X2APIC_EOI 0x0000080B
4756
4757
4758 /**
4759 x2APIC Logical Destination Register (R/O). If CPUID.01H:ECX.[21] = 1 &&
4760 IA32_APIC_BASE.[10] = 1.
4761
4762 @param ECX MSR_IA32_X2APIC_LDR (0x0000080D)
4763 @param EAX Lower 32-bits of MSR value.
4764 @param EDX Upper 32-bits of MSR value.
4765
4766 <b>Example usage</b>
4767 @code
4768 UINT64 Msr;
4769
4770 Msr = AsmReadMsr64 (MSR_IA32_X2APIC_LDR);
4771 @endcode
4772 **/
4773 #define MSR_IA32_X2APIC_LDR 0x0000080D
4774
4775
4776 /**
4777 x2APIC Spurious Interrupt Vector Register (R/W). If CPUID.01H:ECX.[21] = 1
4778 && IA32_APIC_BASE.[10] = 1.
4779
4780 @param ECX MSR_IA32_X2APIC_SIVR (0x0000080F)
4781 @param EAX Lower 32-bits of MSR value.
4782 @param EDX Upper 32-bits of MSR value.
4783
4784 <b>Example usage</b>
4785 @code
4786 UINT64 Msr;
4787
4788 Msr = AsmReadMsr64 (MSR_IA32_X2APIC_SIVR);
4789 AsmWriteMsr64 (MSR_IA32_X2APIC_SIVR, Msr);
4790 @endcode
4791 **/
4792 #define MSR_IA32_X2APIC_SIVR 0x0000080F
4793
4794
4795 /**
4796 x2APIC In-Service Register Bits (n * 32 + 31):(n * 32) (R/O).
4797 If CPUID.01H:ECX.[21] = 1 && IA32_APIC_BASE.[10] = 1.
4798
4799 @param ECX MSR_IA32_X2APIC_ISRn
4800 @param EAX Lower 32-bits of MSR value.
4801 @param EDX Upper 32-bits of MSR value.
4802
4803 <b>Example usage</b>
4804 @code
4805 UINT64 Msr;
4806
4807 Msr = AsmReadMsr64 (MSR_IA32_X2APIC_ISR0);
4808 @endcode
4809 @{
4810 **/
4811 #define MSR_IA32_X2APIC_ISR0 0x00000810
4812 #define MSR_IA32_X2APIC_ISR1 0x00000811
4813 #define MSR_IA32_X2APIC_ISR2 0x00000812
4814 #define MSR_IA32_X2APIC_ISR3 0x00000813
4815 #define MSR_IA32_X2APIC_ISR4 0x00000814
4816 #define MSR_IA32_X2APIC_ISR5 0x00000815
4817 #define MSR_IA32_X2APIC_ISR6 0x00000816
4818 #define MSR_IA32_X2APIC_ISR7 0x00000817
4819 /// @}
4820
4821
4822 /**
4823 x2APIC Trigger Mode Register Bits (n * 32 + ):(n * 32) (R/O).
4824 If CPUID.01H:ECX.[21] = 1 && IA32_APIC_BASE.[10] = 1.
4825
4826 @param ECX MSR_IA32_X2APIC_TMRn
4827 @param EAX Lower 32-bits of MSR value.
4828 @param EDX Upper 32-bits of MSR value.
4829
4830 <b>Example usage</b>
4831 @code
4832 UINT64 Msr;
4833
4834 Msr = AsmReadMsr64 (MSR_IA32_X2APIC_TMR0);
4835 @endcode
4836 @{
4837 **/
4838 #define MSR_IA32_X2APIC_TMR0 0x00000818
4839 #define MSR_IA32_X2APIC_TMR1 0x00000819
4840 #define MSR_IA32_X2APIC_TMR2 0x0000081A
4841 #define MSR_IA32_X2APIC_TMR3 0x0000081B
4842 #define MSR_IA32_X2APIC_TMR4 0x0000081C
4843 #define MSR_IA32_X2APIC_TMR5 0x0000081D
4844 #define MSR_IA32_X2APIC_TMR6 0x0000081E
4845 #define MSR_IA32_X2APIC_TMR7 0x0000081F
4846 /// @}
4847
4848
4849 /**
4850 x2APIC Interrupt Request Register Bits (n* 32 + 31):(n * 32) (R/O).
4851 If CPUID.01H:ECX.[21] = 1 && IA32_APIC_BASE.[10] = 1.
4852
4853 @param ECX MSR_IA32_X2APIC_IRRn
4854 @param EAX Lower 32-bits of MSR value.
4855 @param EDX Upper 32-bits of MSR value.
4856
4857 <b>Example usage</b>
4858 @code
4859 UINT64 Msr;
4860
4861 Msr = AsmReadMsr64 (MSR_IA32_X2APIC_IRR0);
4862 @endcode
4863 @{
4864 **/
4865 #define MSR_IA32_X2APIC_IRR0 0x00000820
4866 #define MSR_IA32_X2APIC_IRR1 0x00000821
4867 #define MSR_IA32_X2APIC_IRR2 0x00000822
4868 #define MSR_IA32_X2APIC_IRR3 0x00000823
4869 #define MSR_IA32_X2APIC_IRR4 0x00000824
4870 #define MSR_IA32_X2APIC_IRR5 0x00000825
4871 #define MSR_IA32_X2APIC_IRR6 0x00000826
4872 #define MSR_IA32_X2APIC_IRR7 0x00000827
4873 /// @}
4874
4875
4876 /**
4877 x2APIC Error Status Register (R/W). If CPUID.01H:ECX.[21] = 1 &&
4878 IA32_APIC_BASE.[10] = 1.
4879
4880 @param ECX MSR_IA32_X2APIC_ESR (0x00000828)
4881 @param EAX Lower 32-bits of MSR value.
4882 @param EDX Upper 32-bits of MSR value.
4883
4884 <b>Example usage</b>
4885 @code
4886 UINT64 Msr;
4887
4888 Msr = AsmReadMsr64 (MSR_IA32_X2APIC_ESR);
4889 AsmWriteMsr64 (MSR_IA32_X2APIC_ESR, Msr);
4890 @endcode
4891 **/
4892 #define MSR_IA32_X2APIC_ESR 0x00000828
4893
4894
4895 /**
4896 x2APIC LVT Corrected Machine Check Interrupt Register (R/W). If
4897 CPUID.01H:ECX.[21] = 1 && IA32_APIC_BASE.[10] = 1.
4898
4899 @param ECX MSR_IA32_X2APIC_LVT_CMCI (0x0000082F)
4900 @param EAX Lower 32-bits of MSR value.
4901 @param EDX Upper 32-bits of MSR value.
4902
4903 <b>Example usage</b>
4904 @code
4905 UINT64 Msr;
4906
4907 Msr = AsmReadMsr64 (MSR_IA32_X2APIC_LVT_CMCI);
4908 AsmWriteMsr64 (MSR_IA32_X2APIC_LVT_CMCI, Msr);
4909 @endcode
4910 **/
4911 #define MSR_IA32_X2APIC_LVT_CMCI 0x0000082F
4912
4913
4914 /**
4915 x2APIC Interrupt Command Register (R/W). If CPUID.01H:ECX.[21] = 1 &&
4916 IA32_APIC_BASE.[10] = 1.
4917
4918 @param ECX MSR_IA32_X2APIC_ICR (0x00000830)
4919 @param EAX Lower 32-bits of MSR value.
4920 @param EDX Upper 32-bits of MSR value.
4921
4922 <b>Example usage</b>
4923 @code
4924 UINT64 Msr;
4925
4926 Msr = AsmReadMsr64 (MSR_IA32_X2APIC_ICR);
4927 AsmWriteMsr64 (MSR_IA32_X2APIC_ICR, Msr);
4928 @endcode
4929 **/
4930 #define MSR_IA32_X2APIC_ICR 0x00000830
4931
4932
4933 /**
4934 x2APIC LVT Timer Interrupt Register (R/W). If CPUID.01H:ECX.[21] = 1 &&
4935 IA32_APIC_BASE.[10] = 1.
4936
4937 @param ECX MSR_IA32_X2APIC_LVT_TIMER (0x00000832)
4938 @param EAX Lower 32-bits of MSR value.
4939 @param EDX Upper 32-bits of MSR value.
4940
4941 <b>Example usage</b>
4942 @code
4943 UINT64 Msr;
4944
4945 Msr = AsmReadMsr64 (MSR_IA32_X2APIC_LVT_TIMER);
4946 AsmWriteMsr64 (MSR_IA32_X2APIC_LVT_TIMER, Msr);
4947 @endcode
4948 **/
4949 #define MSR_IA32_X2APIC_LVT_TIMER 0x00000832
4950
4951
4952 /**
4953 x2APIC LVT Thermal Sensor Interrupt Register (R/W). If CPUID.01H:ECX.[21] =
4954 1 && IA32_APIC_BASE.[10] = 1.
4955
4956 @param ECX MSR_IA32_X2APIC_LVT_THERMAL (0x00000833)
4957 @param EAX Lower 32-bits of MSR value.
4958 @param EDX Upper 32-bits of MSR value.
4959
4960 <b>Example usage</b>
4961 @code
4962 UINT64 Msr;
4963
4964 Msr = AsmReadMsr64 (MSR_IA32_X2APIC_LVT_THERMAL);
4965 AsmWriteMsr64 (MSR_IA32_X2APIC_LVT_THERMAL, Msr);
4966 @endcode
4967 **/
4968 #define MSR_IA32_X2APIC_LVT_THERMAL 0x00000833
4969
4970
4971 /**
4972 x2APIC LVT Performance Monitor Interrupt Register (R/W). If
4973 CPUID.01H:ECX.[21] = 1 && IA32_APIC_BASE.[10] = 1.
4974
4975 @param ECX MSR_IA32_X2APIC_LVT_PMI (0x00000834)
4976 @param EAX Lower 32-bits of MSR value.
4977 @param EDX Upper 32-bits of MSR value.
4978
4979 <b>Example usage</b>
4980 @code
4981 UINT64 Msr;
4982
4983 Msr = AsmReadMsr64 (MSR_IA32_X2APIC_LVT_PMI);
4984 AsmWriteMsr64 (MSR_IA32_X2APIC_LVT_PMI, Msr);
4985 @endcode
4986 **/
4987 #define MSR_IA32_X2APIC_LVT_PMI 0x00000834
4988
4989
4990 /**
4991 x2APIC LVT LINT0 Register (R/W). If CPUID.01H:ECX.[21] = 1 &&
4992 IA32_APIC_BASE.[10] = 1.
4993
4994 @param ECX MSR_IA32_X2APIC_LVT_LINT0 (0x00000835)
4995 @param EAX Lower 32-bits of MSR value.
4996 @param EDX Upper 32-bits of MSR value.
4997
4998 <b>Example usage</b>
4999 @code
5000 UINT64 Msr;
5001
5002 Msr = AsmReadMsr64 (MSR_IA32_X2APIC_LVT_LINT0);
5003 AsmWriteMsr64 (MSR_IA32_X2APIC_LVT_LINT0, Msr);
5004 @endcode
5005 **/
5006 #define MSR_IA32_X2APIC_LVT_LINT0 0x00000835
5007
5008
5009 /**
5010 x2APIC LVT LINT1 Register (R/W). If CPUID.01H:ECX.[21] = 1 &&
5011 IA32_APIC_BASE.[10] = 1.
5012
5013 @param ECX MSR_IA32_X2APIC_LVT_LINT1 (0x00000836)
5014 @param EAX Lower 32-bits of MSR value.
5015 @param EDX Upper 32-bits of MSR value.
5016
5017 <b>Example usage</b>
5018 @code
5019 UINT64 Msr;
5020
5021 Msr = AsmReadMsr64 (MSR_IA32_X2APIC_LVT_LINT1);
5022 AsmWriteMsr64 (MSR_IA32_X2APIC_LVT_LINT1, Msr);
5023 @endcode
5024 **/
5025 #define MSR_IA32_X2APIC_LVT_LINT1 0x00000836
5026
5027
5028 /**
5029 x2APIC LVT Error Register (R/W). If CPUID.01H:ECX.[21] = 1 &&
5030 IA32_APIC_BASE.[10] = 1.
5031
5032 @param ECX MSR_IA32_X2APIC_LVT_ERROR (0x00000837)
5033 @param EAX Lower 32-bits of MSR value.
5034 @param EDX Upper 32-bits of MSR value.
5035
5036 <b>Example usage</b>
5037 @code
5038 UINT64 Msr;
5039
5040 Msr = AsmReadMsr64 (MSR_IA32_X2APIC_LVT_ERROR);
5041 AsmWriteMsr64 (MSR_IA32_X2APIC_LVT_ERROR, Msr);
5042 @endcode
5043 **/
5044 #define MSR_IA32_X2APIC_LVT_ERROR 0x00000837
5045
5046
5047 /**
5048 x2APIC Initial Count Register (R/W). If CPUID.01H:ECX.[21] = 1 &&
5049 IA32_APIC_BASE.[10] = 1.
5050
5051 @param ECX MSR_IA32_X2APIC_INIT_COUNT (0x00000838)
5052 @param EAX Lower 32-bits of MSR value.
5053 @param EDX Upper 32-bits of MSR value.
5054
5055 <b>Example usage</b>
5056 @code
5057 UINT64 Msr;
5058
5059 Msr = AsmReadMsr64 (MSR_IA32_X2APIC_INIT_COUNT);
5060 AsmWriteMsr64 (MSR_IA32_X2APIC_INIT_COUNT, Msr);
5061 @endcode
5062 **/
5063 #define MSR_IA32_X2APIC_INIT_COUNT 0x00000838
5064
5065
5066 /**
5067 x2APIC Current Count Register (R/O). If CPUID.01H:ECX.[21] = 1 &&
5068 IA32_APIC_BASE.[10] = 1.
5069
5070 @param ECX MSR_IA32_X2APIC_CUR_COUNT (0x00000839)
5071 @param EAX Lower 32-bits of MSR value.
5072 @param EDX Upper 32-bits of MSR value.
5073
5074 <b>Example usage</b>
5075 @code
5076 UINT64 Msr;
5077
5078 Msr = AsmReadMsr64 (MSR_IA32_X2APIC_CUR_COUNT);
5079 @endcode
5080 **/
5081 #define MSR_IA32_X2APIC_CUR_COUNT 0x00000839
5082
5083
5084 /**
5085 x2APIC Divide Configuration Register (R/W). If CPUID.01H:ECX.[21] = 1 &&
5086 IA32_APIC_BASE.[10] = 1.
5087
5088 @param ECX MSR_IA32_X2APIC_DIV_CONF (0x0000083E)
5089 @param EAX Lower 32-bits of MSR value.
5090 @param EDX Upper 32-bits of MSR value.
5091
5092 <b>Example usage</b>
5093 @code
5094 UINT64 Msr;
5095
5096 Msr = AsmReadMsr64 (MSR_IA32_X2APIC_DIV_CONF);
5097 AsmWriteMsr64 (MSR_IA32_X2APIC_DIV_CONF, Msr);
5098 @endcode
5099 **/
5100 #define MSR_IA32_X2APIC_DIV_CONF 0x0000083E
5101
5102
5103 /**
5104 x2APIC Self IPI Register (W/O). If CPUID.01H:ECX.[21] = 1 &&
5105 IA32_APIC_BASE.[10] = 1.
5106
5107 @param ECX MSR_IA32_X2APIC_SELF_IPI (0x0000083F)
5108 @param EAX Lower 32-bits of MSR value.
5109 @param EDX Upper 32-bits of MSR value.
5110
5111 <b>Example usage</b>
5112 @code
5113 UINT64 Msr;
5114
5115 Msr = 0;
5116 AsmWriteMsr64 (MSR_IA32_X2APIC_SELF_IPI, Msr);
5117 @endcode
5118 **/
5119 #define MSR_IA32_X2APIC_SELF_IPI 0x0000083F
5120
5121
5122 /**
5123 Silicon Debug Feature Control (R/W). If CPUID.01H:ECX.[11] = 1.
5124
5125 @param ECX MSR_IA32_DEBUG_INTERFACE (0x00000C80)
5126 @param EAX Lower 32-bits of MSR value.
5127 Described by the type MSR_IA32_DEBUG_INTERFACE_REGISTER.
5128 @param EDX Upper 32-bits of MSR value.
5129 Described by the type MSR_IA32_DEBUG_INTERFACE_REGISTER.
5130
5131 <b>Example usage</b>
5132 @code
5133 MSR_IA32_DEBUG_INTERFACE_REGISTER Msr;
5134
5135 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_DEBUG_INTERFACE);
5136 AsmWriteMsr64 (MSR_IA32_DEBUG_INTERFACE, Msr.Uint64);
5137 @endcode
5138 **/
5139 #define MSR_IA32_DEBUG_INTERFACE 0x00000C80
5140
5141 /**
5142 MSR information returned for MSR index #MSR_IA32_DEBUG_INTERFACE
5143 **/
5144 typedef union {
5145 ///
5146 /// Individual bit fields
5147 ///
5148 struct {
5149 ///
5150 /// [Bit 0] Enable (R/W) BIOS set 1 to enable Silicon debug features.
5151 /// Default is 0. If CPUID.01H:ECX.[11] = 1.
5152 ///
5153 UINT32 Enable:1;
5154 UINT32 Reserved1:29;
5155 ///
5156 /// [Bit 30] Lock (R/W): If 1, locks any further change to the MSR. The
5157 /// lock bit is set automatically on the first SMI assertion even if not
5158 /// explicitly set by BIOS. Default is 0. If CPUID.01H:ECX.[11] = 1.
5159 ///
5160 UINT32 Lock:1;
5161 ///
5162 /// [Bit 31] Debug Occurred (R/O): This "sticky bit" is set by hardware to
5163 /// indicate the status of bit 0. Default is 0. If CPUID.01H:ECX.[11] = 1.
5164 ///
5165 UINT32 DebugOccurred:1;
5166 UINT32 Reserved2:32;
5167 } Bits;
5168 ///
5169 /// All bit fields as a 32-bit value
5170 ///
5171 UINT32 Uint32;
5172 ///
5173 /// All bit fields as a 64-bit value
5174 ///
5175 UINT64 Uint64;
5176 } MSR_IA32_DEBUG_INTERFACE_REGISTER;
5177
5178
5179 /**
5180 L3 QOS Configuration (R/W). If ( CPUID.(EAX=10H, ECX=1):ECX.[2] = 1 ).
5181
5182 @param ECX MSR_IA32_L3_QOS_CFG (0x00000C81)
5183 @param EAX Lower 32-bits of MSR value.
5184 Described by the type MSR_IA32_L3_QOS_CFG_REGISTER.
5185 @param EDX Upper 32-bits of MSR value.
5186 Described by the type MSR_IA32_L3_QOS_CFG_REGISTER.
5187
5188 <b>Example usage</b>
5189 @code
5190 MSR_IA32_L3_QOS_CFG_REGISTER Msr;
5191
5192 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_L3_QOS_CFG);
5193 AsmWriteMsr64 (MSR_IA32_L3_QOS_CFG, Msr.Uint64);
5194 @endcode
5195 **/
5196 #define MSR_IA32_L3_QOS_CFG 0x00000C81
5197
5198 /**
5199 MSR information returned for MSR index #MSR_IA32_L3_QOS_CFG
5200 **/
5201 typedef union {
5202 ///
5203 /// Individual bit fields
5204 ///
5205 struct {
5206 ///
5207 /// [Bit 0] Enable (R/W) Set 1 to enable L3 CAT masks and COS to operate
5208 /// in Code and Data Prioritization (CDP) mode.
5209 ///
5210 UINT32 Enable:1;
5211 UINT32 Reserved1:31;
5212 UINT32 Reserved2:32;
5213 } Bits;
5214 ///
5215 /// All bit fields as a 32-bit value
5216 ///
5217 UINT32 Uint32;
5218 ///
5219 /// All bit fields as a 64-bit value
5220 ///
5221 UINT64 Uint64;
5222 } MSR_IA32_L3_QOS_CFG_REGISTER;
5223
5224
5225 /**
5226 Monitoring Event Select Register (R/W). If ( CPUID.(EAX=07H, ECX=0):EBX.[12]
5227 = 1 ).
5228
5229 @param ECX MSR_IA32_QM_EVTSEL (0x00000C8D)
5230 @param EAX Lower 32-bits of MSR value.
5231 Described by the type MSR_IA32_QM_EVTSEL_REGISTER.
5232 @param EDX Upper 32-bits of MSR value.
5233 Described by the type MSR_IA32_QM_EVTSEL_REGISTER.
5234
5235 <b>Example usage</b>
5236 @code
5237 MSR_IA32_QM_EVTSEL_REGISTER Msr;
5238
5239 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_QM_EVTSEL);
5240 AsmWriteMsr64 (MSR_IA32_QM_EVTSEL, Msr.Uint64);
5241 @endcode
5242 **/
5243 #define MSR_IA32_QM_EVTSEL 0x00000C8D
5244
5245 /**
5246 MSR information returned for MSR index #MSR_IA32_QM_EVTSEL
5247 **/
5248 typedef union {
5249 ///
5250 /// Individual bit fields
5251 ///
5252 struct {
5253 ///
5254 /// [Bits 7:0] Event ID: ID of a supported monitoring event to report via
5255 /// IA32_QM_CTR.
5256 ///
5257 UINT32 EventID:8;
5258 UINT32 Reserved:24;
5259 ///
5260 /// [Bits 63:32] Resource Monitoring ID: ID for monitoring hardware to
5261 /// report monitored data via IA32_QM_CTR. N = Ceil (Log:sub:`2` (
5262 /// CPUID.(EAX= 0FH, ECX=0H).EBX[31:0] +1)).
5263 ///
5264 UINT32 ResourceMonitoringID:32;
5265 } Bits;
5266 ///
5267 /// All bit fields as a 64-bit value
5268 ///
5269 UINT64 Uint64;
5270 } MSR_IA32_QM_EVTSEL_REGISTER;
5271
5272
5273 /**
5274 Monitoring Counter Register (R/O). If ( CPUID.(EAX=07H, ECX=0):EBX.[12] = 1
5275 ).
5276
5277 @param ECX MSR_IA32_QM_CTR (0x00000C8E)
5278 @param EAX Lower 32-bits of MSR value.
5279 Described by the type MSR_IA32_QM_CTR_REGISTER.
5280 @param EDX Upper 32-bits of MSR value.
5281 Described by the type MSR_IA32_QM_CTR_REGISTER.
5282
5283 <b>Example usage</b>
5284 @code
5285 MSR_IA32_QM_CTR_REGISTER Msr;
5286
5287 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_QM_CTR);
5288 @endcode
5289 **/
5290 #define MSR_IA32_QM_CTR 0x00000C8E
5291
5292 /**
5293 MSR information returned for MSR index #MSR_IA32_QM_CTR
5294 **/
5295 typedef union {
5296 ///
5297 /// Individual bit fields
5298 ///
5299 struct {
5300 ///
5301 /// [Bits 31:0] Resource Monitored Data.
5302 ///
5303 UINT32 ResourceMonitoredData:32;
5304 ///
5305 /// [Bits 61:32] Resource Monitored Data.
5306 ///
5307 UINT32 ResourceMonitoredDataHi:30;
5308 ///
5309 /// [Bit 62] Unavailable: If 1, indicates data for this RMID is not
5310 /// available or not monitored for this resource or RMID.
5311 ///
5312 UINT32 Unavailable:1;
5313 ///
5314 /// [Bit 63] Error: If 1, indicates and unsupported RMID or event type was
5315 /// written to IA32_PQR_QM_EVTSEL.
5316 ///
5317 UINT32 Error:1;
5318 } Bits;
5319 ///
5320 /// All bit fields as a 64-bit value
5321 ///
5322 UINT64 Uint64;
5323 } MSR_IA32_QM_CTR_REGISTER;
5324
5325
5326 /**
5327 Resource Association Register (R/W). If ( CPUID.(EAX=07H, ECX=0):EBX.[12] =
5328 1 ).
5329
5330 @param ECX MSR_IA32_PQR_ASSOC (0x00000C8F)
5331 @param EAX Lower 32-bits of MSR value.
5332 Described by the type MSR_IA32_PQR_ASSOC_REGISTER.
5333 @param EDX Upper 32-bits of MSR value.
5334 Described by the type MSR_IA32_PQR_ASSOC_REGISTER.
5335
5336 <b>Example usage</b>
5337 @code
5338 MSR_IA32_PQR_ASSOC_REGISTER Msr;
5339
5340 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_PQR_ASSOC);
5341 AsmWriteMsr64 (MSR_IA32_PQR_ASSOC, Msr.Uint64);
5342 @endcode
5343 **/
5344 #define MSR_IA32_PQR_ASSOC 0x00000C8F
5345
5346 /**
5347 MSR information returned for MSR index #MSR_IA32_PQR_ASSOC
5348 **/
5349 typedef union {
5350 ///
5351 /// Individual bit fields
5352 ///
5353 struct {
5354 ///
5355 /// [Bits 31:0] Resource Monitoring ID (R/W): ID for monitoring hardware
5356 /// to track internal operation, e.g. memory access. N = Ceil (Log:sub:`2`
5357 /// ( CPUID.(EAX= 0FH, ECX=0H).EBX[31:0] +1)).
5358 ///
5359 UINT32 ResourceMonitoringID:32;
5360 ///
5361 /// [Bits 63:32] COS (R/W). The class of service (COS) to enforce (on
5362 /// writes); returns the current COS when read. If ( CPUID.(EAX=07H,
5363 /// ECX=0):EBX.[15] = 1 ).
5364 ///
5365 UINT32 COS:32;
5366 } Bits;
5367 ///
5368 /// All bit fields as a 64-bit value
5369 ///
5370 UINT64 Uint64;
5371 } MSR_IA32_PQR_ASSOC_REGISTER;
5372
5373
5374 /**
5375 Supervisor State of MPX Configuration. (R/W). If (CPUID.(EAX=07H,
5376 ECX=0H):EBX[14] = 1).
5377
5378 @param ECX MSR_IA32_BNDCFGS (0x00000D90)
5379 @param EAX Lower 32-bits of MSR value.
5380 Described by the type MSR_IA32_BNDCFGS_REGISTER.
5381 @param EDX Upper 32-bits of MSR value.
5382 Described by the type MSR_IA32_BNDCFGS_REGISTER.
5383
5384 <b>Example usage</b>
5385 @code
5386 MSR_IA32_BNDCFGS_REGISTER Msr;
5387
5388 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_BNDCFGS);
5389 AsmWriteMsr64 (MSR_IA32_BNDCFGS, Msr.Uint64);
5390 @endcode
5391 **/
5392 #define MSR_IA32_BNDCFGS 0x00000D90
5393
5394 /**
5395 MSR information returned for MSR index #MSR_IA32_BNDCFGS
5396 **/
5397 typedef union {
5398 ///
5399 /// Individual bit fields
5400 ///
5401 struct {
5402 ///
5403 /// [Bit 0] EN: Enable Intel MPX in supervisor mode.
5404 ///
5405 UINT32 EN:1;
5406 ///
5407 /// [Bit 1] BNDPRESERVE: Preserve the bounds registers for near branch
5408 /// instructions in the absence of the BND prefix.
5409 ///
5410 UINT32 BNDPRESERVE:1;
5411 UINT32 Reserved:10;
5412 ///
5413 /// [Bits 31:12] Base Address of Bound Directory.
5414 ///
5415 UINT32 Base:20;
5416 ///
5417 /// [Bits 63:32] Base Address of Bound Directory.
5418 ///
5419 UINT32 BaseHi:32;
5420 } Bits;
5421 ///
5422 /// All bit fields as a 64-bit value
5423 ///
5424 UINT64 Uint64;
5425 } MSR_IA32_BNDCFGS_REGISTER;
5426
5427
5428 /**
5429 Extended Supervisor State Mask (R/W). If( CPUID.(0DH, 1):EAX.[3] = 1.
5430
5431 @param ECX MSR_IA32_XSS (0x00000DA0)
5432 @param EAX Lower 32-bits of MSR value.
5433 Described by the type MSR_IA32_XSS_REGISTER.
5434 @param EDX Upper 32-bits of MSR value.
5435 Described by the type MSR_IA32_XSS_REGISTER.
5436
5437 <b>Example usage</b>
5438 @code
5439 MSR_IA32_XSS_REGISTER Msr;
5440
5441 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_XSS);
5442 AsmWriteMsr64 (MSR_IA32_XSS, Msr.Uint64);
5443 @endcode
5444 **/
5445 #define MSR_IA32_XSS 0x00000DA0
5446
5447 /**
5448 MSR information returned for MSR index #MSR_IA32_XSS
5449 **/
5450 typedef union {
5451 ///
5452 /// Individual bit fields
5453 ///
5454 struct {
5455 UINT32 Reserved1:8;
5456 ///
5457 /// [Bit 8] Trace Packet Configuration State (R/W).
5458 ///
5459 UINT32 TracePacketConfigurationState:1;
5460 UINT32 Reserved2:23;
5461 UINT32 Reserved3:32;
5462 } Bits;
5463 ///
5464 /// All bit fields as a 32-bit value
5465 ///
5466 UINT32 Uint32;
5467 ///
5468 /// All bit fields as a 64-bit value
5469 ///
5470 UINT64 Uint64;
5471 } MSR_IA32_XSS_REGISTER;
5472
5473
5474 /**
5475 Package Level Enable/disable HDC (R/W). If CPUID.06H:EAX.[13] = 1.
5476
5477 @param ECX MSR_IA32_PKG_HDC_CTL (0x00000DB0)
5478 @param EAX Lower 32-bits of MSR value.
5479 Described by the type MSR_IA32_PKG_HDC_CTL_REGISTER.
5480 @param EDX Upper 32-bits of MSR value.
5481 Described by the type MSR_IA32_PKG_HDC_CTL_REGISTER.
5482
5483 <b>Example usage</b>
5484 @code
5485 MSR_IA32_PKG_HDC_CTL_REGISTER Msr;
5486
5487 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_PKG_HDC_CTL);
5488 AsmWriteMsr64 (MSR_IA32_PKG_HDC_CTL, Msr.Uint64);
5489 @endcode
5490 **/
5491 #define MSR_IA32_PKG_HDC_CTL 0x00000DB0
5492
5493 /**
5494 MSR information returned for MSR index #MSR_IA32_PKG_HDC_CTL
5495 **/
5496 typedef union {
5497 ///
5498 /// Individual bit fields
5499 ///
5500 struct {
5501 ///
5502 /// [Bit 0] HDC_Pkg_Enable (R/W) Force HDC idling or wake up HDC-idled
5503 /// logical processors in the package. See Section 14.5.2, "Package level
5504 /// Enabling HDC". If CPUID.06H:EAX.[13] = 1.
5505 ///
5506 UINT32 HDC_Pkg_Enable:1;
5507 UINT32 Reserved1:31;
5508 UINT32 Reserved2:32;
5509 } Bits;
5510 ///
5511 /// All bit fields as a 32-bit value
5512 ///
5513 UINT32 Uint32;
5514 ///
5515 /// All bit fields as a 64-bit value
5516 ///
5517 UINT64 Uint64;
5518 } MSR_IA32_PKG_HDC_CTL_REGISTER;
5519
5520
5521 /**
5522 Enable/disable HWP (R/W). If CPUID.06H:EAX.[13] = 1.
5523
5524 @param ECX MSR_IA32_PM_CTL1 (0x00000DB1)
5525 @param EAX Lower 32-bits of MSR value.
5526 Described by the type MSR_IA32_PM_CTL1_REGISTER.
5527 @param EDX Upper 32-bits of MSR value.
5528 Described by the type MSR_IA32_PM_CTL1_REGISTER.
5529
5530 <b>Example usage</b>
5531 @code
5532 MSR_IA32_PM_CTL1_REGISTER Msr;
5533
5534 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_PM_CTL1);
5535 AsmWriteMsr64 (MSR_IA32_PM_CTL1, Msr.Uint64);
5536 @endcode
5537 **/
5538 #define MSR_IA32_PM_CTL1 0x00000DB1
5539
5540 /**
5541 MSR information returned for MSR index #MSR_IA32_PM_CTL1
5542 **/
5543 typedef union {
5544 ///
5545 /// Individual bit fields
5546 ///
5547 struct {
5548 ///
5549 /// [Bit 0] HDC_Allow_Block (R/W) Allow/Block this logical processor for
5550 /// package level HDC control. See Section 14.5.3.
5551 /// If CPUID.06H:EAX.[13] = 1.
5552 ///
5553 UINT32 HDC_Allow_Block:1;
5554 UINT32 Reserved1:31;
5555 UINT32 Reserved2:32;
5556 } Bits;
5557 ///
5558 /// All bit fields as a 32-bit value
5559 ///
5560 UINT32 Uint32;
5561 ///
5562 /// All bit fields as a 64-bit value
5563 ///
5564 UINT64 Uint64;
5565 } MSR_IA32_PM_CTL1_REGISTER;
5566
5567
5568 /**
5569 Per-Logical_Processor HDC Idle Residency (R/0). If CPUID.06H:EAX.[13] = 1.
5570 Stall_Cycle_Cnt (R/W) Stalled cycles due to HDC forced idle on this logical
5571 processor. See Section 14.5.4.1. If CPUID.06H:EAX.[13] = 1.
5572
5573 @param ECX MSR_IA32_THREAD_STALL (0x00000DB2)
5574 @param EAX Lower 32-bits of MSR value.
5575 @param EDX Upper 32-bits of MSR value.
5576
5577 <b>Example usage</b>
5578 @code
5579 UINT64 Msr;
5580
5581 Msr = AsmReadMsr64 (MSR_IA32_THREAD_STALL);
5582 @endcode
5583 **/
5584 #define MSR_IA32_THREAD_STALL 0x00000DB2
5585
5586
5587 /**
5588 Extended Feature Enables. If ( CPUID.80000001H:EDX.[2 0]
5589 CPUID.80000001H:EDX.[2 9]).
5590
5591 @param ECX MSR_IA32_EFER (0xC0000080)
5592 @param EAX Lower 32-bits of MSR value.
5593 Described by the type MSR_IA32_EFER_REGISTER.
5594 @param EDX Upper 32-bits of MSR value.
5595 Described by the type MSR_IA32_EFER_REGISTER.
5596
5597 <b>Example usage</b>
5598 @code
5599 MSR_IA32_EFER_REGISTER Msr;
5600
5601 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_EFER);
5602 AsmWriteMsr64 (MSR_IA32_EFER, Msr.Uint64);
5603 @endcode
5604 **/
5605 #define MSR_IA32_EFER 0xC0000080
5606
5607 /**
5608 MSR information returned for MSR index #MSR_IA32_EFER
5609 **/
5610 typedef union {
5611 ///
5612 /// Individual bit fields
5613 ///
5614 struct {
5615 ///
5616 /// [Bit 0] SYSCALL Enable: IA32_EFER.SCE (R/W) Enables SYSCALL/SYSRET
5617 /// instructions in 64-bit mode.
5618 ///
5619 UINT32 SCE:1;
5620 UINT32 Reserved1:7;
5621 ///
5622 /// [Bit 8] IA-32e Mode Enable: IA32_EFER.LME (R/W) Enables IA-32e mode
5623 /// operation.
5624 ///
5625 UINT32 LME:1;
5626 UINT32 Reserved2:1;
5627 ///
5628 /// [Bit 10] IA-32e Mode Active: IA32_EFER.LMA (R) Indicates IA-32e mode
5629 /// is active when set.
5630 ///
5631 UINT32 LMA:1;
5632 ///
5633 /// [Bit 11] Execute Disable Bit Enable: IA32_EFER.NXE (R/W).
5634 ///
5635 UINT32 NXE:1;
5636 UINT32 Reserved3:20;
5637 UINT32 Reserved4:32;
5638 } Bits;
5639 ///
5640 /// All bit fields as a 32-bit value
5641 ///
5642 UINT32 Uint32;
5643 ///
5644 /// All bit fields as a 64-bit value
5645 ///
5646 UINT64 Uint64;
5647 } MSR_IA32_EFER_REGISTER;
5648
5649
5650 /**
5651 System Call Target Address (R/W). If CPUID.80000001:EDX.[29] = 1.
5652
5653 @param ECX MSR_IA32_STAR (0xC0000081)
5654 @param EAX Lower 32-bits of MSR value.
5655 @param EDX Upper 32-bits of MSR value.
5656
5657 <b>Example usage</b>
5658 @code
5659 UINT64 Msr;
5660
5661 Msr = AsmReadMsr64 (MSR_IA32_STAR);
5662 AsmWriteMsr64 (MSR_IA32_STAR, Msr);
5663 @endcode
5664 **/
5665 #define MSR_IA32_STAR 0xC0000081
5666
5667
5668 /**
5669 IA-32e Mode System Call Target Address (R/W). If CPUID.80000001:EDX.[29] = 1.
5670
5671 @param ECX MSR_IA32_LSTAR (0xC0000082)
5672 @param EAX Lower 32-bits of MSR value.
5673 @param EDX Upper 32-bits of MSR value.
5674
5675 <b>Example usage</b>
5676 @code
5677 UINT64 Msr;
5678
5679 Msr = AsmReadMsr64 (MSR_IA32_LSTAR);
5680 AsmWriteMsr64 (MSR_IA32_LSTAR, Msr);
5681 @endcode
5682 **/
5683 #define MSR_IA32_LSTAR 0xC0000082
5684
5685
5686 /**
5687 System Call Flag Mask (R/W). If CPUID.80000001:EDX.[29] = 1.
5688
5689 @param ECX MSR_IA32_FMASK (0xC0000084)
5690 @param EAX Lower 32-bits of MSR value.
5691 @param EDX Upper 32-bits of MSR value.
5692
5693 <b>Example usage</b>
5694 @code
5695 UINT64 Msr;
5696
5697 Msr = AsmReadMsr64 (MSR_IA32_FMASK);
5698 AsmWriteMsr64 (MSR_IA32_FMASK, Msr);
5699 @endcode
5700 **/
5701 #define MSR_IA32_FMASK 0xC0000084
5702
5703
5704 /**
5705 Map of BASE Address of FS (R/W). If CPUID.80000001:EDX.[29] = 1.
5706
5707 @param ECX MSR_IA32_FS_BASE (0xC0000100)
5708 @param EAX Lower 32-bits of MSR value.
5709 @param EDX Upper 32-bits of MSR value.
5710
5711 <b>Example usage</b>
5712 @code
5713 UINT64 Msr;
5714
5715 Msr = AsmReadMsr64 (MSR_IA32_FS_BASE);
5716 AsmWriteMsr64 (MSR_IA32_FS_BASE, Msr);
5717 @endcode
5718 **/
5719 #define MSR_IA32_FS_BASE 0xC0000100
5720
5721
5722 /**
5723 Map of BASE Address of GS (R/W). If CPUID.80000001:EDX.[29] = 1.
5724
5725 @param ECX MSR_IA32_GS_BASE (0xC0000101)
5726 @param EAX Lower 32-bits of MSR value.
5727 @param EDX Upper 32-bits of MSR value.
5728
5729 <b>Example usage</b>
5730 @code
5731 UINT64 Msr;
5732
5733 Msr = AsmReadMsr64 (MSR_IA32_GS_BASE);
5734 AsmWriteMsr64 (MSR_IA32_GS_BASE, Msr);
5735 @endcode
5736 **/
5737 #define MSR_IA32_GS_BASE 0xC0000101
5738
5739
5740 /**
5741 Swap Target of BASE Address of GS (R/W). If CPUID.80000001:EDX.[29] = 1.
5742
5743 @param ECX MSR_IA32_KERNEL_GS_BASE (0xC0000102)
5744 @param EAX Lower 32-bits of MSR value.
5745 @param EDX Upper 32-bits of MSR value.
5746
5747 <b>Example usage</b>
5748 @code
5749 UINT64 Msr;
5750
5751 Msr = AsmReadMsr64 (MSR_IA32_KERNEL_GS_BASE);
5752 AsmWriteMsr64 (MSR_IA32_KERNEL_GS_BASE, Msr);
5753 @endcode
5754 **/
5755 #define MSR_IA32_KERNEL_GS_BASE 0xC0000102
5756
5757
5758 /**
5759 Auxiliary TSC (RW). If CPUID.80000001H: EDX[27] = 1.
5760
5761 @param ECX MSR_IA32_TSC_AUX (0xC0000103)
5762 @param EAX Lower 32-bits of MSR value.
5763 Described by the type MSR_IA32_TSC_AUX_REGISTER.
5764 @param EDX Upper 32-bits of MSR value.
5765 Described by the type MSR_IA32_TSC_AUX_REGISTER.
5766
5767 <b>Example usage</b>
5768 @code
5769 MSR_IA32_TSC_AUX_REGISTER Msr;
5770
5771 Msr.Uint64 = AsmReadMsr64 (MSR_IA32_TSC_AUX);
5772 AsmWriteMsr64 (MSR_IA32_TSC_AUX, Msr.Uint64);
5773 @endcode
5774 **/
5775 #define MSR_IA32_TSC_AUX 0xC0000103
5776
5777 /**
5778 MSR information returned for MSR index #MSR_IA32_TSC_AUX
5779 **/
5780 typedef union {
5781 ///
5782 /// Individual bit fields
5783 ///
5784 struct {
5785 ///
5786 /// [Bits 31:0] AUX: Auxiliary signature of TSC.
5787 ///
5788 UINT32 AUX:32;
5789 UINT32 Reserved:32;
5790 } Bits;
5791 ///
5792 /// All bit fields as a 32-bit value
5793 ///
5794 UINT32 Uint32;
5795 ///
5796 /// All bit fields as a 64-bit value
5797 ///
5798 UINT64 Uint64;
5799 } MSR_IA32_TSC_AUX_REGISTER;
5800
5801 #endif