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