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