]> git.proxmox.com Git - mirror_edk2.git/blob - UefiCpuPkg/Include/Register/Msr/CoreMsr.h
UefiCpuPkg/Msr: Add CPUID signature check MACROs
[mirror_edk2.git] / UefiCpuPkg / Include / Register / Msr / CoreMsr.h
1 /** @file
2 MSR Definitions for Intel Core Solo and Intel Core Duo Processors.
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 - 2017, Intel Corporation. All rights reserved.<BR>
10 This program and the accompanying materials
11 are licensed and made available under the terms and conditions of the BSD License
12 which accompanies this distribution. The full text of the license may be found at
13 http://opensource.org/licenses/bsd-license.php
14
15 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
16 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17
18 @par Specification Reference:
19 Intel(R) 64 and IA-32 Architectures Software Developer's Manual, Volume 3,
20 September 2016, Chapter 35 Model-Specific-Registers (MSR), Section 35.19.
21
22 **/
23
24 #ifndef __CORE_MSR_H__
25 #define __CORE_MSR_H__
26
27 #include <Register/ArchitecturalMsr.h>
28
29 /**
30 Is Intel Core Solo and Intel Core Duo Processors?
31
32 @param DisplayFamily Display Family ID
33 @param DisplayModel Display Model ID
34
35 @retval TRUE Yes, it is.
36 @retval FALSE No, it isn't.
37 **/
38 #define IS_CORE_PROCESSOR(DisplayFamily, DisplayModel) \
39 (DisplayFamily == 0x06 && \
40 ( \
41 DisplayModel == 0x0E \
42 ) \
43 )
44
45 /**
46 Unique. See Section 35.22, "MSRs in Pentium Processors," and see Table 35-2.
47
48 @param ECX MSR_CORE_P5_MC_ADDR (0x00000000)
49 @param EAX Lower 32-bits of MSR value.
50 @param EDX Upper 32-bits of MSR value.
51
52 <b>Example usage</b>
53 @code
54 UINT64 Msr;
55
56 Msr = AsmReadMsr64 (MSR_CORE_P5_MC_ADDR);
57 AsmWriteMsr64 (MSR_CORE_P5_MC_ADDR, Msr);
58 @endcode
59 @note MSR_CORE_P5_MC_ADDR is defined as P5_MC_ADDR in SDM.
60 **/
61 #define MSR_CORE_P5_MC_ADDR 0x00000000
62
63
64 /**
65 Unique. See Section 35.22, "MSRs in Pentium Processors," and see Table 35-2.
66
67 @param ECX MSR_CORE_P5_MC_TYPE (0x00000001)
68 @param EAX Lower 32-bits of MSR value.
69 @param EDX Upper 32-bits of MSR value.
70
71 <b>Example usage</b>
72 @code
73 UINT64 Msr;
74
75 Msr = AsmReadMsr64 (MSR_CORE_P5_MC_TYPE);
76 AsmWriteMsr64 (MSR_CORE_P5_MC_TYPE, Msr);
77 @endcode
78 @note MSR_CORE_P5_MC_TYPE is defined as P5_MC_TYPE in SDM.
79 **/
80 #define MSR_CORE_P5_MC_TYPE 0x00000001
81
82
83 /**
84 Shared. Processor Hard Power-On Configuration (R/W) Enables and disables
85 processor features; (R) indicates current processor configuration.
86
87 @param ECX MSR_CORE_EBL_CR_POWERON (0x0000002A)
88 @param EAX Lower 32-bits of MSR value.
89 Described by the type MSR_CORE_EBL_CR_POWERON_REGISTER.
90 @param EDX Upper 32-bits of MSR value.
91 Described by the type MSR_CORE_EBL_CR_POWERON_REGISTER.
92
93 <b>Example usage</b>
94 @code
95 MSR_CORE_EBL_CR_POWERON_REGISTER Msr;
96
97 Msr.Uint64 = AsmReadMsr64 (MSR_CORE_EBL_CR_POWERON);
98 AsmWriteMsr64 (MSR_CORE_EBL_CR_POWERON, Msr.Uint64);
99 @endcode
100 @note MSR_CORE_EBL_CR_POWERON is defined as MSR_EBL_CR_POWERON in SDM.
101 **/
102 #define MSR_CORE_EBL_CR_POWERON 0x0000002A
103
104 /**
105 MSR information returned for MSR index #MSR_CORE_EBL_CR_POWERON
106 **/
107 typedef union {
108 ///
109 /// Individual bit fields
110 ///
111 struct {
112 UINT32 Reserved1:1;
113 ///
114 /// [Bit 1] Data Error Checking Enable (R/W) 1 = Enabled; 0 = Disabled
115 /// Note: Not all processor implements R/W.
116 ///
117 UINT32 DataErrorCheckingEnable:1;
118 ///
119 /// [Bit 2] Response Error Checking Enable (R/W) 1 = Enabled; 0 = Disabled
120 /// Note: Not all processor implements R/W.
121 ///
122 UINT32 ResponseErrorCheckingEnable:1;
123 ///
124 /// [Bit 3] MCERR# Drive Enable (R/W) 1 = Enabled; 0 = Disabled Note: Not
125 /// all processor implements R/W.
126 ///
127 UINT32 MCERR_DriveEnable:1;
128 ///
129 /// [Bit 4] Address Parity Enable (R/W) 1 = Enabled; 0 = Disabled Note:
130 /// Not all processor implements R/W.
131 ///
132 UINT32 AddressParityEnable:1;
133 UINT32 Reserved2:2;
134 ///
135 /// [Bit 7] BINIT# Driver Enable (R/W) 1 = Enabled; 0 = Disabled Note: Not
136 /// all processor implements R/W.
137 ///
138 UINT32 BINIT_DriverEnable:1;
139 ///
140 /// [Bit 8] Output Tri-state Enabled (R/O) 1 = Enabled; 0 = Disabled.
141 ///
142 UINT32 OutputTriStateEnable:1;
143 ///
144 /// [Bit 9] Execute BIST (R/O) 1 = Enabled; 0 = Disabled.
145 ///
146 UINT32 ExecuteBIST:1;
147 ///
148 /// [Bit 10] MCERR# Observation Enabled (R/O) 1 = Enabled; 0 = Disabled.
149 ///
150 UINT32 MCERR_ObservationEnabled:1;
151 UINT32 Reserved3:1;
152 ///
153 /// [Bit 12] BINIT# Observation Enabled (R/O) 1 = Enabled; 0 = Disabled.
154 ///
155 UINT32 BINIT_ObservationEnabled:1;
156 UINT32 Reserved4:1;
157 ///
158 /// [Bit 14] 1 MByte Power on Reset Vector (R/O) 1 = 1 MByte; 0 = 4 GBytes.
159 ///
160 UINT32 ResetVector:1;
161 UINT32 Reserved5:1;
162 ///
163 /// [Bits 17:16] APIC Cluster ID (R/O).
164 ///
165 UINT32 APICClusterID:2;
166 ///
167 /// [Bit 18] System Bus Frequency (R/O) 1. = 100 MHz 2. = Reserved.
168 ///
169 UINT32 SystemBusFrequency:1;
170 UINT32 Reserved6:1;
171 ///
172 /// [Bits 21:20] Symmetric Arbitration ID (R/O).
173 ///
174 UINT32 SymmetricArbitrationID:2;
175 ///
176 /// [Bits 26:22] Clock Frequency Ratio (R/O).
177 ///
178 UINT32 ClockFrequencyRatio:5;
179 UINT32 Reserved7:5;
180 UINT32 Reserved8:32;
181 } Bits;
182 ///
183 /// All bit fields as a 32-bit value
184 ///
185 UINT32 Uint32;
186 ///
187 /// All bit fields as a 64-bit value
188 ///
189 UINT64 Uint64;
190 } MSR_CORE_EBL_CR_POWERON_REGISTER;
191
192
193 /**
194 Unique. Last Branch Record n (R/W) One of 8 last branch record registers on
195 the last branch record stack: bits 31-0 hold the 'from' address and bits
196 63-32 hold the 'to' address. See also: - Last Branch Record Stack TOS at
197 1C9H - Section 17.13, "Last Branch, Interrupt, and Exception Recording
198 (Pentium M Processors).".
199
200 @param ECX MSR_CORE_LASTBRANCH_n
201 @param EAX Lower 32-bits of MSR value.
202 @param EDX Upper 32-bits of MSR value.
203
204 <b>Example usage</b>
205 @code
206 UINT64 Msr;
207
208 Msr = AsmReadMsr64 (MSR_CORE_LASTBRANCH_0);
209 AsmWriteMsr64 (MSR_CORE_LASTBRANCH_0, Msr);
210 @endcode
211 @note MSR_CORE_LASTBRANCH_0 is defined as MSR_LASTBRANCH_0 in SDM.
212 MSR_CORE_LASTBRANCH_1 is defined as MSR_LASTBRANCH_1 in SDM.
213 MSR_CORE_LASTBRANCH_2 is defined as MSR_LASTBRANCH_2 in SDM.
214 MSR_CORE_LASTBRANCH_3 is defined as MSR_LASTBRANCH_3 in SDM.
215 MSR_CORE_LASTBRANCH_4 is defined as MSR_LASTBRANCH_4 in SDM.
216 MSR_CORE_LASTBRANCH_5 is defined as MSR_LASTBRANCH_5 in SDM.
217 MSR_CORE_LASTBRANCH_6 is defined as MSR_LASTBRANCH_6 in SDM.
218 MSR_CORE_LASTBRANCH_7 is defined as MSR_LASTBRANCH_7 in SDM.
219 @{
220 **/
221 #define MSR_CORE_LASTBRANCH_0 0x00000040
222 #define MSR_CORE_LASTBRANCH_1 0x00000041
223 #define MSR_CORE_LASTBRANCH_2 0x00000042
224 #define MSR_CORE_LASTBRANCH_3 0x00000043
225 #define MSR_CORE_LASTBRANCH_4 0x00000044
226 #define MSR_CORE_LASTBRANCH_5 0x00000045
227 #define MSR_CORE_LASTBRANCH_6 0x00000046
228 #define MSR_CORE_LASTBRANCH_7 0x00000047
229 /// @}
230
231
232 /**
233 Shared. Scalable Bus Speed (RO) This field indicates the scalable bus
234 clock speed:.
235
236 @param ECX MSR_CORE_FSB_FREQ (0x000000CD)
237 @param EAX Lower 32-bits of MSR value.
238 Described by the type MSR_CORE_FSB_FREQ_REGISTER.
239 @param EDX Upper 32-bits of MSR value.
240 Described by the type MSR_CORE_FSB_FREQ_REGISTER.
241
242 <b>Example usage</b>
243 @code
244 MSR_CORE_FSB_FREQ_REGISTER Msr;
245
246 Msr.Uint64 = AsmReadMsr64 (MSR_CORE_FSB_FREQ);
247 @endcode
248 @note MSR_CORE_FSB_FREQ is defined as MSR_FSB_FREQ in SDM.
249 **/
250 #define MSR_CORE_FSB_FREQ 0x000000CD
251
252 /**
253 MSR information returned for MSR index #MSR_CORE_FSB_FREQ
254 **/
255 typedef union {
256 ///
257 /// Individual bit fields
258 ///
259 struct {
260 ///
261 /// [Bits 2:0] - Scalable Bus Speed
262 /// 101B: 100 MHz (FSB 400)
263 /// 001B: 133 MHz (FSB 533)
264 /// 011B: 167 MHz (FSB 667)
265 ///
266 /// 133.33 MHz should be utilized if performing calculation with System Bus
267 /// Speed when encoding is 101B. 166.67 MHz should be utilized if
268 /// performing calculation with System Bus Speed when encoding is 001B.
269 ///
270 UINT32 ScalableBusSpeed:3;
271 UINT32 Reserved1:29;
272 UINT32 Reserved2:32;
273 } Bits;
274 ///
275 /// All bit fields as a 32-bit value
276 ///
277 UINT32 Uint32;
278 ///
279 /// All bit fields as a 64-bit value
280 ///
281 UINT64 Uint64;
282 } MSR_CORE_FSB_FREQ_REGISTER;
283
284
285 /**
286 Shared.
287
288 @param ECX MSR_CORE_BBL_CR_CTL3 (0x0000011E)
289 @param EAX Lower 32-bits of MSR value.
290 Described by the type MSR_CORE_BBL_CR_CTL3_REGISTER.
291 @param EDX Upper 32-bits of MSR value.
292 Described by the type MSR_CORE_BBL_CR_CTL3_REGISTER.
293
294 <b>Example usage</b>
295 @code
296 MSR_CORE_BBL_CR_CTL3_REGISTER Msr;
297
298 Msr.Uint64 = AsmReadMsr64 (MSR_CORE_BBL_CR_CTL3);
299 AsmWriteMsr64 (MSR_CORE_BBL_CR_CTL3, Msr.Uint64);
300 @endcode
301 @note MSR_CORE_BBL_CR_CTL3 is defined as MSR_BBL_CR_CTL3 in SDM.
302 **/
303 #define MSR_CORE_BBL_CR_CTL3 0x0000011E
304
305 /**
306 MSR information returned for MSR index #MSR_CORE_BBL_CR_CTL3
307 **/
308 typedef union {
309 ///
310 /// Individual bit fields
311 ///
312 struct {
313 ///
314 /// [Bit 0] L2 Hardware Enabled (RO) 1 = If the L2 is hardware-enabled 0 =
315 /// Indicates if the L2 is hardware-disabled.
316 ///
317 UINT32 L2HardwareEnabled:1;
318 UINT32 Reserved1:7;
319 ///
320 /// [Bit 8] L2 Enabled (R/W) 1 = L2 cache has been initialized 0 =
321 /// Disabled (default) Until this bit is set the processor will not
322 /// respond to the WBINVD instruction or the assertion of the FLUSH# input.
323 ///
324 UINT32 L2Enabled:1;
325 UINT32 Reserved2:14;
326 ///
327 /// [Bit 23] L2 Not Present (RO) 1. = L2 Present 2. = L2 Not Present.
328 ///
329 UINT32 L2NotPresent:1;
330 UINT32 Reserved3:8;
331 UINT32 Reserved4:32;
332 } Bits;
333 ///
334 /// All bit fields as a 32-bit value
335 ///
336 UINT32 Uint32;
337 ///
338 /// All bit fields as a 64-bit value
339 ///
340 UINT64 Uint64;
341 } MSR_CORE_BBL_CR_CTL3_REGISTER;
342
343
344 /**
345 Unique.
346
347 @param ECX MSR_CORE_THERM2_CTL (0x0000019D)
348 @param EAX Lower 32-bits of MSR value.
349 Described by the type MSR_CORE_THERM2_CTL_REGISTER.
350 @param EDX Upper 32-bits of MSR value.
351 Described by the type MSR_CORE_THERM2_CTL_REGISTER.
352
353 <b>Example usage</b>
354 @code
355 MSR_CORE_THERM2_CTL_REGISTER Msr;
356
357 Msr.Uint64 = AsmReadMsr64 (MSR_CORE_THERM2_CTL);
358 AsmWriteMsr64 (MSR_CORE_THERM2_CTL, Msr.Uint64);
359 @endcode
360 @note MSR_CORE_THERM2_CTL is defined as MSR_THERM2_CTL in SDM.
361 **/
362 #define MSR_CORE_THERM2_CTL 0x0000019D
363
364 /**
365 MSR information returned for MSR index #MSR_CORE_THERM2_CTL
366 **/
367 typedef union {
368 ///
369 /// Individual bit fields
370 ///
371 struct {
372 UINT32 Reserved1:16;
373 ///
374 /// [Bit 16] TM_SELECT (R/W) Mode of automatic thermal monitor: 1. =
375 /// Thermal Monitor 1 (thermally-initiated on-die modulation of the
376 /// stop-clock duty cycle) 2. = Thermal Monitor 2 (thermally-initiated
377 /// frequency transitions) If bit 3 of the IA32_MISC_ENABLE register is
378 /// cleared, TM_SELECT has no effect. Neither TM1 nor TM2 will be enabled.
379 ///
380 UINT32 TM_SELECT:1;
381 UINT32 Reserved2:15;
382 UINT32 Reserved3:32;
383 } Bits;
384 ///
385 /// All bit fields as a 32-bit value
386 ///
387 UINT32 Uint32;
388 ///
389 /// All bit fields as a 64-bit value
390 ///
391 UINT64 Uint64;
392 } MSR_CORE_THERM2_CTL_REGISTER;
393
394
395 /**
396 Enable Miscellaneous Processor Features (R/W) Allows a variety of processor
397 functions to be enabled and disabled.
398
399 @param ECX MSR_CORE_IA32_MISC_ENABLE (0x000001A0)
400 @param EAX Lower 32-bits of MSR value.
401 Described by the type MSR_CORE_IA32_MISC_ENABLE_REGISTER.
402 @param EDX Upper 32-bits of MSR value.
403 Described by the type MSR_CORE_IA32_MISC_ENABLE_REGISTER.
404
405 <b>Example usage</b>
406 @code
407 MSR_CORE_IA32_MISC_ENABLE_REGISTER Msr;
408
409 Msr.Uint64 = AsmReadMsr64 (MSR_CORE_IA32_MISC_ENABLE);
410 AsmWriteMsr64 (MSR_CORE_IA32_MISC_ENABLE, Msr.Uint64);
411 @endcode
412 @note MSR_CORE_IA32_MISC_ENABLE is defined as IA32_MISC_ENABLE in SDM.
413 **/
414 #define MSR_CORE_IA32_MISC_ENABLE 0x000001A0
415
416 /**
417 MSR information returned for MSR index #MSR_CORE_IA32_MISC_ENABLE
418 **/
419 typedef union {
420 ///
421 /// Individual bit fields
422 ///
423 struct {
424 UINT32 Reserved1:3;
425 ///
426 /// [Bit 3] Unique. Automatic Thermal Control Circuit Enable (R/W) See
427 /// Table 35-2.
428 ///
429 UINT32 AutomaticThermalControlCircuit:1;
430 UINT32 Reserved2:3;
431 ///
432 /// [Bit 7] Shared. Performance Monitoring Available (R) See Table 35-2.
433 ///
434 UINT32 PerformanceMonitoring:1;
435 UINT32 Reserved3:2;
436 ///
437 /// [Bit 10] Shared. FERR# Multiplexing Enable (R/W) 1 = FERR# asserted by
438 /// the processor to indicate a pending break event within the processor 0
439 /// = Indicates compatible FERR# signaling behavior This bit must be set
440 /// to 1 to support XAPIC interrupt model usage.
441 ///
442 UINT32 FERR:1;
443 ///
444 /// [Bit 11] Shared. Branch Trace Storage Unavailable (RO) See Table 35-2.
445 ///
446 UINT32 BTS:1;
447 UINT32 Reserved4:1;
448 ///
449 /// [Bit 13] Shared. TM2 Enable (R/W) When this bit is set (1) and the
450 /// thermal sensor indicates that the die temperature is at the
451 /// pre-determined threshold, the Thermal Monitor 2 mechanism is engaged.
452 /// TM2 will reduce the bus to core ratio and voltage according to the
453 /// value last written to MSR_THERM2_CTL bits 15:0. When this bit is clear
454 /// (0, default), the processor does not change the VID signals or the bus
455 /// to core ratio when the processor enters a thermal managed state. If
456 /// the TM2 feature flag (ECX[8]) is not set to 1 after executing CPUID
457 /// with EAX = 1, then this feature is not supported and BIOS must not
458 /// alter the contents of this bit location. The processor is operating
459 /// out of spec if both this bit and the TM1 bit are set to disabled
460 /// states.
461 ///
462 UINT32 TM2:1;
463 UINT32 Reserved5:2;
464 ///
465 /// [Bit 16] Shared. Enhanced Intel SpeedStep Technology Enable (R/W) 1 =
466 /// Enhanced Intel SpeedStep Technology enabled.
467 ///
468 UINT32 EIST:1;
469 UINT32 Reserved6:1;
470 ///
471 /// [Bit 18] Shared. ENABLE MONITOR FSM (R/W) See Table 35-2.
472 ///
473 UINT32 MONITOR:1;
474 UINT32 Reserved7:1;
475 UINT32 Reserved8:2;
476 ///
477 /// [Bit 22] Shared. Limit CPUID Maxval (R/W) See Table 35-2. Setting this
478 /// bit may cause behavior in software that depends on the availability of
479 /// CPUID leaves greater than 2.
480 ///
481 UINT32 LimitCpuidMaxval:1;
482 UINT32 Reserved9:9;
483 UINT32 Reserved10:2;
484 ///
485 /// [Bit 34] Shared. XD Bit Disable (R/W) See Table 35-2.
486 ///
487 UINT32 XD:1;
488 UINT32 Reserved11:29;
489 } Bits;
490 ///
491 /// All bit fields as a 64-bit value
492 ///
493 UINT64 Uint64;
494 } MSR_CORE_IA32_MISC_ENABLE_REGISTER;
495
496
497 /**
498 Unique. Last Branch Record Stack TOS (R/W) Contains an index (bits 0-3)
499 that points to the MSR containing the most recent branch record. See
500 MSR_LASTBRANCH_0_FROM_IP (at 40H).
501
502 @param ECX MSR_CORE_LASTBRANCH_TOS (0x000001C9)
503 @param EAX Lower 32-bits of MSR value.
504 @param EDX Upper 32-bits of MSR value.
505
506 <b>Example usage</b>
507 @code
508 UINT64 Msr;
509
510 Msr = AsmReadMsr64 (MSR_CORE_LASTBRANCH_TOS);
511 AsmWriteMsr64 (MSR_CORE_LASTBRANCH_TOS, Msr);
512 @endcode
513 @note MSR_CORE_LASTBRANCH_TOS is defined as MSR_LASTBRANCH_TOS in SDM.
514 **/
515 #define MSR_CORE_LASTBRANCH_TOS 0x000001C9
516
517
518 /**
519 Unique. Last Exception Record From Linear IP (R) Contains a pointer to the
520 last branch instruction that the processor executed prior to the last
521 exception that was generated or the last interrupt that was handled.
522
523 @param ECX MSR_CORE_LER_FROM_LIP (0x000001DD)
524 @param EAX Lower 32-bits of MSR value.
525 @param EDX Upper 32-bits of MSR value.
526
527 <b>Example usage</b>
528 @code
529 UINT64 Msr;
530
531 Msr = AsmReadMsr64 (MSR_CORE_LER_FROM_LIP);
532 @endcode
533 @note MSR_CORE_LER_FROM_LIP is defined as MSR_LER_FROM_LIP in SDM.
534 **/
535 #define MSR_CORE_LER_FROM_LIP 0x000001DD
536
537
538 /**
539 Unique. Last Exception Record To Linear IP (R) This area contains a pointer
540 to the target of the last branch instruction that the processor executed
541 prior to the last exception that was generated or the last interrupt that
542 was handled.
543
544 @param ECX MSR_CORE_LER_TO_LIP (0x000001DE)
545 @param EAX Lower 32-bits of MSR value.
546 @param EDX Upper 32-bits of MSR value.
547
548 <b>Example usage</b>
549 @code
550 UINT64 Msr;
551
552 Msr = AsmReadMsr64 (MSR_CORE_LER_TO_LIP);
553 @endcode
554 @note MSR_CORE_LER_TO_LIP is defined as MSR_LER_TO_LIP in SDM.
555 **/
556 #define MSR_CORE_LER_TO_LIP 0x000001DE
557
558
559 /**
560 Unique.
561
562 @param ECX MSR_CORE_ROB_CR_BKUPTMPDR6 (0x000001E0)
563 @param EAX Lower 32-bits of MSR value.
564 Described by the type MSR_CORE_ROB_CR_BKUPTMPDR6_REGISTER.
565 @param EDX Upper 32-bits of MSR value.
566 Described by the type MSR_CORE_ROB_CR_BKUPTMPDR6_REGISTER.
567
568 <b>Example usage</b>
569 @code
570 MSR_CORE_ROB_CR_BKUPTMPDR6_REGISTER Msr;
571
572 Msr.Uint64 = AsmReadMsr64 (MSR_CORE_ROB_CR_BKUPTMPDR6);
573 AsmWriteMsr64 (MSR_CORE_ROB_CR_BKUPTMPDR6, Msr.Uint64);
574 @endcode
575 @note MSR_CORE_ROB_CR_BKUPTMPDR6 is defined as ROB_CR_BKUPTMPDR6 in SDM.
576 **/
577 #define MSR_CORE_ROB_CR_BKUPTMPDR6 0x000001E0
578
579 /**
580 MSR information returned for MSR index #MSR_CORE_ROB_CR_BKUPTMPDR6
581 **/
582 typedef union {
583 ///
584 /// Individual bit fields
585 ///
586 struct {
587 UINT32 Reserved1:2;
588 ///
589 /// [Bit 2] Fast Strings Enable bit. (Default, enabled).
590 ///
591 UINT32 FastStrings:1;
592 UINT32 Reserved2:29;
593 UINT32 Reserved3:32;
594 } Bits;
595 ///
596 /// All bit fields as a 32-bit value
597 ///
598 UINT32 Uint32;
599 ///
600 /// All bit fields as a 64-bit value
601 ///
602 UINT64 Uint64;
603 } MSR_CORE_ROB_CR_BKUPTMPDR6_REGISTER;
604
605
606 /**
607 Unique.
608
609 @param ECX MSR_CORE_MTRRPHYSBASEn
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_CORE_MTRRPHYSBASE0);
618 AsmWriteMsr64 (MSR_CORE_MTRRPHYSBASE0, Msr);
619 @endcode
620 @note MSR_CORE_MTRRPHYSBASE0 is defined as MTRRPHYSBASE0 in SDM.
621 MSR_CORE_MTRRPHYSBASE1 is defined as MTRRPHYSBASE1 in SDM.
622 MSR_CORE_MTRRPHYSBASE2 is defined as MTRRPHYSBASE2 in SDM.
623 MSR_CORE_MTRRPHYSBASE3 is defined as MTRRPHYSBASE3 in SDM.
624 MSR_CORE_MTRRPHYSBASE4 is defined as MTRRPHYSBASE4 in SDM.
625 MSR_CORE_MTRRPHYSBASE5 is defined as MTRRPHYSBASE5 in SDM.
626 MSR_CORE_MTRRPHYSMASK6 is defined as MTRRPHYSMASK6 in SDM.
627 MSR_CORE_MTRRPHYSMASK7 is defined as MTRRPHYSMASK7 in SDM.
628 @{
629 **/
630 #define MSR_CORE_MTRRPHYSBASE0 0x00000200
631 #define MSR_CORE_MTRRPHYSBASE1 0x00000202
632 #define MSR_CORE_MTRRPHYSBASE2 0x00000204
633 #define MSR_CORE_MTRRPHYSBASE3 0x00000206
634 #define MSR_CORE_MTRRPHYSBASE4 0x00000208
635 #define MSR_CORE_MTRRPHYSBASE5 0x0000020A
636 #define MSR_CORE_MTRRPHYSMASK6 0x0000020D
637 #define MSR_CORE_MTRRPHYSMASK7 0x0000020F
638 /// @}
639
640
641 /**
642 Unique.
643
644 @param ECX MSR_CORE_MTRRPHYSMASKn (0x00000201)
645 @param EAX Lower 32-bits of MSR value.
646 @param EDX Upper 32-bits of MSR value.
647
648 <b>Example usage</b>
649 @code
650 UINT64 Msr;
651
652 Msr = AsmReadMsr64 (MSR_CORE_MTRRPHYSMASK0);
653 AsmWriteMsr64 (MSR_CORE_MTRRPHYSMASK0, Msr);
654 @endcode
655 @note MSR_CORE_MTRRPHYSMASK0 is defined as MTRRPHYSMASK0 in SDM.
656 MSR_CORE_MTRRPHYSMASK1 is defined as MTRRPHYSMASK1 in SDM.
657 MSR_CORE_MTRRPHYSMASK2 is defined as MTRRPHYSMASK2 in SDM.
658 MSR_CORE_MTRRPHYSMASK3 is defined as MTRRPHYSMASK3 in SDM.
659 MSR_CORE_MTRRPHYSMASK4 is defined as MTRRPHYSMASK4 in SDM.
660 MSR_CORE_MTRRPHYSMASK5 is defined as MTRRPHYSMASK5 in SDM.
661 MSR_CORE_MTRRPHYSBASE6 is defined as MTRRPHYSBASE6 in SDM.
662 MSR_CORE_MTRRPHYSBASE7 is defined as MTRRPHYSBASE7 in SDM.
663 @{
664 **/
665 #define MSR_CORE_MTRRPHYSMASK0 0x00000201
666 #define MSR_CORE_MTRRPHYSMASK1 0x00000203
667 #define MSR_CORE_MTRRPHYSMASK2 0x00000205
668 #define MSR_CORE_MTRRPHYSMASK3 0x00000207
669 #define MSR_CORE_MTRRPHYSMASK4 0x00000209
670 #define MSR_CORE_MTRRPHYSMASK5 0x0000020B
671 #define MSR_CORE_MTRRPHYSBASE6 0x0000020C
672 #define MSR_CORE_MTRRPHYSBASE7 0x0000020E
673 /// @}
674
675
676 /**
677 Unique.
678
679 @param ECX MSR_CORE_MTRRFIX64K_00000 (0x00000250)
680 @param EAX Lower 32-bits of MSR value.
681 @param EDX Upper 32-bits of MSR value.
682
683 <b>Example usage</b>
684 @code
685 UINT64 Msr;
686
687 Msr = AsmReadMsr64 (MSR_CORE_MTRRFIX64K_00000);
688 AsmWriteMsr64 (MSR_CORE_MTRRFIX64K_00000, Msr);
689 @endcode
690 @note MSR_CORE_MTRRFIX64K_00000 is defined as MTRRFIX64K_00000 in SDM.
691 **/
692 #define MSR_CORE_MTRRFIX64K_00000 0x00000250
693
694
695 /**
696 Unique.
697
698 @param ECX MSR_CORE_MTRRFIX16K_80000 (0x00000258)
699 @param EAX Lower 32-bits of MSR value.
700 @param EDX Upper 32-bits of MSR value.
701
702 <b>Example usage</b>
703 @code
704 UINT64 Msr;
705
706 Msr = AsmReadMsr64 (MSR_CORE_MTRRFIX16K_80000);
707 AsmWriteMsr64 (MSR_CORE_MTRRFIX16K_80000, Msr);
708 @endcode
709 @note MSR_CORE_MTRRFIX16K_80000 is defined as MTRRFIX16K_80000 in SDM.
710 **/
711 #define MSR_CORE_MTRRFIX16K_80000 0x00000258
712
713
714 /**
715 Unique.
716
717 @param ECX MSR_CORE_MTRRFIX16K_A0000 (0x00000259)
718 @param EAX Lower 32-bits of MSR value.
719 @param EDX Upper 32-bits of MSR value.
720
721 <b>Example usage</b>
722 @code
723 UINT64 Msr;
724
725 Msr = AsmReadMsr64 (MSR_CORE_MTRRFIX16K_A0000);
726 AsmWriteMsr64 (MSR_CORE_MTRRFIX16K_A0000, Msr);
727 @endcode
728 @note MSR_CORE_MTRRFIX16K_A0000 is defined as MTRRFIX16K_A0000 in SDM.
729 **/
730 #define MSR_CORE_MTRRFIX16K_A0000 0x00000259
731
732
733 /**
734 Unique.
735
736 @param ECX MSR_CORE_MTRRFIX4K_C0000 (0x00000268)
737 @param EAX Lower 32-bits of MSR value.
738 @param EDX Upper 32-bits of MSR value.
739
740 <b>Example usage</b>
741 @code
742 UINT64 Msr;
743
744 Msr = AsmReadMsr64 (MSR_CORE_MTRRFIX4K_C0000);
745 AsmWriteMsr64 (MSR_CORE_MTRRFIX4K_C0000, Msr);
746 @endcode
747 @note MSR_CORE_MTRRFIX4K_C0000 is defined as MTRRFIX4K_C0000 in SDM.
748 **/
749 #define MSR_CORE_MTRRFIX4K_C0000 0x00000268
750
751
752 /**
753 Unique.
754
755 @param ECX MSR_CORE_MTRRFIX4K_C8000 (0x00000269)
756 @param EAX Lower 32-bits of MSR value.
757 @param EDX Upper 32-bits of MSR value.
758
759 <b>Example usage</b>
760 @code
761 UINT64 Msr;
762
763 Msr = AsmReadMsr64 (MSR_CORE_MTRRFIX4K_C8000);
764 AsmWriteMsr64 (MSR_CORE_MTRRFIX4K_C8000, Msr);
765 @endcode
766 @note MSR_CORE_MTRRFIX4K_C8000 is defined as MTRRFIX4K_C8000 in SDM.
767 **/
768 #define MSR_CORE_MTRRFIX4K_C8000 0x00000269
769
770
771 /**
772 Unique.
773
774 @param ECX MSR_CORE_MTRRFIX4K_D0000 (0x0000026A)
775 @param EAX Lower 32-bits of MSR value.
776 @param EDX Upper 32-bits of MSR value.
777
778 <b>Example usage</b>
779 @code
780 UINT64 Msr;
781
782 Msr = AsmReadMsr64 (MSR_CORE_MTRRFIX4K_D0000);
783 AsmWriteMsr64 (MSR_CORE_MTRRFIX4K_D0000, Msr);
784 @endcode
785 @note MSR_CORE_MTRRFIX4K_D0000 is defined as MTRRFIX4K_D0000 in SDM.
786 **/
787 #define MSR_CORE_MTRRFIX4K_D0000 0x0000026A
788
789
790 /**
791 Unique.
792
793 @param ECX MSR_CORE_MTRRFIX4K_D8000 (0x0000026B)
794 @param EAX Lower 32-bits of MSR value.
795 @param EDX Upper 32-bits of MSR value.
796
797 <b>Example usage</b>
798 @code
799 UINT64 Msr;
800
801 Msr = AsmReadMsr64 (MSR_CORE_MTRRFIX4K_D8000);
802 AsmWriteMsr64 (MSR_CORE_MTRRFIX4K_D8000, Msr);
803 @endcode
804 @note MSR_CORE_MTRRFIX4K_D8000 is defined as MTRRFIX4K_D8000 in SDM.
805 **/
806 #define MSR_CORE_MTRRFIX4K_D8000 0x0000026B
807
808
809 /**
810 Unique.
811
812 @param ECX MSR_CORE_MTRRFIX4K_E0000 (0x0000026C)
813 @param EAX Lower 32-bits of MSR value.
814 @param EDX Upper 32-bits of MSR value.
815
816 <b>Example usage</b>
817 @code
818 UINT64 Msr;
819
820 Msr = AsmReadMsr64 (MSR_CORE_MTRRFIX4K_E0000);
821 AsmWriteMsr64 (MSR_CORE_MTRRFIX4K_E0000, Msr);
822 @endcode
823 @note MSR_CORE_MTRRFIX4K_E0000 is defined as MTRRFIX4K_E0000 in SDM.
824 **/
825 #define MSR_CORE_MTRRFIX4K_E0000 0x0000026C
826
827
828 /**
829 Unique.
830
831 @param ECX MSR_CORE_MTRRFIX4K_E8000 (0x0000026D)
832 @param EAX Lower 32-bits of MSR value.
833 @param EDX Upper 32-bits of MSR value.
834
835 <b>Example usage</b>
836 @code
837 UINT64 Msr;
838
839 Msr = AsmReadMsr64 (MSR_CORE_MTRRFIX4K_E8000);
840 AsmWriteMsr64 (MSR_CORE_MTRRFIX4K_E8000, Msr);
841 @endcode
842 @note MSR_CORE_MTRRFIX4K_E8000 is defined as MTRRFIX4K_E8000 in SDM.
843 **/
844 #define MSR_CORE_MTRRFIX4K_E8000 0x0000026D
845
846
847 /**
848 Unique.
849
850 @param ECX MSR_CORE_MTRRFIX4K_F0000 (0x0000026E)
851 @param EAX Lower 32-bits of MSR value.
852 @param EDX Upper 32-bits of MSR value.
853
854 <b>Example usage</b>
855 @code
856 UINT64 Msr;
857
858 Msr = AsmReadMsr64 (MSR_CORE_MTRRFIX4K_F0000);
859 AsmWriteMsr64 (MSR_CORE_MTRRFIX4K_F0000, Msr);
860 @endcode
861 @note MSR_CORE_MTRRFIX4K_F0000 is defined as MTRRFIX4K_F0000 in SDM.
862 **/
863 #define MSR_CORE_MTRRFIX4K_F0000 0x0000026E
864
865
866 /**
867 Unique.
868
869 @param ECX MSR_CORE_MTRRFIX4K_F8000 (0x0000026F)
870 @param EAX Lower 32-bits of MSR value.
871 @param EDX Upper 32-bits of MSR value.
872
873 <b>Example usage</b>
874 @code
875 UINT64 Msr;
876
877 Msr = AsmReadMsr64 (MSR_CORE_MTRRFIX4K_F8000);
878 AsmWriteMsr64 (MSR_CORE_MTRRFIX4K_F8000, Msr);
879 @endcode
880 @note MSR_CORE_MTRRFIX4K_F8000 is defined as MTRRFIX4K_F8000 in SDM.
881 **/
882 #define MSR_CORE_MTRRFIX4K_F8000 0x0000026F
883
884
885 /**
886 Unique. See Section 15.3.2.1, "IA32_MCi_CTL MSRs.".
887
888 @param ECX MSR_CORE_MC4_CTL (0x0000040C)
889 @param EAX Lower 32-bits of MSR value.
890 @param EDX Upper 32-bits of MSR value.
891
892 <b>Example usage</b>
893 @code
894 UINT64 Msr;
895
896 Msr = AsmReadMsr64 (MSR_CORE_MC4_CTL);
897 AsmWriteMsr64 (MSR_CORE_MC4_CTL, Msr);
898 @endcode
899 @note MSR_CORE_MC4_CTL is defined as MSR_MC4_CTL in SDM.
900 **/
901 #define MSR_CORE_MC4_CTL 0x0000040C
902
903
904 /**
905 Unique. See Section 15.3.2.2, "IA32_MCi_STATUS MSRS.".
906
907 @param ECX MSR_CORE_MC4_STATUS (0x0000040D)
908 @param EAX Lower 32-bits of MSR value.
909 @param EDX Upper 32-bits of MSR value.
910
911 <b>Example usage</b>
912 @code
913 UINT64 Msr;
914
915 Msr = AsmReadMsr64 (MSR_CORE_MC4_STATUS);
916 AsmWriteMsr64 (MSR_CORE_MC4_STATUS, Msr);
917 @endcode
918 @note MSR_CORE_MC4_STATUS is defined as MSR_MC4_STATUS in SDM.
919 **/
920 #define MSR_CORE_MC4_STATUS 0x0000040D
921
922
923 /**
924 Unique. See Section 15.3.2.3, "IA32_MCi_ADDR MSRs." The MSR_MC4_ADDR
925 register is either not implemented or contains no address if the ADDRV flag
926 in the MSR_MC4_STATUS register is clear. When not implemented in the
927 processor, all reads and writes to this MSR will cause a general-protection
928 exception.
929
930 @param ECX MSR_CORE_MC4_ADDR (0x0000040E)
931 @param EAX Lower 32-bits of MSR value.
932 @param EDX Upper 32-bits of MSR value.
933
934 <b>Example usage</b>
935 @code
936 UINT64 Msr;
937
938 Msr = AsmReadMsr64 (MSR_CORE_MC4_ADDR);
939 AsmWriteMsr64 (MSR_CORE_MC4_ADDR, Msr);
940 @endcode
941 @note MSR_CORE_MC4_ADDR is defined as MSR_MC4_ADDR in SDM.
942 **/
943 #define MSR_CORE_MC4_ADDR 0x0000040E
944
945
946 /**
947 Unique. See Section 15.3.2.3, "IA32_MCi_ADDR MSRs." The MSR_MC3_ADDR
948 register is either not implemented or contains no address if the ADDRV flag
949 in the MSR_MC3_STATUS register is clear. When not implemented in the
950 processor, all reads and writes to this MSR will cause a general-protection
951 exception.
952
953 @param ECX MSR_CORE_MC3_ADDR (0x00000412)
954 @param EAX Lower 32-bits of MSR value.
955 @param EDX Upper 32-bits of MSR value.
956
957 <b>Example usage</b>
958 @code
959 UINT64 Msr;
960
961 Msr = AsmReadMsr64 (MSR_CORE_MC3_ADDR);
962 AsmWriteMsr64 (MSR_CORE_MC3_ADDR, Msr);
963 @endcode
964 @note MSR_CORE_MC3_ADDR is defined as MSR_MC3_ADDR in SDM.
965 **/
966 #define MSR_CORE_MC3_ADDR 0x00000412
967
968
969 /**
970 Unique.
971
972 @param ECX MSR_CORE_MC3_MISC (0x00000413)
973 @param EAX Lower 32-bits of MSR value.
974 @param EDX Upper 32-bits of MSR value.
975
976 <b>Example usage</b>
977 @code
978 UINT64 Msr;
979
980 Msr = AsmReadMsr64 (MSR_CORE_MC3_MISC);
981 AsmWriteMsr64 (MSR_CORE_MC3_MISC, Msr);
982 @endcode
983 @note MSR_CORE_MC3_MISC is defined as MSR_MC3_MISC in SDM.
984 **/
985 #define MSR_CORE_MC3_MISC 0x00000413
986
987
988 /**
989 Unique.
990
991 @param ECX MSR_CORE_MC5_CTL (0x00000414)
992 @param EAX Lower 32-bits of MSR value.
993 @param EDX Upper 32-bits of MSR value.
994
995 <b>Example usage</b>
996 @code
997 UINT64 Msr;
998
999 Msr = AsmReadMsr64 (MSR_CORE_MC5_CTL);
1000 AsmWriteMsr64 (MSR_CORE_MC5_CTL, Msr);
1001 @endcode
1002 @note MSR_CORE_MC5_CTL is defined as MSR_MC5_CTL in SDM.
1003 **/
1004 #define MSR_CORE_MC5_CTL 0x00000414
1005
1006
1007 /**
1008 Unique.
1009
1010 @param ECX MSR_CORE_MC5_STATUS (0x00000415)
1011 @param EAX Lower 32-bits of MSR value.
1012 @param EDX Upper 32-bits of MSR value.
1013
1014 <b>Example usage</b>
1015 @code
1016 UINT64 Msr;
1017
1018 Msr = AsmReadMsr64 (MSR_CORE_MC5_STATUS);
1019 AsmWriteMsr64 (MSR_CORE_MC5_STATUS, Msr);
1020 @endcode
1021 @note MSR_CORE_MC5_STATUS is defined as MSR_MC5_STATUS in SDM.
1022 **/
1023 #define MSR_CORE_MC5_STATUS 0x00000415
1024
1025
1026 /**
1027 Unique.
1028
1029 @param ECX MSR_CORE_MC5_ADDR (0x00000416)
1030 @param EAX Lower 32-bits of MSR value.
1031 @param EDX Upper 32-bits of MSR value.
1032
1033 <b>Example usage</b>
1034 @code
1035 UINT64 Msr;
1036
1037 Msr = AsmReadMsr64 (MSR_CORE_MC5_ADDR);
1038 AsmWriteMsr64 (MSR_CORE_MC5_ADDR, Msr);
1039 @endcode
1040 @note MSR_CORE_MC5_ADDR is defined as MSR_MC5_ADDR in SDM.
1041 **/
1042 #define MSR_CORE_MC5_ADDR 0x00000416
1043
1044
1045 /**
1046 Unique.
1047
1048 @param ECX MSR_CORE_MC5_MISC (0x00000417)
1049 @param EAX Lower 32-bits of MSR value.
1050 @param EDX Upper 32-bits of MSR value.
1051
1052 <b>Example usage</b>
1053 @code
1054 UINT64 Msr;
1055
1056 Msr = AsmReadMsr64 (MSR_CORE_MC5_MISC);
1057 AsmWriteMsr64 (MSR_CORE_MC5_MISC, Msr);
1058 @endcode
1059 @note MSR_CORE_MC5_MISC is defined as MSR_MC5_MISC in SDM.
1060 **/
1061 #define MSR_CORE_MC5_MISC 0x00000417
1062
1063
1064 /**
1065 Unique. See Table 35-2.
1066
1067 @param ECX MSR_CORE_IA32_EFER (0xC0000080)
1068 @param EAX Lower 32-bits of MSR value.
1069 Described by the type MSR_CORE_IA32_EFER_REGISTER.
1070 @param EDX Upper 32-bits of MSR value.
1071 Described by the type MSR_CORE_IA32_EFER_REGISTER.
1072
1073 <b>Example usage</b>
1074 @code
1075 MSR_CORE_IA32_EFER_REGISTER Msr;
1076
1077 Msr.Uint64 = AsmReadMsr64 (MSR_CORE_IA32_EFER);
1078 AsmWriteMsr64 (MSR_CORE_IA32_EFER, Msr.Uint64);
1079 @endcode
1080 @note MSR_CORE_IA32_EFER is defined as IA32_EFER in SDM.
1081 **/
1082 #define MSR_CORE_IA32_EFER 0xC0000080
1083
1084 /**
1085 MSR information returned for MSR index #MSR_CORE_IA32_EFER
1086 **/
1087 typedef union {
1088 ///
1089 /// Individual bit fields
1090 ///
1091 struct {
1092 UINT32 Reserved1:11;
1093 ///
1094 /// [Bit 11] Execute Disable Bit Enable.
1095 ///
1096 UINT32 NXE:1;
1097 UINT32 Reserved2:20;
1098 UINT32 Reserved3:32;
1099 } Bits;
1100 ///
1101 /// All bit fields as a 32-bit value
1102 ///
1103 UINT32 Uint32;
1104 ///
1105 /// All bit fields as a 64-bit value
1106 ///
1107 UINT64 Uint64;
1108 } MSR_CORE_IA32_EFER_REGISTER;
1109
1110 #endif