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