]> git.proxmox.com Git - mirror_edk2.git/blame - UefiCpuPkg/Include/Register/Msr/SkylakeMsr.h
UefiCpuPkg/PiSmmCpuDxeSmm: Skip if AllocatedSize is 0
[mirror_edk2.git] / UefiCpuPkg / Include / Register / Msr / SkylakeMsr.h
CommitLineData
6b55a245
MK
1/** @file\r
2 MSR Definitions for Intel processors based on the Skylake microarchitecture.\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
9 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
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
37cea63f 20 September 2016, Chapter 35 Model-Specific-Registers (MSR), Section 35.15.\r
6b55a245
MK
21\r
22**/\r
23\r
24#ifndef __SKYLAKE_MSR_H__\r
25#define __SKYLAKE_MSR_H__\r
26\r
27#include <Register/ArchitecturalMsr.h>\r
28\r
29/**\r
30 Package. Maximum Ratio Limit of Turbo Mode RO if MSR_PLATFORM_INFO.[28] = 0,\r
31 RW if MSR_PLATFORM_INFO.[28] = 1.\r
32\r
33 @param ECX MSR_SKYLAKE_TURBO_RATIO_LIMIT (0x000001AD)\r
34 @param EAX Lower 32-bits of MSR value.\r
35 Described by the type MSR_SKYLAKE_TURBO_RATIO_LIMIT_REGISTER.\r
36 @param EDX Upper 32-bits of MSR value.\r
37 Described by the type MSR_SKYLAKE_TURBO_RATIO_LIMIT_REGISTER.\r
38\r
39 <b>Example usage</b>\r
40 @code\r
41 MSR_SKYLAKE_TURBO_RATIO_LIMIT_REGISTER Msr;\r
42\r
43 Msr.Uint64 = AsmReadMsr64 (MSR_SKYLAKE_TURBO_RATIO_LIMIT);\r
44 @endcode\r
04e7a465 45 @note MSR_SKYLAKE_TURBO_RATIO_LIMIT is defined as MSR_TURBO_RATIO_LIMIT in SDM.\r
6b55a245
MK
46**/\r
47#define MSR_SKYLAKE_TURBO_RATIO_LIMIT 0x000001AD\r
48\r
49/**\r
50 MSR information returned for MSR index #MSR_SKYLAKE_TURBO_RATIO_LIMIT\r
51**/\r
52typedef union {\r
53 ///\r
54 /// Individual bit fields\r
55 ///\r
56 struct {\r
57 ///\r
58 /// [Bits 7:0] Package. Maximum Ratio Limit for 1C Maximum turbo ratio\r
59 /// limit of 1 core active.\r
60 ///\r
61 UINT32 Maximum1C:8;\r
62 ///\r
63 /// [Bits 15:8] Package. Maximum Ratio Limit for 2C Maximum turbo ratio\r
64 /// limit of 2 core active.\r
65 ///\r
66 UINT32 Maximum2C:8;\r
67 ///\r
68 /// [Bits 23:16] Package. Maximum Ratio Limit for 3C Maximum turbo ratio\r
69 /// limit of 3 core active.\r
70 ///\r
71 UINT32 Maximum3C:8;\r
72 ///\r
73 /// [Bits 31:24] Package. Maximum Ratio Limit for 4C Maximum turbo ratio\r
74 /// limit of 4 core active.\r
75 ///\r
76 UINT32 Maximum4C:8;\r
77 UINT32 Reserved:32;\r
78 } Bits;\r
79 ///\r
80 /// All bit fields as a 32-bit value\r
81 ///\r
82 UINT32 Uint32;\r
83 ///\r
84 /// All bit fields as a 64-bit value\r
85 ///\r
86 UINT64 Uint64;\r
87} MSR_SKYLAKE_TURBO_RATIO_LIMIT_REGISTER;\r
88\r
89\r
90/**\r
91 Thread. Last Branch Record Stack TOS (R/W) Contains an index (bits 0-4)\r
92 that points to the MSR containing the most recent branch record.\r
93\r
94 @param ECX MSR_SKYLAKE_LASTBRANCH_TOS (0x000001C9)\r
95 @param EAX Lower 32-bits of MSR value.\r
96 @param EDX Upper 32-bits of MSR value.\r
97\r
98 <b>Example usage</b>\r
99 @code\r
100 UINT64 Msr;\r
101\r
102 Msr = AsmReadMsr64 (MSR_SKYLAKE_LASTBRANCH_TOS);\r
103 AsmWriteMsr64 (MSR_SKYLAKE_LASTBRANCH_TOS, Msr);\r
104 @endcode\r
04e7a465 105 @note MSR_SKYLAKE_LASTBRANCH_TOS is defined as MSR_LASTBRANCH_TOS in SDM.\r
6b55a245
MK
106**/\r
107#define MSR_SKYLAKE_LASTBRANCH_TOS 0x000001C9\r
108\r
109\r
110/**\r
111 Package. Lower 64 Bit OwnerEpoch Component of SGX Key (RO). Low 64 bits of\r
112 an 128-bit external entropy value for key derivation of an enclave.\r
113\r
114 @param ECX MSR_SKYLAKE_SGXOWNER0 (0x00000300)\r
115 @param EAX Lower 32-bits of MSR value.\r
116 @param EDX Upper 32-bits of MSR value.\r
117\r
118 <b>Example usage</b>\r
119 @code\r
120 UINT64 Msr;\r
121\r
122 Msr = AsmReadMsr64 (MSR_SKYLAKE_SGXOWNER0);\r
123 @endcode\r
04e7a465 124 @note MSR_SKYLAKE_SGXOWNER0 is defined as MSR_SGXOWNER0 in SDM.\r
6b55a245
MK
125**/\r
126#define MSR_SKYLAKE_SGXOWNER0 0x00000300\r
127\r
128\r
129/**\r
130 Package. Upper 64 Bit OwnerEpoch Component of SGX Key (RO). Upper 64 bits of\r
131 an 128-bit external entropy value for key derivation of an enclave.\r
132\r
133 @param ECX MSR_SKYLAKE_SGXOWNER1 (0x00000301)\r
134 @param EAX Lower 32-bits of MSR value.\r
135 @param EDX Upper 32-bits of MSR value.\r
136\r
137 <b>Example usage</b>\r
138 @code\r
139 UINT64 Msr;\r
140\r
141 Msr = AsmReadMsr64 (MSR_SKYLAKE_SGXOWNER1);\r
142 @endcode\r
04e7a465 143 @note MSR_SKYLAKE_SGXOWNER1 is defined as MSR_SGXOWNER1 in SDM.\r
6b55a245
MK
144**/\r
145#define MSR_SKYLAKE_SGXOWNER1 0x00000301\r
146\r
147\r
148/**\r
37cea63f
HW
149 See Table 35-2. See Section 18.2.4, "Architectural Performance Monitoring\r
150 Version 4.".\r
6b55a245 151\r
37cea63f 152 @param ECX MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS (0x0000038E)\r
6b55a245 153 @param EAX Lower 32-bits of MSR value.\r
37cea63f 154 Described by the type MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_REGISTER.\r
6b55a245 155 @param EDX Upper 32-bits of MSR value.\r
37cea63f 156 Described by the type MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_REGISTER.\r
6b55a245
MK
157\r
158 <b>Example usage</b>\r
159 @code\r
37cea63f 160 MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_REGISTER Msr;\r
6b55a245 161\r
37cea63f
HW
162 Msr.Uint64 = AsmReadMsr64 (MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS);\r
163 AsmWriteMsr64 (MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS, Msr.Uint64);\r
6b55a245 164 @endcode\r
37cea63f 165 @note MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS is defined as IA32_PERF_GLOBAL_STATUS in SDM.\r
6b55a245 166**/\r
37cea63f 167#define MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS 0x0000038E\r
6b55a245
MK
168\r
169/**\r
37cea63f 170 MSR information returned for MSR index #MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS\r
6b55a245
MK
171**/\r
172typedef union {\r
173 ///\r
174 /// Individual bit fields\r
175 ///\r
176 struct {\r
177 ///\r
178 /// [Bit 0] Thread. Ovf_PMC0.\r
179 ///\r
180 UINT32 Ovf_PMC0:1;\r
181 ///\r
182 /// [Bit 1] Thread. Ovf_PMC1.\r
183 ///\r
184 UINT32 Ovf_PMC1:1;\r
185 ///\r
186 /// [Bit 2] Thread. Ovf_PMC2.\r
187 ///\r
188 UINT32 Ovf_PMC2:1;\r
189 ///\r
190 /// [Bit 3] Thread. Ovf_PMC3.\r
191 ///\r
192 UINT32 Ovf_PMC3:1;\r
193 ///\r
194 /// [Bit 4] Thread. Ovf_PMC4 (if CPUID.0AH:EAX[15:8] > 4).\r
195 ///\r
196 UINT32 Ovf_PMC4:1;\r
197 ///\r
198 /// [Bit 5] Thread. Ovf_PMC5 (if CPUID.0AH:EAX[15:8] > 5).\r
199 ///\r
200 UINT32 Ovf_PMC5:1;\r
201 ///\r
202 /// [Bit 6] Thread. Ovf_PMC6 (if CPUID.0AH:EAX[15:8] > 6).\r
203 ///\r
204 UINT32 Ovf_PMC6:1;\r
205 ///\r
206 /// [Bit 7] Thread. Ovf_PMC7 (if CPUID.0AH:EAX[15:8] > 7).\r
207 ///\r
208 UINT32 Ovf_PMC7:1;\r
209 UINT32 Reserved1:24;\r
210 ///\r
211 /// [Bit 32] Thread. Ovf_FixedCtr0.\r
212 ///\r
213 UINT32 Ovf_FixedCtr0:1;\r
214 ///\r
215 /// [Bit 33] Thread. Ovf_FixedCtr1.\r
216 ///\r
217 UINT32 Ovf_FixedCtr1:1;\r
218 ///\r
219 /// [Bit 34] Thread. Ovf_FixedCtr2.\r
220 ///\r
221 UINT32 Ovf_FixedCtr2:1;\r
222 UINT32 Reserved2:20;\r
223 ///\r
224 /// [Bit 55] Thread. Trace_ToPA_PMI.\r
225 ///\r
226 UINT32 Trace_ToPA_PMI:1;\r
227 UINT32 Reserved3:2;\r
228 ///\r
229 /// [Bit 58] Thread. LBR_Frz.\r
230 ///\r
231 UINT32 LBR_Frz:1;\r
232 ///\r
233 /// [Bit 59] Thread. CTR_Frz.\r
234 ///\r
235 UINT32 CTR_Frz:1;\r
236 ///\r
237 /// [Bit 60] Thread. ASCI.\r
238 ///\r
239 UINT32 ASCI:1;\r
240 ///\r
241 /// [Bit 61] Thread. Ovf_Uncore.\r
242 ///\r
243 UINT32 Ovf_Uncore:1;\r
244 ///\r
245 /// [Bit 62] Thread. Ovf_BufDSSAVE.\r
246 ///\r
247 UINT32 Ovf_BufDSSAVE:1;\r
248 ///\r
249 /// [Bit 63] Thread. CondChgd.\r
250 ///\r
251 UINT32 CondChgd:1;\r
252 } Bits;\r
253 ///\r
254 /// All bit fields as a 64-bit value\r
255 ///\r
256 UINT64 Uint64;\r
37cea63f 257} MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_REGISTER;\r
6b55a245
MK
258\r
259\r
260/**\r
37cea63f
HW
261 See Table 35-2. See Section 18.2.4, "Architectural Performance Monitoring\r
262 Version 4.".\r
6b55a245
MK
263\r
264 @param ECX MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_RESET (0x00000390)\r
265 @param EAX Lower 32-bits of MSR value.\r
266 Described by the type MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_RESET_REGISTER.\r
267 @param EDX Upper 32-bits of MSR value.\r
268 Described by the type MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_RESET_REGISTER.\r
269\r
270 <b>Example usage</b>\r
271 @code\r
272 MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_RESET_REGISTER Msr;\r
273\r
274 Msr.Uint64 = AsmReadMsr64 (MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_RESET);\r
275 AsmWriteMsr64 (MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_RESET, Msr.Uint64);\r
276 @endcode\r
04e7a465 277 @note MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_RESET is defined as IA32_PERF_GLOBAL_STATUS_RESET in SDM.\r
6b55a245
MK
278**/\r
279#define MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_RESET 0x00000390\r
280\r
281/**\r
282 MSR information returned for MSR index\r
283 #MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_RESET\r
284**/\r
285typedef union {\r
286 ///\r
287 /// Individual bit fields\r
288 ///\r
289 struct {\r
290 ///\r
291 /// [Bit 0] Thread. Set 1 to clear Ovf_PMC0.\r
292 ///\r
293 UINT32 Ovf_PMC0:1;\r
294 ///\r
295 /// [Bit 1] Thread. Set 1 to clear Ovf_PMC1.\r
296 ///\r
297 UINT32 Ovf_PMC1:1;\r
298 ///\r
299 /// [Bit 2] Thread. Set 1 to clear Ovf_PMC2.\r
300 ///\r
301 UINT32 Ovf_PMC2:1;\r
302 ///\r
303 /// [Bit 3] Thread. Set 1 to clear Ovf_PMC3.\r
304 ///\r
305 UINT32 Ovf_PMC3:1;\r
306 ///\r
307 /// [Bit 4] Thread. Set 1 to clear Ovf_PMC4 (if CPUID.0AH:EAX[15:8] > 4).\r
308 ///\r
309 UINT32 Ovf_PMC4:1;\r
310 ///\r
311 /// [Bit 5] Thread. Set 1 to clear Ovf_PMC5 (if CPUID.0AH:EAX[15:8] > 5).\r
312 ///\r
313 UINT32 Ovf_PMC5:1;\r
314 ///\r
315 /// [Bit 6] Thread. Set 1 to clear Ovf_PMC6 (if CPUID.0AH:EAX[15:8] > 6).\r
316 ///\r
317 UINT32 Ovf_PMC6:1;\r
318 ///\r
319 /// [Bit 7] Thread. Set 1 to clear Ovf_PMC7 (if CPUID.0AH:EAX[15:8] > 7).\r
320 ///\r
321 UINT32 Ovf_PMC7:1;\r
322 UINT32 Reserved1:24;\r
323 ///\r
324 /// [Bit 32] Thread. Set 1 to clear Ovf_FixedCtr0.\r
325 ///\r
326 UINT32 Ovf_FixedCtr0:1;\r
327 ///\r
328 /// [Bit 33] Thread. Set 1 to clear Ovf_FixedCtr1.\r
329 ///\r
330 UINT32 Ovf_FixedCtr1:1;\r
331 ///\r
332 /// [Bit 34] Thread. Set 1 to clear Ovf_FixedCtr2.\r
333 ///\r
334 UINT32 Ovf_FixedCtr2:1;\r
335 UINT32 Reserved2:20;\r
336 ///\r
337 /// [Bit 55] Thread. Set 1 to clear Trace_ToPA_PMI.\r
338 ///\r
339 UINT32 Trace_ToPA_PMI:1;\r
340 UINT32 Reserved3:2;\r
341 ///\r
342 /// [Bit 58] Thread. Set 1 to clear LBR_Frz.\r
343 ///\r
344 UINT32 LBR_Frz:1;\r
345 ///\r
346 /// [Bit 59] Thread. Set 1 to clear CTR_Frz.\r
347 ///\r
348 UINT32 CTR_Frz:1;\r
349 ///\r
350 /// [Bit 60] Thread. Set 1 to clear ASCI.\r
351 ///\r
352 UINT32 ASCI:1;\r
353 ///\r
354 /// [Bit 61] Thread. Set 1 to clear Ovf_Uncore.\r
355 ///\r
356 UINT32 Ovf_Uncore:1;\r
357 ///\r
358 /// [Bit 62] Thread. Set 1 to clear Ovf_BufDSSAVE.\r
359 ///\r
360 UINT32 Ovf_BufDSSAVE:1;\r
361 ///\r
362 /// [Bit 63] Thread. Set 1 to clear CondChgd.\r
363 ///\r
364 UINT32 CondChgd:1;\r
365 } Bits;\r
366 ///\r
367 /// All bit fields as a 64-bit value\r
368 ///\r
369 UINT64 Uint64;\r
370} MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_RESET_REGISTER;\r
371\r
372\r
373/**\r
37cea63f
HW
374 See Table 35-2. See Section 18.2.4, "Architectural Performance Monitoring\r
375 Version 4.".\r
6b55a245
MK
376\r
377 @param ECX MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_SET (0x00000391)\r
378 @param EAX Lower 32-bits of MSR value.\r
379 Described by the type MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_SET_REGISTER.\r
380 @param EDX Upper 32-bits of MSR value.\r
381 Described by the type MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_SET_REGISTER.\r
382\r
383 <b>Example usage</b>\r
384 @code\r
385 MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_SET_REGISTER Msr;\r
386\r
387 Msr.Uint64 = AsmReadMsr64 (MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_SET);\r
388 AsmWriteMsr64 (MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_SET, Msr.Uint64);\r
389 @endcode\r
04e7a465 390 @note MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_SET is defined as IA32_PERF_GLOBAL_STATUS_SET in SDM.\r
6b55a245
MK
391**/\r
392#define MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_SET 0x00000391\r
393\r
394/**\r
395 MSR information returned for MSR index\r
396 #MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_SET\r
397**/\r
398typedef union {\r
399 ///\r
400 /// Individual bit fields\r
401 ///\r
402 struct {\r
403 ///\r
404 /// [Bit 0] Thread. Set 1 to cause Ovf_PMC0 = 1.\r
405 ///\r
406 UINT32 Ovf_PMC0:1;\r
407 ///\r
408 /// [Bit 1] Thread. Set 1 to cause Ovf_PMC1 = 1.\r
409 ///\r
410 UINT32 Ovf_PMC1:1;\r
411 ///\r
412 /// [Bit 2] Thread. Set 1 to cause Ovf_PMC2 = 1.\r
413 ///\r
414 UINT32 Ovf_PMC2:1;\r
415 ///\r
416 /// [Bit 3] Thread. Set 1 to cause Ovf_PMC3 = 1.\r
417 ///\r
418 UINT32 Ovf_PMC3:1;\r
419 ///\r
420 /// [Bit 4] Thread. Set 1 to cause Ovf_PMC4=1 (if CPUID.0AH:EAX[15:8] > 4).\r
421 ///\r
422 UINT32 Ovf_PMC4:1;\r
423 ///\r
424 /// [Bit 5] Thread. Set 1 to cause Ovf_PMC5=1 (if CPUID.0AH:EAX[15:8] > 5).\r
425 ///\r
426 UINT32 Ovf_PMC5:1;\r
427 ///\r
428 /// [Bit 6] Thread. Set 1 to cause Ovf_PMC6=1 (if CPUID.0AH:EAX[15:8] > 6).\r
429 ///\r
430 UINT32 Ovf_PMC6:1;\r
431 ///\r
432 /// [Bit 7] Thread. Set 1 to cause Ovf_PMC7=1 (if CPUID.0AH:EAX[15:8] > 7).\r
433 ///\r
434 UINT32 Ovf_PMC7:1;\r
435 UINT32 Reserved1:24;\r
436 ///\r
437 /// [Bit 32] Thread. Set 1 to cause Ovf_FixedCtr0 = 1.\r
438 ///\r
439 UINT32 Ovf_FixedCtr0:1;\r
440 ///\r
441 /// [Bit 33] Thread. Set 1 to cause Ovf_FixedCtr1 = 1.\r
442 ///\r
443 UINT32 Ovf_FixedCtr1:1;\r
444 ///\r
445 /// [Bit 34] Thread. Set 1 to cause Ovf_FixedCtr2 = 1.\r
446 ///\r
447 UINT32 Ovf_FixedCtr2:1;\r
448 UINT32 Reserved2:20;\r
449 ///\r
450 /// [Bit 55] Thread. Set 1 to cause Trace_ToPA_PMI = 1.\r
451 ///\r
452 UINT32 Trace_ToPA_PMI:1;\r
453 UINT32 Reserved3:2;\r
454 ///\r
455 /// [Bit 58] Thread. Set 1 to cause LBR_Frz = 1.\r
456 ///\r
457 UINT32 LBR_Frz:1;\r
458 ///\r
459 /// [Bit 59] Thread. Set 1 to cause CTR_Frz = 1.\r
460 ///\r
461 UINT32 CTR_Frz:1;\r
462 ///\r
463 /// [Bit 60] Thread. Set 1 to cause ASCI = 1.\r
464 ///\r
465 UINT32 ASCI:1;\r
466 ///\r
467 /// [Bit 61] Thread. Set 1 to cause Ovf_Uncore.\r
468 ///\r
469 UINT32 Ovf_Uncore:1;\r
470 ///\r
471 /// [Bit 62] Thread. Set 1 to cause Ovf_BufDSSAVE.\r
472 ///\r
473 UINT32 Ovf_BufDSSAVE:1;\r
474 UINT32 Reserved4:1;\r
475 } Bits;\r
476 ///\r
477 /// All bit fields as a 64-bit value\r
478 ///\r
479 UINT64 Uint64;\r
480} MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_SET_REGISTER;\r
481\r
482\r
483/**\r
484 Thread. FrontEnd Precise Event Condition Select (R/W).\r
485\r
486 @param ECX MSR_SKYLAKE_PEBS_FRONTEND (0x000003F7)\r
487 @param EAX Lower 32-bits of MSR value.\r
488 Described by the type MSR_SKYLAKE_PEBS_FRONTEND_REGISTER.\r
489 @param EDX Upper 32-bits of MSR value.\r
490 Described by the type MSR_SKYLAKE_PEBS_FRONTEND_REGISTER.\r
491\r
492 <b>Example usage</b>\r
493 @code\r
494 MSR_SKYLAKE_PEBS_FRONTEND_REGISTER Msr;\r
495\r
496 Msr.Uint64 = AsmReadMsr64 (MSR_SKYLAKE_PEBS_FRONTEND);\r
497 AsmWriteMsr64 (MSR_SKYLAKE_PEBS_FRONTEND, Msr.Uint64);\r
498 @endcode\r
04e7a465 499 @note MSR_SKYLAKE_PEBS_FRONTEND is defined as MSR_PEBS_FRONTEND in SDM.\r
6b55a245
MK
500**/\r
501#define MSR_SKYLAKE_PEBS_FRONTEND 0x000003F7\r
502\r
503/**\r
504 MSR information returned for MSR index #MSR_SKYLAKE_PEBS_FRONTEND\r
505**/\r
506typedef union {\r
507 ///\r
508 /// Individual bit fields\r
509 ///\r
510 struct {\r
511 ///\r
512 /// [Bits 2:0] Event Code Select.\r
513 ///\r
514 UINT32 EventCodeSelect:3;\r
515 UINT32 Reserved1:1;\r
516 ///\r
517 /// [Bit 4] Event Code Select High.\r
518 ///\r
519 UINT32 EventCodeSelectHigh:1;\r
520 UINT32 Reserved2:3;\r
521 ///\r
522 /// [Bits 19:8] IDQ_Bubble_Length Specifier.\r
523 ///\r
524 UINT32 IDQ_Bubble_Length:12;\r
525 ///\r
526 /// [Bits 22:20] IDQ_Bubble_Width Specifier.\r
527 ///\r
528 UINT32 IDQ_Bubble_Width:3;\r
529 UINT32 Reserved3:9;\r
530 UINT32 Reserved4:32;\r
531 } Bits;\r
532 ///\r
533 /// All bit fields as a 32-bit value\r
534 ///\r
535 UINT32 Uint32;\r
536 ///\r
537 /// All bit fields as a 64-bit value\r
538 ///\r
539 UINT64 Uint64;\r
540} MSR_SKYLAKE_PEBS_FRONTEND_REGISTER;\r
541\r
542\r
37cea63f
HW
543/**\r
544 Package. PP0 Energy Status (R/O) See Section 14.9.4, "PP0/PP1 RAPL\r
545 Domains.".\r
546\r
547 @param ECX MSR_SKYLAKE_PP0_ENERGY_STATUS (0x00000639)\r
548 @param EAX Lower 32-bits of MSR value.\r
549 @param EDX Upper 32-bits of MSR value.\r
550\r
551 <b>Example usage</b>\r
552 @code\r
553 UINT64 Msr;\r
554\r
555 Msr = AsmReadMsr64 (MSR_SKYLAKE_PP0_ENERGY_STATUS);\r
556 @endcode\r
557 @note MSR_SKYLAKE_PP0_ENERGY_STATUS is defined as MSR_PP0_ENERGY_STATUS in SDM.\r
558**/\r
559#define MSR_SKYLAKE_PP0_ENERGY_STATUS 0x00000639\r
560\r
561\r
6b55a245
MK
562/**\r
563 Platform*. Platform Energy Counter. (R/O). This MSR is valid only if both\r
564 platform vendor hardware implementation and BIOS enablement support it. This\r
565 MSR will read 0 if not valid.\r
566\r
567 @param ECX MSR_SKYLAKE_PLATFORM_ENERGY_COUNTER (0x0000064D)\r
568 @param EAX Lower 32-bits of MSR value.\r
569 Described by the type MSR_SKYLAKE_PLATFORM_ENERGY_COUNTER_REGISTER.\r
570 @param EDX Upper 32-bits of MSR value.\r
571 Described by the type MSR_SKYLAKE_PLATFORM_ENERGY_COUNTER_REGISTER.\r
572\r
573 <b>Example usage</b>\r
574 @code\r
575 MSR_SKYLAKE_PLATFORM_ENERGY_COUNTER_REGISTER Msr;\r
576\r
577 Msr.Uint64 = AsmReadMsr64 (MSR_SKYLAKE_PLATFORM_ENERGY_COUNTER);\r
578 @endcode\r
04e7a465 579 @note MSR_SKYLAKE_PLATFORM_ENERGY_COUNTER is defined as MSR_PLATFORM_ENERGY_COUNTER in SDM.\r
6b55a245
MK
580**/\r
581#define MSR_SKYLAKE_PLATFORM_ENERGY_COUNTER 0x0000064D\r
582\r
583/**\r
584 MSR information returned for MSR index #MSR_SKYLAKE_PLATFORM_ENERGY_COUNTER\r
585**/\r
586typedef union {\r
587 ///\r
588 /// Individual bit fields\r
589 ///\r
590 struct {\r
591 ///\r
592 /// [Bits 31:0] Total energy consumed by all devices in the platform that\r
593 /// receive power from integrated power delivery mechanism, Included\r
594 /// platform devices are processor cores, SOC, memory, add-on or\r
595 /// peripheral devices that get powered directly from the platform power\r
596 /// delivery means. The energy units are specified in the\r
597 /// MSR_RAPL_POWER_UNIT.Enery_Status_Unit.\r
598 ///\r
599 UINT32 TotalEnergy:32;\r
600 UINT32 Reserved:32;\r
601 } Bits;\r
602 ///\r
603 /// All bit fields as a 32-bit value\r
604 ///\r
605 UINT32 Uint32;\r
606 ///\r
607 /// All bit fields as a 64-bit value\r
608 ///\r
609 UINT64 Uint64;\r
610} MSR_SKYLAKE_PLATFORM_ENERGY_COUNTER_REGISTER;\r
611\r
612\r
613/**\r
614 Thread. Productive Performance Count. (R/O). Hardware's view of workload\r
615 scalability. See Section 14.4.5.1.\r
616\r
617 @param ECX MSR_SKYLAKE_PPERF (0x0000064E)\r
618 @param EAX Lower 32-bits of MSR value.\r
619 @param EDX Upper 32-bits of MSR value.\r
620\r
621 <b>Example usage</b>\r
622 @code\r
623 UINT64 Msr;\r
624\r
625 Msr = AsmReadMsr64 (MSR_SKYLAKE_PPERF);\r
626 @endcode\r
04e7a465 627 @note MSR_SKYLAKE_PPERF is defined as MSR_PPERF in SDM.\r
6b55a245
MK
628**/\r
629#define MSR_SKYLAKE_PPERF 0x0000064E\r
630\r
631\r
37cea63f
HW
632/**\r
633 Package. Indicator of Frequency Clipping in Processor Cores (R/W) (frequency\r
634 refers to processor core frequency).\r
635\r
636 @param ECX MSR_SKYLAKE_CORE_PERF_LIMIT_REASONS (0x0000064F)\r
637 @param EAX Lower 32-bits of MSR value.\r
638 Described by the type MSR_SKYLAKE_CORE_PERF_LIMIT_REASONS_REGISTER.\r
639 @param EDX Upper 32-bits of MSR value.\r
640 Described by the type MSR_SKYLAKE_CORE_PERF_LIMIT_REASONS_REGISTER.\r
641\r
642 <b>Example usage</b>\r
643 @code\r
644 MSR_SKYLAKE_CORE_PERF_LIMIT_REASONS_REGISTER Msr;\r
645\r
646 Msr.Uint64 = AsmReadMsr64 (MSR_SKYLAKE_CORE_PERF_LIMIT_REASONS);\r
647 AsmWriteMsr64 (MSR_SKYLAKE_CORE_PERF_LIMIT_REASONS, Msr.Uint64);\r
648 @endcode\r
649 @note MSR_SKYLAKE_CORE_PERF_LIMIT_REASONS is defined as MSR_CORE_PERF_LIMIT_REASONS in SDM.\r
650**/\r
651#define MSR_SKYLAKE_CORE_PERF_LIMIT_REASONS 0x0000064F\r
652\r
653/**\r
654 MSR information returned for MSR index #MSR_SKYLAKE_CORE_PERF_LIMIT_REASONS\r
655**/\r
656typedef union {\r
657 ///\r
658 /// Individual bit fields\r
659 ///\r
660 struct {\r
661 ///\r
662 /// [Bit 0] PROCHOT Status (R0) When set, frequency is reduced below the\r
663 /// operating system request due to assertion of external PROCHOT.\r
664 ///\r
665 UINT32 PROCHOT_Status:1;\r
666 ///\r
667 /// [Bit 1] Thermal Status (R0) When set, frequency is reduced below the\r
668 /// operating system request due to a thermal event.\r
669 ///\r
670 UINT32 ThermalStatus:1;\r
671 UINT32 Reserved1:2;\r
672 ///\r
673 /// [Bit 4] Residency State Regulation Status (R0) When set, frequency is\r
674 /// reduced below the operating system request due to residency state\r
675 /// regulation limit.\r
676 ///\r
677 UINT32 ResidencyStateRegulationStatus:1;\r
678 ///\r
679 /// [Bit 5] Running Average Thermal Limit Status (R0) When set, frequency\r
680 /// is reduced below the operating system request due to Running Average\r
681 /// Thermal Limit (RATL).\r
682 ///\r
683 UINT32 RunningAverageThermalLimitStatus:1;\r
684 ///\r
685 /// [Bit 6] VR Therm Alert Status (R0) When set, frequency is reduced\r
686 /// below the operating system request due to a thermal alert from a\r
687 /// processor Voltage Regulator (VR).\r
688 ///\r
689 UINT32 VRThermAlertStatus:1;\r
690 ///\r
691 /// [Bit 7] VR Therm Design Current Status (R0) When set, frequency is\r
692 /// reduced below the operating system request due to VR thermal design\r
693 /// current limit.\r
694 ///\r
695 UINT32 VRThermDesignCurrentStatus:1;\r
696 ///\r
697 /// [Bit 8] Other Status (R0) When set, frequency is reduced below the\r
698 /// operating system request due to electrical or other constraints.\r
699 ///\r
700 UINT32 OtherStatus:1;\r
701 UINT32 Reserved2:1;\r
702 ///\r
703 /// [Bit 10] Package/Platform-Level Power Limiting PL1 Status (R0) When\r
704 /// set, frequency is reduced below the operating system request due to\r
705 /// package/platform-level power limiting PL1.\r
706 ///\r
707 UINT32 PL1Status:1;\r
708 ///\r
709 /// [Bit 11] Package/Platform-Level PL2 Power Limiting Status (R0) When\r
710 /// set, frequency is reduced below the operating system request due to\r
711 /// package/platform-level power limiting PL2/PL3.\r
712 ///\r
713 UINT32 PL2Status:1;\r
714 ///\r
715 /// [Bit 12] Max Turbo Limit Status (R0) When set, frequency is reduced\r
716 /// below the operating system request due to multi-core turbo limits.\r
717 ///\r
718 UINT32 MaxTurboLimitStatus:1;\r
719 ///\r
720 /// [Bit 13] Turbo Transition Attenuation Status (R0) When set, frequency\r
721 /// is reduced below the operating system request due to Turbo transition\r
722 /// attenuation. This prevents performance degradation due to frequent\r
723 /// operating ratio changes.\r
724 ///\r
725 UINT32 TurboTransitionAttenuationStatus:1;\r
726 UINT32 Reserved3:2;\r
727 ///\r
728 /// [Bit 16] PROCHOT Log When set, indicates that the PROCHOT Status bit\r
729 /// has asserted since the log bit was last cleared. This log bit will\r
730 /// remain set until cleared by software writing 0.\r
731 ///\r
732 UINT32 PROCHOT_Log:1;\r
733 ///\r
734 /// [Bit 17] Thermal Log When set, indicates that the Thermal Status bit\r
735 /// has asserted since the log bit was last cleared. This log bit will\r
736 /// remain set until cleared by software writing 0.\r
737 ///\r
738 UINT32 ThermalLog:1;\r
739 UINT32 Reserved4:2;\r
740 ///\r
741 /// [Bit 20] Residency State Regulation Log When set, indicates that the\r
742 /// Residency State Regulation Status bit has asserted since the log bit\r
743 /// was last cleared. This log bit will remain set until cleared by\r
744 /// software writing 0.\r
745 ///\r
746 UINT32 ResidencyStateRegulationLog:1;\r
747 ///\r
748 /// [Bit 21] Running Average Thermal Limit Log When set, indicates that\r
749 /// the RATL Status bit has asserted since the log bit was last cleared.\r
750 /// This log bit will remain set until cleared by software writing 0.\r
751 ///\r
752 UINT32 RunningAverageThermalLimitLog:1;\r
753 ///\r
754 /// [Bit 22] VR Therm Alert Log When set, indicates that the VR Therm\r
755 /// Alert Status bit has asserted since the log bit was last cleared. This\r
756 /// log bit will remain set until cleared by software writing 0.\r
757 ///\r
758 UINT32 VRThermAlertLog:1;\r
759 ///\r
760 /// [Bit 23] VR Thermal Design Current Log When set, indicates that the\r
761 /// VR TDC Status bit has asserted since the log bit was last cleared.\r
762 /// This log bit will remain set until cleared by software writing 0.\r
763 ///\r
764 UINT32 VRThermalDesignCurrentLog:1;\r
765 ///\r
766 /// [Bit 24] Other Log When set, indicates that the Other Status bit has\r
767 /// asserted since the log bit was last cleared. This log bit will remain\r
768 /// set until cleared by software writing 0.\r
769 ///\r
770 UINT32 OtherLog:1;\r
771 UINT32 Reserved5:1;\r
772 ///\r
773 /// [Bit 26] Package/Platform-Level PL1 Power Limiting Log When set,\r
774 /// indicates that the Package or Platform Level PL1 Power Limiting Status\r
775 /// bit has asserted since the log bit was last cleared. This log bit will\r
776 /// remain set until cleared by software writing 0.\r
777 ///\r
778 UINT32 PL1Log:1;\r
779 ///\r
780 /// [Bit 27] Package/Platform-Level PL2 Power Limiting Log When set,\r
781 /// indicates that the Package or Platform Level PL2/PL3 Power Limiting\r
782 /// Status bit has asserted since the log bit was last cleared. This log\r
783 /// bit will remain set until cleared by software writing 0.\r
784 ///\r
785 UINT32 PL2Log:1;\r
786 ///\r
787 /// [Bit 28] Max Turbo Limit Log When set, indicates that the Max Turbo\r
788 /// Limit Status bit has asserted since the log bit was last cleared. This\r
789 /// log bit will remain set until cleared by software writing 0.\r
790 ///\r
791 UINT32 MaxTurboLimitLog:1;\r
792 ///\r
793 /// [Bit 29] Turbo Transition Attenuation Log When set, indicates that the\r
794 /// Turbo Transition Attenuation Status bit has asserted since the log bit\r
795 /// was last cleared. This log bit will remain set until cleared by\r
796 /// software writing 0.\r
797 ///\r
798 UINT32 TurboTransitionAttenuationLog:1;\r
799 UINT32 Reserved6:2;\r
800 UINT32 Reserved7:32;\r
801 } Bits;\r
802 ///\r
803 /// All bit fields as a 32-bit value\r
804 ///\r
805 UINT32 Uint32;\r
806 ///\r
807 /// All bit fields as a 64-bit value\r
808 ///\r
809 UINT64 Uint64;\r
810} MSR_SKYLAKE_CORE_PERF_LIMIT_REASONS_REGISTER;\r
811\r
812\r
6b55a245
MK
813/**\r
814 Package. HDC Configuration (R/W)..\r
815\r
816 @param ECX MSR_SKYLAKE_PKG_HDC_CONFIG (0x00000652)\r
817 @param EAX Lower 32-bits of MSR value.\r
818 Described by the type MSR_SKYLAKE_PKG_HDC_CONFIG_REGISTER.\r
819 @param EDX Upper 32-bits of MSR value.\r
820 Described by the type MSR_SKYLAKE_PKG_HDC_CONFIG_REGISTER.\r
821\r
822 <b>Example usage</b>\r
823 @code\r
824 MSR_SKYLAKE_PKG_HDC_CONFIG_REGISTER Msr;\r
825\r
826 Msr.Uint64 = AsmReadMsr64 (MSR_SKYLAKE_PKG_HDC_CONFIG);\r
827 AsmWriteMsr64 (MSR_SKYLAKE_PKG_HDC_CONFIG, Msr.Uint64);\r
828 @endcode\r
04e7a465 829 @note MSR_SKYLAKE_PKG_HDC_CONFIG is defined as MSR_PKG_HDC_CONFIG in SDM.\r
6b55a245
MK
830**/\r
831#define MSR_SKYLAKE_PKG_HDC_CONFIG 0x00000652\r
832\r
833/**\r
834 MSR information returned for MSR index #MSR_SKYLAKE_PKG_HDC_CONFIG\r
835**/\r
836typedef union {\r
837 ///\r
838 /// Individual bit fields\r
839 ///\r
840 struct {\r
841 ///\r
842 /// [Bits 2:0] PKG_Cx_Monitor. Configures Package Cx state threshold for\r
843 /// MSR_PKG_HDC_DEEP_RESIDENCY.\r
844 ///\r
845 UINT32 PKG_Cx_Monitor:3;\r
846 UINT32 Reserved1:29;\r
847 UINT32 Reserved2:32;\r
848 } Bits;\r
849 ///\r
850 /// All bit fields as a 32-bit value\r
851 ///\r
852 UINT32 Uint32;\r
853 ///\r
854 /// All bit fields as a 64-bit value\r
855 ///\r
856 UINT64 Uint64;\r
857} MSR_SKYLAKE_PKG_HDC_CONFIG_REGISTER;\r
858\r
859\r
860/**\r
861 Core. Core HDC Idle Residency. (R/O). Core_Cx_Duty_Cycle_Cnt.\r
862\r
863 @param ECX MSR_SKYLAKE_CORE_HDC_RESIDENCY (0x00000653)\r
864 @param EAX Lower 32-bits of MSR value.\r
865 @param EDX Upper 32-bits of MSR value.\r
866\r
867 <b>Example usage</b>\r
868 @code\r
869 UINT64 Msr;\r
870\r
871 Msr = AsmReadMsr64 (MSR_SKYLAKE_CORE_HDC_RESIDENCY);\r
872 @endcode\r
04e7a465 873 @note MSR_SKYLAKE_CORE_HDC_RESIDENCY is defined as MSR_CORE_HDC_RESIDENCY in SDM.\r
6b55a245
MK
874**/\r
875#define MSR_SKYLAKE_CORE_HDC_RESIDENCY 0x00000653\r
876\r
877\r
878/**\r
879 Package. Accumulate the cycles the package was in C2 state and at least one\r
880 logical processor was in forced idle. (R/O). Pkg_C2_Duty_Cycle_Cnt.\r
881\r
882 @param ECX MSR_SKYLAKE_PKG_HDC_SHALLOW_RESIDENCY (0x00000655)\r
883 @param EAX Lower 32-bits of MSR value.\r
884 @param EDX Upper 32-bits of MSR value.\r
885\r
886 <b>Example usage</b>\r
887 @code\r
888 UINT64 Msr;\r
889\r
890 Msr = AsmReadMsr64 (MSR_SKYLAKE_PKG_HDC_SHALLOW_RESIDENCY);\r
891 @endcode\r
04e7a465 892 @note MSR_SKYLAKE_PKG_HDC_SHALLOW_RESIDENCY is defined as MSR_PKG_HDC_SHALLOW_RESIDENCY in SDM.\r
6b55a245
MK
893**/\r
894#define MSR_SKYLAKE_PKG_HDC_SHALLOW_RESIDENCY 0x00000655\r
895\r
896\r
897/**\r
898 Package. Package Cx HDC Idle Residency. (R/O). Pkg_Cx_Duty_Cycle_Cnt.\r
899\r
900 @param ECX MSR_SKYLAKE_PKG_HDC_DEEP_RESIDENCY (0x00000656)\r
901 @param EAX Lower 32-bits of MSR value.\r
902 @param EDX Upper 32-bits of MSR value.\r
903\r
904 <b>Example usage</b>\r
905 @code\r
906 UINT64 Msr;\r
907\r
908 Msr = AsmReadMsr64 (MSR_SKYLAKE_PKG_HDC_DEEP_RESIDENCY);\r
909 @endcode\r
04e7a465 910 @note MSR_SKYLAKE_PKG_HDC_DEEP_RESIDENCY is defined as MSR_PKG_HDC_DEEP_RESIDENCY in SDM.\r
6b55a245
MK
911**/\r
912#define MSR_SKYLAKE_PKG_HDC_DEEP_RESIDENCY 0x00000656\r
913\r
914\r
915/**\r
916 Package. Core-count Weighted C0 Residency. (R/O). Increment at the same rate\r
917 as the TSC. The increment each cycle is weighted by the number of processor\r
918 cores in the package that reside in C0. If N cores are simultaneously in C0,\r
919 then each cycle the counter increments by N.\r
920\r
921 @param ECX MSR_SKYLAKE_WEIGHTED_CORE_C0 (0x00000658)\r
922 @param EAX Lower 32-bits of MSR value.\r
923 @param EDX Upper 32-bits of MSR value.\r
924\r
925 <b>Example usage</b>\r
926 @code\r
927 UINT64 Msr;\r
928\r
929 Msr = AsmReadMsr64 (MSR_SKYLAKE_WEIGHTED_CORE_C0);\r
930 @endcode\r
04e7a465 931 @note MSR_SKYLAKE_WEIGHTED_CORE_C0 is defined as MSR_WEIGHTED_CORE_C0 in SDM.\r
6b55a245
MK
932**/\r
933#define MSR_SKYLAKE_WEIGHTED_CORE_C0 0x00000658\r
934\r
935\r
936/**\r
937 Package. Any Core C0 Residency. (R/O). Increment at the same rate as the\r
938 TSC. The increment each cycle is one if any processor core in the package is\r
939 in C0.\r
940\r
941 @param ECX MSR_SKYLAKE_ANY_CORE_C0 (0x00000659)\r
942 @param EAX Lower 32-bits of MSR value.\r
943 @param EDX Upper 32-bits of MSR value.\r
944\r
945 <b>Example usage</b>\r
946 @code\r
947 UINT64 Msr;\r
948\r
949 Msr = AsmReadMsr64 (MSR_SKYLAKE_ANY_CORE_C0);\r
950 @endcode\r
04e7a465 951 @note MSR_SKYLAKE_ANY_CORE_C0 is defined as MSR_ANY_CORE_C0 in SDM.\r
6b55a245
MK
952**/\r
953#define MSR_SKYLAKE_ANY_CORE_C0 0x00000659\r
954\r
955\r
956/**\r
957 Package. Any Graphics Engine C0 Residency. (R/O). Increment at the same rate\r
958 as the TSC. The increment each cycle is one if any processor graphic\r
959 device's compute engines are in C0.\r
960\r
961 @param ECX MSR_SKYLAKE_ANY_GFXE_C0 (0x0000065A)\r
962 @param EAX Lower 32-bits of MSR value.\r
963 @param EDX Upper 32-bits of MSR value.\r
964\r
965 <b>Example usage</b>\r
966 @code\r
967 UINT64 Msr;\r
968\r
969 Msr = AsmReadMsr64 (MSR_SKYLAKE_ANY_GFXE_C0);\r
970 @endcode\r
04e7a465 971 @note MSR_SKYLAKE_ANY_GFXE_C0 is defined as MSR_ANY_GFXE_C0 in SDM.\r
6b55a245
MK
972**/\r
973#define MSR_SKYLAKE_ANY_GFXE_C0 0x0000065A\r
974\r
975\r
976/**\r
977 Package. Core and Graphics Engine Overlapped C0 Residency. (R/O). Increment\r
978 at the same rate as the TSC. The increment each cycle is one if at least one\r
979 compute engine of the processor graphics is in C0 and at least one processor\r
980 core in the package is also in C0.\r
981\r
982 @param ECX MSR_SKYLAKE_CORE_GFXE_OVERLAP_C0 (0x0000065B)\r
983 @param EAX Lower 32-bits of MSR value.\r
984 @param EDX Upper 32-bits of MSR value.\r
985\r
986 <b>Example usage</b>\r
987 @code\r
988 UINT64 Msr;\r
989\r
990 Msr = AsmReadMsr64 (MSR_SKYLAKE_CORE_GFXE_OVERLAP_C0);\r
991 @endcode\r
04e7a465 992 @note MSR_SKYLAKE_CORE_GFXE_OVERLAP_C0 is defined as MSR_CORE_GFXE_OVERLAP_C0 in SDM.\r
6b55a245
MK
993**/\r
994#define MSR_SKYLAKE_CORE_GFXE_OVERLAP_C0 0x0000065B\r
995\r
996\r
997/**\r
998 Platform*. Platform Power Limit Control (R/W-L) Allows platform BIOS to\r
999 limit power consumption of the platform devices to the specified values. The\r
1000 Long Duration power consumption is specified via Platform_Power_Limit_1 and\r
1001 Platform_Power_Limit_1_Time. The Short Duration power consumption limit is\r
1002 specified via the Platform_Power_Limit_2 with duration chosen by the\r
1003 processor. The processor implements an exponential-weighted algorithm in the\r
1004 placement of the time windows.\r
1005\r
1006 @param ECX MSR_SKYLAKE_PLATFORM_POWER_LIMIT (0x0000065C)\r
1007 @param EAX Lower 32-bits of MSR value.\r
1008 Described by the type MSR_SKYLAKE_PLATFORM_POWER_LIMIT_REGISTER.\r
1009 @param EDX Upper 32-bits of MSR value.\r
1010 Described by the type MSR_SKYLAKE_PLATFORM_POWER_LIMIT_REGISTER.\r
1011\r
1012 <b>Example usage</b>\r
1013 @code\r
1014 MSR_SKYLAKE_PLATFORM_POWER_LIMIT_REGISTER Msr;\r
1015\r
1016 Msr.Uint64 = AsmReadMsr64 (MSR_SKYLAKE_PLATFORM_POWER_LIMIT);\r
1017 AsmWriteMsr64 (MSR_SKYLAKE_PLATFORM_POWER_LIMIT, Msr.Uint64);\r
1018 @endcode\r
04e7a465 1019 @note MSR_SKYLAKE_PLATFORM_POWER_LIMIT is defined as MSR_PLATFORM_POWER_LIMIT in SDM.\r
6b55a245
MK
1020**/\r
1021#define MSR_SKYLAKE_PLATFORM_POWER_LIMIT 0x0000065C\r
1022\r
1023/**\r
1024 MSR information returned for MSR index #MSR_SKYLAKE_PLATFORM_POWER_LIMIT\r
1025**/\r
1026typedef union {\r
1027 ///\r
1028 /// Individual bit fields\r
1029 ///\r
1030 struct {\r
1031 ///\r
1032 /// [Bits 14:0] Platform Power Limit #1. Average Power limit value which\r
1033 /// the platform must not exceed over a time window as specified by\r
1034 /// Power_Limit_1_TIME field. The default value is the Thermal Design\r
1035 /// Power (TDP) and varies with product skus. The unit is specified in\r
1036 /// MSR_RAPLPOWER_UNIT.\r
1037 ///\r
1038 UINT32 PlatformPowerLimit1:15;\r
1039 ///\r
1040 /// [Bit 15] Enable Platform Power Limit #1. When set, enables the\r
1041 /// processor to apply control policy such that the platform power does\r
1042 /// not exceed Platform Power limit #1 over the time window specified by\r
1043 /// Power Limit #1 Time Window.\r
1044 ///\r
1045 UINT32 EnablePlatformPowerLimit1:1;\r
1046 ///\r
1047 /// [Bit 16] Platform Clamping Limitation #1. When set, allows the\r
1048 /// processor to go below the OS requested P states in order to maintain\r
1049 /// the power below specified Platform Power Limit #1 value. This bit is\r
1050 /// writeable only when CPUID (EAX=6):EAX[4] is set.\r
1051 ///\r
1052 UINT32 PlatformClampingLimitation1:1;\r
1053 ///\r
1054 /// [Bits 23:17] Time Window for Platform Power Limit #1. Specifies the\r
1055 /// duration of the time window over which Platform Power Limit 1 value\r
1056 /// should be maintained for sustained long duration. This field is made\r
1057 /// up of two numbers from the following equation: Time Window = (float)\r
1058 /// ((1+(X/4))*(2^Y)), where: X. = POWER_LIMIT_1_TIME[23:22] Y. =\r
1059 /// POWER_LIMIT_1_TIME[21:17]. The maximum allowed value in this field is\r
1060 /// defined in MSR_PKG_POWER_INFO[PKG_MAX_WIN]. The default value is 0DH,\r
1061 /// The unit is specified in MSR_RAPLPOWER_UNIT[Time Unit].\r
1062 ///\r
1063 UINT32 Time:7;\r
1064 UINT32 Reserved1:8;\r
1065 ///\r
1066 /// [Bits 46:32] Platform Power Limit #2. Average Power limit value which\r
1067 /// the platform must not exceed over the Short Duration time window\r
1068 /// chosen by the processor. The recommended default value is 1.25 times\r
1069 /// the Long Duration Power Limit (i.e. Platform Power Limit # 1).\r
1070 ///\r
1071 UINT32 PlatformPowerLimit2:15;\r
1072 ///\r
1073 /// [Bit 47] Enable Platform Power Limit #2. When set, enables the\r
1074 /// processor to apply control policy such that the platform power does\r
1075 /// not exceed Platform Power limit #2 over the Short Duration time window.\r
1076 ///\r
1077 UINT32 EnablePlatformPowerLimit2:1;\r
1078 ///\r
1079 /// [Bit 48] Platform Clamping Limitation #2. When set, allows the\r
1080 /// processor to go below the OS requested P states in order to maintain\r
1081 /// the power below specified Platform Power Limit #2 value.\r
1082 ///\r
1083 UINT32 PlatformClampingLimitation2:1;\r
1084 UINT32 Reserved2:14;\r
1085 ///\r
1086 /// [Bit 63] Lock. Setting this bit will lock all other bits of this MSR\r
1087 /// until system RESET.\r
1088 ///\r
1089 UINT32 Lock:1;\r
1090 } Bits;\r
1091 ///\r
1092 /// All bit fields as a 64-bit value\r
1093 ///\r
1094 UINT64 Uint64;\r
1095} MSR_SKYLAKE_PLATFORM_POWER_LIMIT_REGISTER;\r
1096\r
1097\r
1098/**\r
1099 Thread. Last Branch Record n From IP (R/W) One of 32 triplets of last\r
1100 branch record registers on the last branch record stack. This part of the\r
1101 stack contains pointers to the source instruction. See also: - Last Branch\r
37cea63f 1102 Record Stack TOS at 1C9H - Section 17.10.\r
6b55a245
MK
1103\r
1104 @param ECX MSR_SKYLAKE_LASTBRANCH_n_FROM_IP\r
1105 @param EAX Lower 32-bits of MSR value.\r
1106 @param EDX Upper 32-bits of MSR value.\r
1107\r
1108 <b>Example usage</b>\r
1109 @code\r
1110 UINT64 Msr;\r
1111\r
1112 Msr = AsmReadMsr64 (MSR_SKYLAKE_LASTBRANCH_16_FROM_IP);\r
1113 AsmWriteMsr64 (MSR_SKYLAKE_LASTBRANCH_16_FROM_IP, Msr);\r
1114 @endcode\r
04e7a465
JF
1115 @note MSR_SKYLAKE_LASTBRANCH_16_FROM_IP is defined as MSR_LASTBRANCH_16_FROM_IP in SDM.\r
1116 MSR_SKYLAKE_LASTBRANCH_17_FROM_IP is defined as MSR_LASTBRANCH_17_FROM_IP in SDM.\r
1117 MSR_SKYLAKE_LASTBRANCH_18_FROM_IP is defined as MSR_LASTBRANCH_18_FROM_IP in SDM.\r
1118 MSR_SKYLAKE_LASTBRANCH_19_FROM_IP is defined as MSR_LASTBRANCH_19_FROM_IP in SDM.\r
1119 MSR_SKYLAKE_LASTBRANCH_20_FROM_IP is defined as MSR_LASTBRANCH_20_FROM_IP in SDM.\r
1120 MSR_SKYLAKE_LASTBRANCH_21_FROM_IP is defined as MSR_LASTBRANCH_21_FROM_IP in SDM.\r
1121 MSR_SKYLAKE_LASTBRANCH_22_FROM_IP is defined as MSR_LASTBRANCH_22_FROM_IP in SDM.\r
1122 MSR_SKYLAKE_LASTBRANCH_23_FROM_IP is defined as MSR_LASTBRANCH_23_FROM_IP in SDM.\r
1123 MSR_SKYLAKE_LASTBRANCH_24_FROM_IP is defined as MSR_LASTBRANCH_24_FROM_IP in SDM.\r
1124 MSR_SKYLAKE_LASTBRANCH_25_FROM_IP is defined as MSR_LASTBRANCH_25_FROM_IP in SDM.\r
1125 MSR_SKYLAKE_LASTBRANCH_26_FROM_IP is defined as MSR_LASTBRANCH_26_FROM_IP in SDM.\r
1126 MSR_SKYLAKE_LASTBRANCH_27_FROM_IP is defined as MSR_LASTBRANCH_27_FROM_IP in SDM.\r
1127 MSR_SKYLAKE_LASTBRANCH_28_FROM_IP is defined as MSR_LASTBRANCH_28_FROM_IP in SDM.\r
1128 MSR_SKYLAKE_LASTBRANCH_29_FROM_IP is defined as MSR_LASTBRANCH_29_FROM_IP in SDM.\r
1129 MSR_SKYLAKE_LASTBRANCH_30_FROM_IP is defined as MSR_LASTBRANCH_30_FROM_IP in SDM.\r
1130 MSR_SKYLAKE_LASTBRANCH_31_FROM_IP is defined as MSR_LASTBRANCH_31_FROM_IP in SDM.\r
6b55a245
MK
1131 @{\r
1132**/\r
1133#define MSR_SKYLAKE_LASTBRANCH_16_FROM_IP 0x00000690\r
1134#define MSR_SKYLAKE_LASTBRANCH_17_FROM_IP 0x00000691\r
1135#define MSR_SKYLAKE_LASTBRANCH_18_FROM_IP 0x00000692\r
1136#define MSR_SKYLAKE_LASTBRANCH_19_FROM_IP 0x00000693\r
1137#define MSR_SKYLAKE_LASTBRANCH_20_FROM_IP 0x00000694\r
1138#define MSR_SKYLAKE_LASTBRANCH_21_FROM_IP 0x00000695\r
1139#define MSR_SKYLAKE_LASTBRANCH_22_FROM_IP 0x00000696\r
1140#define MSR_SKYLAKE_LASTBRANCH_23_FROM_IP 0x00000697\r
1141#define MSR_SKYLAKE_LASTBRANCH_24_FROM_IP 0x00000698\r
1142#define MSR_SKYLAKE_LASTBRANCH_25_FROM_IP 0x00000699\r
1143#define MSR_SKYLAKE_LASTBRANCH_26_FROM_IP 0x0000069A\r
1144#define MSR_SKYLAKE_LASTBRANCH_27_FROM_IP 0x0000069B\r
1145#define MSR_SKYLAKE_LASTBRANCH_28_FROM_IP 0x0000069C\r
1146#define MSR_SKYLAKE_LASTBRANCH_29_FROM_IP 0x0000069D\r
1147#define MSR_SKYLAKE_LASTBRANCH_30_FROM_IP 0x0000069E\r
1148#define MSR_SKYLAKE_LASTBRANCH_31_FROM_IP 0x0000069F\r
1149/// @}\r
1150\r
37cea63f
HW
1151\r
1152/**\r
1153 Package. Indicator of Frequency Clipping in the Processor Graphics (R/W)\r
1154 (frequency refers to processor graphics frequency).\r
1155\r
1156 @param ECX MSR_SKYLAKE_GRAPHICS_PERF_LIMIT_REASONS (0x000006B0)\r
1157 @param EAX Lower 32-bits of MSR value.\r
1158 Described by the type MSR_SKYLAKE_GRAPHICS_PERF_LIMIT_REASONS_REGISTER.\r
1159 @param EDX Upper 32-bits of MSR value.\r
1160 Described by the type MSR_SKYLAKE_GRAPHICS_PERF_LIMIT_REASONS_REGISTER.\r
1161\r
1162 <b>Example usage</b>\r
1163 @code\r
1164 MSR_SKYLAKE_GRAPHICS_PERF_LIMIT_REASONS_REGISTER Msr;\r
1165\r
1166 Msr.Uint64 = AsmReadMsr64 (MSR_SKYLAKE_GRAPHICS_PERF_LIMIT_REASONS);\r
1167 AsmWriteMsr64 (MSR_SKYLAKE_GRAPHICS_PERF_LIMIT_REASONS, Msr.Uint64);\r
1168 @endcode\r
1169 @note MSR_SKYLAKE_GRAPHICS_PERF_LIMIT_REASONS is defined as MSR_GRAPHICS_PERF_LIMIT_REASONS in SDM.\r
1170**/\r
1171#define MSR_SKYLAKE_GRAPHICS_PERF_LIMIT_REASONS 0x000006B0\r
1172\r
1173/**\r
1174 MSR information returned for MSR index\r
1175 #MSR_SKYLAKE_GRAPHICS_PERF_LIMIT_REASONS\r
1176**/\r
1177typedef union {\r
1178 ///\r
1179 /// Individual bit fields\r
1180 ///\r
1181 struct {\r
1182 ///\r
1183 /// [Bit 0] PROCHOT Status (R0) When set, frequency is reduced due to\r
1184 /// assertion of external PROCHOT.\r
1185 ///\r
1186 UINT32 PROCHOT_Status:1;\r
1187 ///\r
1188 /// [Bit 1] Thermal Status (R0) When set, frequency is reduced due to a\r
1189 /// thermal event.\r
1190 ///\r
1191 UINT32 ThermalStatus:1;\r
1192 UINT32 Reserved1:3;\r
1193 ///\r
1194 /// [Bit 5] Running Average Thermal Limit Status (R0) When set, frequency\r
1195 /// is reduced due to running average thermal limit.\r
1196 ///\r
1197 UINT32 RunningAverageThermalLimitStatus:1;\r
1198 ///\r
1199 /// [Bit 6] VR Therm Alert Status (R0) When set, frequency is reduced due\r
1200 /// to a thermal alert from a processor Voltage Regulator.\r
1201 ///\r
1202 UINT32 VRThermAlertStatus:1;\r
1203 ///\r
1204 /// [Bit 7] VR Thermal Design Current Status (R0) When set, frequency is\r
1205 /// reduced due to VR TDC limit.\r
1206 ///\r
1207 UINT32 VRThermalDesignCurrentStatus:1;\r
1208 ///\r
1209 /// [Bit 8] Other Status (R0) When set, frequency is reduced due to\r
1210 /// electrical or other constraints.\r
1211 ///\r
1212 UINT32 OtherStatus:1;\r
1213 UINT32 Reserved2:1;\r
1214 ///\r
1215 /// [Bit 10] Package/Platform-Level Power Limiting PL1 Status (R0) When\r
1216 /// set, frequency is reduced due to package/platform-level power limiting\r
1217 /// PL1.\r
1218 ///\r
1219 UINT32 PL1Status:1;\r
1220 ///\r
1221 /// [Bit 11] Package/Platform-Level PL2 Power Limiting Status (R0) When\r
1222 /// set, frequency is reduced due to package/platform-level power limiting\r
1223 /// PL2/PL3.\r
1224 ///\r
1225 UINT32 PL2Status:1;\r
1226 ///\r
1227 /// [Bit 12] Inefficient Operation Status (R0) When set, processor\r
1228 /// graphics frequency is operating below target frequency.\r
1229 ///\r
1230 UINT32 InefficientOperationStatus:1;\r
1231 UINT32 Reserved3:3;\r
1232 ///\r
1233 /// [Bit 16] PROCHOT Log When set, indicates that the PROCHOT Status bit\r
1234 /// has asserted since the log bit was last cleared. This log bit will\r
1235 /// remain set until cleared by software writing 0.\r
1236 ///\r
1237 UINT32 PROCHOT_Log:1;\r
1238 ///\r
1239 /// [Bit 17] Thermal Log When set, indicates that the Thermal Status bit\r
1240 /// has asserted since the log bit was last cleared. This log bit will\r
1241 /// remain set until cleared by software writing 0.\r
1242 ///\r
1243 UINT32 ThermalLog:1;\r
1244 UINT32 Reserved4:3;\r
1245 ///\r
1246 /// [Bit 21] Running Average Thermal Limit Log When set, indicates that\r
1247 /// the RATL Status bit has asserted since the log bit was last cleared.\r
1248 /// This log bit will remain set until cleared by software writing 0.\r
1249 ///\r
1250 UINT32 RunningAverageThermalLimitLog:1;\r
1251 ///\r
1252 /// [Bit 22] VR Therm Alert Log When set, indicates that the VR Therm\r
1253 /// Alert Status bit has asserted since the log bit was last cleared. This\r
1254 /// log bit will remain set until cleared by software writing 0.\r
1255 ///\r
1256 UINT32 VRThermAlertLog:1;\r
1257 ///\r
1258 /// [Bit 23] VR Thermal Design Current Log When set, indicates that the\r
1259 /// VR Therm Alert Status bit has asserted since the log bit was last\r
1260 /// cleared. This log bit will remain set until cleared by software\r
1261 /// writing 0.\r
1262 ///\r
1263 UINT32 VRThermalDesignCurrentLog:1;\r
1264 ///\r
1265 /// [Bit 24] Other Log When set, indicates that the OTHER Status bit has\r
1266 /// asserted since the log bit was last cleared. This log bit will remain\r
1267 /// set until cleared by software writing 0.\r
1268 ///\r
1269 UINT32 OtherLog:1;\r
1270 UINT32 Reserved5:1;\r
1271 ///\r
1272 /// [Bit 26] Package/Platform-Level PL1 Power Limiting Log When set,\r
1273 /// indicates that the Package/Platform Level PL1 Power Limiting Status\r
1274 /// bit has asserted since the log bit was last cleared. This log bit will\r
1275 /// remain set until cleared by software writing 0.\r
1276 ///\r
1277 UINT32 PL1Log:1;\r
1278 ///\r
1279 /// [Bit 27] Package/Platform-Level PL2 Power Limiting Log When set,\r
1280 /// indicates that the Package/Platform Level PL2 Power Limiting Status\r
1281 /// bit has asserted since the log bit was last cleared. This log bit will\r
1282 /// remain set until cleared by software writing 0.\r
1283 ///\r
1284 UINT32 PL2Log:1;\r
1285 ///\r
1286 /// [Bit 28] Inefficient Operation Log When set, indicates that the\r
1287 /// Inefficient Operation Status bit has asserted since the log bit was\r
1288 /// last cleared. This log bit will remain set until cleared by software\r
1289 /// writing 0.\r
1290 ///\r
1291 UINT32 InefficientOperationLog:1;\r
1292 UINT32 Reserved6:3;\r
1293 UINT32 Reserved7:32;\r
1294 } Bits;\r
1295 ///\r
1296 /// All bit fields as a 32-bit value\r
1297 ///\r
1298 UINT32 Uint32;\r
1299 ///\r
1300 /// All bit fields as a 64-bit value\r
1301 ///\r
1302 UINT64 Uint64;\r
1303} MSR_SKYLAKE_GRAPHICS_PERF_LIMIT_REASONS_REGISTER;\r
1304\r
1305\r
1306/**\r
1307 Package. Indicator of Frequency Clipping in the Ring Interconnect (R/W)\r
1308 (frequency refers to ring interconnect in the uncore).\r
1309\r
1310 @param ECX MSR_SKYLAKE_RING_PERF_LIMIT_REASONS (0x000006B1)\r
1311 @param EAX Lower 32-bits of MSR value.\r
1312 Described by the type MSR_SKYLAKE_RING_PERF_LIMIT_REASONS_REGISTER.\r
1313 @param EDX Upper 32-bits of MSR value.\r
1314 Described by the type MSR_SKYLAKE_RING_PERF_LIMIT_REASONS_REGISTER.\r
1315\r
1316 <b>Example usage</b>\r
1317 @code\r
1318 MSR_SKYLAKE_RING_PERF_LIMIT_REASONS_REGISTER Msr;\r
1319\r
1320 Msr.Uint64 = AsmReadMsr64 (MSR_SKYLAKE_RING_PERF_LIMIT_REASONS);\r
1321 AsmWriteMsr64 (MSR_SKYLAKE_RING_PERF_LIMIT_REASONS, Msr.Uint64);\r
1322 @endcode\r
1323 @note MSR_SKYLAKE_RING_PERF_LIMIT_REASONS is defined as MSR_RING_PERF_LIMIT_REASONS in SDM.\r
1324**/\r
1325#define MSR_SKYLAKE_RING_PERF_LIMIT_REASONS 0x000006B1\r
1326\r
1327/**\r
1328 MSR information returned for MSR index #MSR_SKYLAKE_RING_PERF_LIMIT_REASONS\r
1329**/\r
1330typedef union {\r
1331 ///\r
1332 /// Individual bit fields\r
1333 ///\r
1334 struct {\r
1335 ///\r
1336 /// [Bit 0] PROCHOT Status (R0) When set, frequency is reduced due to\r
1337 /// assertion of external PROCHOT.\r
1338 ///\r
1339 UINT32 PROCHOT_Status:1;\r
1340 ///\r
1341 /// [Bit 1] Thermal Status (R0) When set, frequency is reduced due to a\r
1342 /// thermal event.\r
1343 ///\r
1344 UINT32 ThermalStatus:1;\r
1345 UINT32 Reserved1:3;\r
1346 ///\r
1347 /// [Bit 5] Running Average Thermal Limit Status (R0) When set, frequency\r
1348 /// is reduced due to running average thermal limit.\r
1349 ///\r
1350 UINT32 RunningAverageThermalLimitStatus:1;\r
1351 ///\r
1352 /// [Bit 6] VR Therm Alert Status (R0) When set, frequency is reduced due\r
1353 /// to a thermal alert from a processor Voltage Regulator.\r
1354 ///\r
1355 UINT32 VRThermAlertStatus:1;\r
1356 ///\r
1357 /// [Bit 7] VR Thermal Design Current Status (R0) When set, frequency is\r
1358 /// reduced due to VR TDC limit.\r
1359 ///\r
1360 UINT32 VRThermalDesignCurrentStatus:1;\r
1361 ///\r
1362 /// [Bit 8] Other Status (R0) When set, frequency is reduced due to\r
1363 /// electrical or other constraints.\r
1364 ///\r
1365 UINT32 OtherStatus:1;\r
1366 UINT32 Reserved2:1;\r
1367 ///\r
1368 /// [Bit 10] Package/Platform-Level Power Limiting PL1 Status (R0) When\r
1369 /// set, frequency is reduced due to package/Platform-level power limiting\r
1370 /// PL1.\r
1371 ///\r
1372 UINT32 PL1Status:1;\r
1373 ///\r
1374 /// [Bit 11] Package/Platform-Level PL2 Power Limiting Status (R0) When\r
1375 /// set, frequency is reduced due to package/Platform-level power limiting\r
1376 /// PL2/PL3.\r
1377 ///\r
1378 UINT32 PL2Status:1;\r
1379 UINT32 Reserved3:4;\r
1380 ///\r
1381 /// [Bit 16] PROCHOT Log When set, indicates that the PROCHOT Status bit\r
1382 /// has asserted since the log bit was last cleared. This log bit will\r
1383 /// remain set until cleared by software writing 0.\r
1384 ///\r
1385 UINT32 PROCHOT_Log:1;\r
1386 ///\r
1387 /// [Bit 17] Thermal Log When set, indicates that the Thermal Status bit\r
1388 /// has asserted since the log bit was last cleared. This log bit will\r
1389 /// remain set until cleared by software writing 0.\r
1390 ///\r
1391 UINT32 ThermalLog:1;\r
1392 UINT32 Reserved4:3;\r
1393 ///\r
1394 /// [Bit 21] Running Average Thermal Limit Log When set, indicates that\r
1395 /// the RATL Status bit has asserted since the log bit was last cleared.\r
1396 /// This log bit will remain set until cleared by software writing 0.\r
1397 ///\r
1398 UINT32 RunningAverageThermalLimitLog:1;\r
1399 ///\r
1400 /// [Bit 22] VR Therm Alert Log When set, indicates that the VR Therm\r
1401 /// Alert Status bit has asserted since the log bit was last cleared. This\r
1402 /// log bit will remain set until cleared by software writing 0.\r
1403 ///\r
1404 UINT32 VRThermAlertLog:1;\r
1405 ///\r
1406 /// [Bit 23] VR Thermal Design Current Log When set, indicates that the\r
1407 /// VR Therm Alert Status bit has asserted since the log bit was last\r
1408 /// cleared. This log bit will remain set until cleared by software\r
1409 /// writing 0.\r
1410 ///\r
1411 UINT32 VRThermalDesignCurrentLog:1;\r
1412 ///\r
1413 /// [Bit 24] Other Log When set, indicates that the OTHER Status bit has\r
1414 /// asserted since the log bit was last cleared. This log bit will remain\r
1415 /// set until cleared by software writing 0.\r
1416 ///\r
1417 UINT32 OtherLog:1;\r
1418 UINT32 Reserved5:1;\r
1419 ///\r
1420 /// [Bit 26] Package/Platform-Level PL1 Power Limiting Log When set,\r
1421 /// indicates that the Package/Platform Level PL1 Power Limiting Status\r
1422 /// bit has asserted since the log bit was last cleared. This log bit will\r
1423 /// remain set until cleared by software writing 0.\r
1424 ///\r
1425 UINT32 PL1Log:1;\r
1426 ///\r
1427 /// [Bit 27] Package/Platform-Level PL2 Power Limiting Log When set,\r
1428 /// indicates that the Package/Platform Level PL2 Power Limiting Status\r
1429 /// bit has asserted since the log bit was last cleared. This log bit will\r
1430 /// remain set until cleared by software writing 0.\r
1431 ///\r
1432 UINT32 PL2Log:1;\r
1433 UINT32 Reserved6:4;\r
1434 UINT32 Reserved7:32;\r
1435 } Bits;\r
1436 ///\r
1437 /// All bit fields as a 32-bit value\r
1438 ///\r
1439 UINT32 Uint32;\r
1440 ///\r
1441 /// All bit fields as a 64-bit value\r
1442 ///\r
1443 UINT64 Uint64;\r
1444} MSR_SKYLAKE_RING_PERF_LIMIT_REASONS_REGISTER;\r
1445\r
1446\r
6b55a245
MK
1447/**\r
1448 Thread. Last Branch Record n To IP (R/W) One of 32 triplets of last branch\r
1449 record registers on the last branch record stack. This part of the stack\r
1450 contains pointers to the destination instruction. See also: - Last Branch\r
37cea63f 1451 Record Stack TOS at 1C9H - Section 17.10.\r
6b55a245
MK
1452\r
1453 @param ECX MSR_SKYLAKE_LASTBRANCH_n_TO_IP\r
1454 @param EAX Lower 32-bits of MSR value.\r
1455 @param EDX Upper 32-bits of MSR value.\r
1456\r
1457 <b>Example usage</b>\r
1458 @code\r
1459 UINT64 Msr;\r
1460\r
1461 Msr = AsmReadMsr64 (MSR_SKYLAKE_LASTBRANCH_16_TO_IP);\r
1462 AsmWriteMsr64 (MSR_SKYLAKE_LASTBRANCH_16_TO_IP, Msr);\r
1463 @endcode\r
04e7a465
JF
1464 @note MSR_SKYLAKE_LASTBRANCH_16_TO_IP is defined as MSR_LASTBRANCH_16_TO_IP in SDM.\r
1465 MSR_SKYLAKE_LASTBRANCH_17_TO_IP is defined as MSR_LASTBRANCH_17_TO_IP in SDM.\r
1466 MSR_SKYLAKE_LASTBRANCH_18_TO_IP is defined as MSR_LASTBRANCH_18_TO_IP in SDM.\r
1467 MSR_SKYLAKE_LASTBRANCH_19_TO_IP is defined as MSR_LASTBRANCH_19_TO_IP in SDM.\r
1468 MSR_SKYLAKE_LASTBRANCH_20_TO_IP is defined as MSR_LASTBRANCH_20_TO_IP in SDM.\r
1469 MSR_SKYLAKE_LASTBRANCH_21_TO_IP is defined as MSR_LASTBRANCH_21_TO_IP in SDM.\r
1470 MSR_SKYLAKE_LASTBRANCH_22_TO_IP is defined as MSR_LASTBRANCH_22_TO_IP in SDM.\r
1471 MSR_SKYLAKE_LASTBRANCH_23_TO_IP is defined as MSR_LASTBRANCH_23_TO_IP in SDM.\r
1472 MSR_SKYLAKE_LASTBRANCH_24_TO_IP is defined as MSR_LASTBRANCH_24_TO_IP in SDM.\r
1473 MSR_SKYLAKE_LASTBRANCH_25_TO_IP is defined as MSR_LASTBRANCH_25_TO_IP in SDM.\r
1474 MSR_SKYLAKE_LASTBRANCH_26_TO_IP is defined as MSR_LASTBRANCH_26_TO_IP in SDM.\r
1475 MSR_SKYLAKE_LASTBRANCH_27_TO_IP is defined as MSR_LASTBRANCH_27_TO_IP in SDM.\r
1476 MSR_SKYLAKE_LASTBRANCH_28_TO_IP is defined as MSR_LASTBRANCH_28_TO_IP in SDM.\r
1477 MSR_SKYLAKE_LASTBRANCH_29_TO_IP is defined as MSR_LASTBRANCH_29_TO_IP in SDM.\r
1478 MSR_SKYLAKE_LASTBRANCH_30_TO_IP is defined as MSR_LASTBRANCH_30_TO_IP in SDM.\r
1479 MSR_SKYLAKE_LASTBRANCH_31_TO_IP is defined as MSR_LASTBRANCH_31_TO_IP in SDM.\r
6b55a245
MK
1480 @{\r
1481**/\r
1482#define MSR_SKYLAKE_LASTBRANCH_16_TO_IP 0x000006D0\r
1483#define MSR_SKYLAKE_LASTBRANCH_17_TO_IP 0x000006D1\r
1484#define MSR_SKYLAKE_LASTBRANCH_18_TO_IP 0x000006D2\r
1485#define MSR_SKYLAKE_LASTBRANCH_19_TO_IP 0x000006D3\r
1486#define MSR_SKYLAKE_LASTBRANCH_20_TO_IP 0x000006D4\r
1487#define MSR_SKYLAKE_LASTBRANCH_21_TO_IP 0x000006D5\r
1488#define MSR_SKYLAKE_LASTBRANCH_22_TO_IP 0x000006D6\r
1489#define MSR_SKYLAKE_LASTBRANCH_23_TO_IP 0x000006D7\r
1490#define MSR_SKYLAKE_LASTBRANCH_24_TO_IP 0x000006D8\r
1491#define MSR_SKYLAKE_LASTBRANCH_25_TO_IP 0x000006D9\r
1492#define MSR_SKYLAKE_LASTBRANCH_26_TO_IP 0x000006DA\r
1493#define MSR_SKYLAKE_LASTBRANCH_27_TO_IP 0x000006DB\r
1494#define MSR_SKYLAKE_LASTBRANCH_28_TO_IP 0x000006DC\r
1495#define MSR_SKYLAKE_LASTBRANCH_29_TO_IP 0x000006DD\r
1496#define MSR_SKYLAKE_LASTBRANCH_30_TO_IP 0x000006DE\r
1497#define MSR_SKYLAKE_LASTBRANCH_31_TO_IP 0x000006DF\r
1498/// @}\r
1499\r
1500\r
1501/**\r
1502 Thread. Last Branch Record n Additional Information (R/W) One of 32 triplet\r
1503 of last branch record registers on the last branch record stack. This part\r
1504 of the stack contains flag, TSX-related and elapsed cycle information. See\r
37cea63f 1505 also: - Last Branch Record Stack TOS at 1C9H - Section 17.7.1, "LBR\r
6b55a245
MK
1506 Stack.".\r
1507\r
1508 @param ECX MSR_SKYLAKE_LBR_INFO_n\r
1509 @param EAX Lower 32-bits of MSR value.\r
1510 @param EDX Upper 32-bits of MSR value.\r
1511\r
1512 <b>Example usage</b>\r
1513 @code\r
1514 UINT64 Msr;\r
1515\r
1516 Msr = AsmReadMsr64 (MSR_SKYLAKE_LBR_INFO_0);\r
1517 AsmWriteMsr64 (MSR_SKYLAKE_LBR_INFO_0, Msr);\r
1518 @endcode\r
04e7a465
JF
1519 @note MSR_SKYLAKE_LBR_INFO_0 is defined as MSR_LBR_INFO_0 in SDM.\r
1520 MSR_SKYLAKE_LBR_INFO_1 is defined as MSR_LBR_INFO_1 in SDM.\r
1521 MSR_SKYLAKE_LBR_INFO_2 is defined as MSR_LBR_INFO_2 in SDM.\r
1522 MSR_SKYLAKE_LBR_INFO_3 is defined as MSR_LBR_INFO_3 in SDM.\r
1523 MSR_SKYLAKE_LBR_INFO_4 is defined as MSR_LBR_INFO_4 in SDM.\r
1524 MSR_SKYLAKE_LBR_INFO_5 is defined as MSR_LBR_INFO_5 in SDM.\r
1525 MSR_SKYLAKE_LBR_INFO_6 is defined as MSR_LBR_INFO_6 in SDM.\r
1526 MSR_SKYLAKE_LBR_INFO_7 is defined as MSR_LBR_INFO_7 in SDM.\r
1527 MSR_SKYLAKE_LBR_INFO_8 is defined as MSR_LBR_INFO_8 in SDM.\r
1528 MSR_SKYLAKE_LBR_INFO_9 is defined as MSR_LBR_INFO_9 in SDM.\r
1529 MSR_SKYLAKE_LBR_INFO_10 is defined as MSR_LBR_INFO_10 in SDM.\r
1530 MSR_SKYLAKE_LBR_INFO_11 is defined as MSR_LBR_INFO_11 in SDM.\r
1531 MSR_SKYLAKE_LBR_INFO_12 is defined as MSR_LBR_INFO_12 in SDM.\r
1532 MSR_SKYLAKE_LBR_INFO_13 is defined as MSR_LBR_INFO_13 in SDM.\r
1533 MSR_SKYLAKE_LBR_INFO_14 is defined as MSR_LBR_INFO_14 in SDM.\r
1534 MSR_SKYLAKE_LBR_INFO_15 is defined as MSR_LBR_INFO_15 in SDM.\r
1535 MSR_SKYLAKE_LBR_INFO_16 is defined as MSR_LBR_INFO_16 in SDM.\r
1536 MSR_SKYLAKE_LBR_INFO_17 is defined as MSR_LBR_INFO_17 in SDM.\r
1537 MSR_SKYLAKE_LBR_INFO_18 is defined as MSR_LBR_INFO_18 in SDM.\r
1538 MSR_SKYLAKE_LBR_INFO_19 is defined as MSR_LBR_INFO_19 in SDM.\r
1539 MSR_SKYLAKE_LBR_INFO_20 is defined as MSR_LBR_INFO_20 in SDM.\r
1540 MSR_SKYLAKE_LBR_INFO_21 is defined as MSR_LBR_INFO_21 in SDM.\r
1541 MSR_SKYLAKE_LBR_INFO_22 is defined as MSR_LBR_INFO_22 in SDM.\r
1542 MSR_SKYLAKE_LBR_INFO_23 is defined as MSR_LBR_INFO_23 in SDM.\r
1543 MSR_SKYLAKE_LBR_INFO_24 is defined as MSR_LBR_INFO_24 in SDM.\r
1544 MSR_SKYLAKE_LBR_INFO_25 is defined as MSR_LBR_INFO_25 in SDM.\r
1545 MSR_SKYLAKE_LBR_INFO_26 is defined as MSR_LBR_INFO_26 in SDM.\r
1546 MSR_SKYLAKE_LBR_INFO_27 is defined as MSR_LBR_INFO_27 in SDM.\r
1547 MSR_SKYLAKE_LBR_INFO_28 is defined as MSR_LBR_INFO_28 in SDM.\r
1548 MSR_SKYLAKE_LBR_INFO_29 is defined as MSR_LBR_INFO_29 in SDM.\r
1549 MSR_SKYLAKE_LBR_INFO_30 is defined as MSR_LBR_INFO_30 in SDM.\r
1550 MSR_SKYLAKE_LBR_INFO_31 is defined as MSR_LBR_INFO_31 in SDM.\r
6b55a245
MK
1551 @{\r
1552**/\r
1553#define MSR_SKYLAKE_LBR_INFO_0 0x00000DC0\r
1554#define MSR_SKYLAKE_LBR_INFO_1 0x00000DC1\r
1555#define MSR_SKYLAKE_LBR_INFO_2 0x00000DC2\r
1556#define MSR_SKYLAKE_LBR_INFO_3 0x00000DC3\r
1557#define MSR_SKYLAKE_LBR_INFO_4 0x00000DC4\r
1558#define MSR_SKYLAKE_LBR_INFO_5 0x00000DC5\r
1559#define MSR_SKYLAKE_LBR_INFO_6 0x00000DC6\r
1560#define MSR_SKYLAKE_LBR_INFO_7 0x00000DC7\r
1561#define MSR_SKYLAKE_LBR_INFO_8 0x00000DC8\r
1562#define MSR_SKYLAKE_LBR_INFO_9 0x00000DC9\r
1563#define MSR_SKYLAKE_LBR_INFO_10 0x00000DCA\r
1564#define MSR_SKYLAKE_LBR_INFO_11 0x00000DCB\r
1565#define MSR_SKYLAKE_LBR_INFO_12 0x00000DCC\r
1566#define MSR_SKYLAKE_LBR_INFO_13 0x00000DCD\r
1567#define MSR_SKYLAKE_LBR_INFO_14 0x00000DCE\r
1568#define MSR_SKYLAKE_LBR_INFO_15 0x00000DCF\r
1569#define MSR_SKYLAKE_LBR_INFO_16 0x00000DD0\r
1570#define MSR_SKYLAKE_LBR_INFO_17 0x00000DD1\r
1571#define MSR_SKYLAKE_LBR_INFO_18 0x00000DD2\r
1572#define MSR_SKYLAKE_LBR_INFO_19 0x00000DD3\r
1573#define MSR_SKYLAKE_LBR_INFO_20 0x00000DD4\r
1574#define MSR_SKYLAKE_LBR_INFO_21 0x00000DD5\r
1575#define MSR_SKYLAKE_LBR_INFO_22 0x00000DD6\r
1576#define MSR_SKYLAKE_LBR_INFO_23 0x00000DD7\r
1577#define MSR_SKYLAKE_LBR_INFO_24 0x00000DD8\r
1578#define MSR_SKYLAKE_LBR_INFO_25 0x00000DD9\r
1579#define MSR_SKYLAKE_LBR_INFO_26 0x00000DDA\r
1580#define MSR_SKYLAKE_LBR_INFO_27 0x00000DDB\r
1581#define MSR_SKYLAKE_LBR_INFO_28 0x00000DDC\r
1582#define MSR_SKYLAKE_LBR_INFO_29 0x00000DDD\r
1583#define MSR_SKYLAKE_LBR_INFO_30 0x00000DDE\r
1584#define MSR_SKYLAKE_LBR_INFO_31 0x00000DDF\r
1585/// @}\r
1586\r
37cea63f
HW
1587\r
1588/**\r
1589 Package. Uncore fixed counter control (R/W).\r
1590\r
1591 @param ECX MSR_SKYLAKE_UNC_PERF_FIXED_CTRL (0x00000394)\r
1592 @param EAX Lower 32-bits of MSR value.\r
1593 Described by the type MSR_SKYLAKE_UNC_PERF_FIXED_CTRL_REGISTER.\r
1594 @param EDX Upper 32-bits of MSR value.\r
1595 Described by the type MSR_SKYLAKE_UNC_PERF_FIXED_CTRL_REGISTER.\r
1596\r
1597 <b>Example usage</b>\r
1598 @code\r
1599 MSR_SKYLAKE_UNC_PERF_FIXED_CTRL_REGISTER Msr;\r
1600\r
1601 Msr.Uint64 = AsmReadMsr64 (MSR_SKYLAKE_UNC_PERF_FIXED_CTRL);\r
1602 AsmWriteMsr64 (MSR_SKYLAKE_UNC_PERF_FIXED_CTRL, Msr.Uint64);\r
1603 @endcode\r
1604 @note MSR_SKYLAKE_UNC_PERF_FIXED_CTRL is defined as MSR_UNC_PERF_FIXED_CTRL in SDM.\r
1605**/\r
1606#define MSR_SKYLAKE_UNC_PERF_FIXED_CTRL 0x00000394\r
1607\r
1608/**\r
1609 MSR information returned for MSR index #MSR_SKYLAKE_UNC_PERF_FIXED_CTRL\r
1610**/\r
1611typedef union {\r
1612 ///\r
1613 /// Individual bit fields\r
1614 ///\r
1615 struct {\r
1616 UINT32 Reserved1:20;\r
1617 ///\r
1618 /// [Bit 20] Enable overflow propagation.\r
1619 ///\r
1620 UINT32 EnableOverflow:1;\r
1621 UINT32 Reserved2:1;\r
1622 ///\r
1623 /// [Bit 22] Enable counting.\r
1624 ///\r
1625 UINT32 EnableCounting:1;\r
1626 UINT32 Reserved3:9;\r
1627 UINT32 Reserved4:32;\r
1628 } Bits;\r
1629 ///\r
1630 /// All bit fields as a 32-bit value\r
1631 ///\r
1632 UINT32 Uint32;\r
1633 ///\r
1634 /// All bit fields as a 64-bit value\r
1635 ///\r
1636 UINT64 Uint64;\r
1637} MSR_SKYLAKE_UNC_PERF_FIXED_CTRL_REGISTER;\r
1638\r
1639\r
1640/**\r
1641 Package. Uncore fixed counter.\r
1642\r
1643 @param ECX MSR_SKYLAKE_UNC_PERF_FIXED_CTR (0x00000395)\r
1644 @param EAX Lower 32-bits of MSR value.\r
1645 Described by the type MSR_SKYLAKE_UNC_PERF_FIXED_CTR_REGISTER.\r
1646 @param EDX Upper 32-bits of MSR value.\r
1647 Described by the type MSR_SKYLAKE_UNC_PERF_FIXED_CTR_REGISTER.\r
1648\r
1649 <b>Example usage</b>\r
1650 @code\r
1651 MSR_SKYLAKE_UNC_PERF_FIXED_CTR_REGISTER Msr;\r
1652\r
1653 Msr.Uint64 = AsmReadMsr64 (MSR_SKYLAKE_UNC_PERF_FIXED_CTR);\r
1654 AsmWriteMsr64 (MSR_SKYLAKE_UNC_PERF_FIXED_CTR, Msr.Uint64);\r
1655 @endcode\r
1656 @note MSR_SKYLAKE_UNC_PERF_FIXED_CTR is defined as MSR_UNC_PERF_FIXED_CTR in SDM.\r
1657**/\r
1658#define MSR_SKYLAKE_UNC_PERF_FIXED_CTR 0x00000395\r
1659\r
1660/**\r
1661 MSR information returned for MSR index #MSR_SKYLAKE_UNC_PERF_FIXED_CTR\r
1662**/\r
1663typedef union {\r
1664 ///\r
1665 /// Individual bit fields\r
1666 ///\r
1667 struct {\r
1668 ///\r
1669 /// [Bits 31:0] Current count.\r
1670 ///\r
1671 UINT32 CurrentCount:32;\r
1672 ///\r
1673 /// [Bits 43:32] Current count.\r
1674 ///\r
1675 UINT32 CurrentCountHi:12;\r
1676 UINT32 Reserved:20;\r
1677 } Bits;\r
1678 ///\r
1679 /// All bit fields as a 64-bit value\r
1680 ///\r
1681 UINT64 Uint64;\r
1682} MSR_SKYLAKE_UNC_PERF_FIXED_CTR_REGISTER;\r
1683\r
1684\r
1685/**\r
1686 Package. Uncore C-Box configuration information (R/O).\r
1687\r
1688 @param ECX MSR_SKYLAKE_UNC_CBO_CONFIG (0x00000396)\r
1689 @param EAX Lower 32-bits of MSR value.\r
1690 Described by the type MSR_SKYLAKE_UNC_CBO_CONFIG_REGISTER.\r
1691 @param EDX Upper 32-bits of MSR value.\r
1692 Described by the type MSR_SKYLAKE_UNC_CBO_CONFIG_REGISTER.\r
1693\r
1694 <b>Example usage</b>\r
1695 @code\r
1696 MSR_SKYLAKE_UNC_CBO_CONFIG_REGISTER Msr;\r
1697\r
1698 Msr.Uint64 = AsmReadMsr64 (MSR_SKYLAKE_UNC_CBO_CONFIG);\r
1699 @endcode\r
1700 @note MSR_SKYLAKE_UNC_CBO_CONFIG is defined as MSR_UNC_CBO_CONFIG in SDM.\r
1701**/\r
1702#define MSR_SKYLAKE_UNC_CBO_CONFIG 0x00000396\r
1703\r
1704/**\r
1705 MSR information returned for MSR index #MSR_SKYLAKE_UNC_CBO_CONFIG\r
1706**/\r
1707typedef union {\r
1708 ///\r
1709 /// Individual bit fields\r
1710 ///\r
1711 struct {\r
1712 ///\r
1713 /// [Bits 3:0] Specifies the number of C-Box units with programmable\r
1714 /// counters (including processor cores and processor graphics),.\r
1715 ///\r
1716 UINT32 CBox:4;\r
1717 UINT32 Reserved1:28;\r
1718 UINT32 Reserved2:32;\r
1719 } Bits;\r
1720 ///\r
1721 /// All bit fields as a 32-bit value\r
1722 ///\r
1723 UINT32 Uint32;\r
1724 ///\r
1725 /// All bit fields as a 64-bit value\r
1726 ///\r
1727 UINT64 Uint64;\r
1728} MSR_SKYLAKE_UNC_CBO_CONFIG_REGISTER;\r
1729\r
1730\r
1731/**\r
1732 Package. Uncore Arb unit, performance counter 0.\r
1733\r
1734 @param ECX MSR_SKYLAKE_UNC_ARB_PERFCTR0 (0x000003B0)\r
1735 @param EAX Lower 32-bits of MSR value.\r
1736 @param EDX Upper 32-bits of MSR value.\r
1737\r
1738 <b>Example usage</b>\r
1739 @code\r
1740 UINT64 Msr;\r
1741\r
1742 Msr = AsmReadMsr64 (MSR_SKYLAKE_UNC_ARB_PERFCTR0);\r
1743 AsmWriteMsr64 (MSR_SKYLAKE_UNC_ARB_PERFCTR0, Msr);\r
1744 @endcode\r
1745 @note MSR_SKYLAKE_UNC_ARB_PERFCTR0 is defined as MSR_UNC_ARB_PERFCTR0 in SDM.\r
1746**/\r
1747#define MSR_SKYLAKE_UNC_ARB_PERFCTR0 0x000003B0\r
1748\r
1749\r
1750/**\r
1751 Package. Uncore Arb unit, performance counter 1.\r
1752\r
1753 @param ECX MSR_SKYLAKE_UNC_ARB_PERFCTR1 (0x000003B1)\r
1754 @param EAX Lower 32-bits of MSR value.\r
1755 @param EDX Upper 32-bits of MSR value.\r
1756\r
1757 <b>Example usage</b>\r
1758 @code\r
1759 UINT64 Msr;\r
1760\r
1761 Msr = AsmReadMsr64 (MSR_SKYLAKE_UNC_ARB_PERFCTR1);\r
1762 AsmWriteMsr64 (MSR_SKYLAKE_UNC_ARB_PERFCTR1, Msr);\r
1763 @endcode\r
1764 @note MSR_SKYLAKE_UNC_ARB_PERFCTR1 is defined as MSR_UNC_ARB_PERFCTR1 in SDM.\r
1765**/\r
1766#define MSR_SKYLAKE_UNC_ARB_PERFCTR1 0x000003B1\r
1767\r
1768\r
1769/**\r
1770 Package. Uncore Arb unit, counter 0 event select MSR.\r
1771\r
1772 @param ECX MSR_SKYLAKE_UNC_ARB_PERFEVTSEL0 (0x000003B2)\r
1773 @param EAX Lower 32-bits of MSR value.\r
1774 @param EDX Upper 32-bits of MSR value.\r
1775\r
1776 <b>Example usage</b>\r
1777 @code\r
1778 UINT64 Msr;\r
1779\r
1780 Msr = AsmReadMsr64 (MSR_SKYLAKE_UNC_ARB_PERFEVTSEL0);\r
1781 AsmWriteMsr64 (MSR_SKYLAKE_UNC_ARB_PERFEVTSEL0, Msr);\r
1782 @endcode\r
1783 @note MSR_SKYLAKE_UNC_ARB_PERFEVTSEL0 is defined as MSR_UNC_ARB_PERFEVTSEL0 in SDM.\r
1784**/\r
1785#define MSR_SKYLAKE_UNC_ARB_PERFEVTSEL0 0x000003B2\r
1786\r
1787\r
1788/**\r
1789 Package. Uncore Arb unit, counter 1 event select MSR.\r
1790\r
1791 @param ECX MSR_SKYLAKE_UNC_ARB_PERFEVTSEL1 (0x000003B3)\r
1792 @param EAX Lower 32-bits of MSR value.\r
1793 @param EDX Upper 32-bits of MSR value.\r
1794\r
1795 <b>Example usage</b>\r
1796 @code\r
1797 UINT64 Msr;\r
1798\r
1799 Msr = AsmReadMsr64 (MSR_SKYLAKE_UNC_ARB_PERFEVTSEL1);\r
1800 AsmWriteMsr64 (MSR_SKYLAKE_UNC_ARB_PERFEVTSEL1, Msr);\r
1801 @endcode\r
1802 @note MSR_SKYLAKE_UNC_ARB_PERFEVTSEL1 is defined as MSR_SKYLAKE_UNC_ARB_PERFEVTSEL1 in SDM.\r
1803**/\r
1804#define MSR_SKYLAKE_UNC_ARB_PERFEVTSEL1 0x000003B3\r
1805\r
1806\r
1807/**\r
1808 Package. Uncore C-Box 0, counter 0 event select MSR.\r
1809\r
1810 @param ECX MSR_SKYLAKE_UNC_CBO_0_PERFEVTSEL0 (0x00000700)\r
1811 @param EAX Lower 32-bits of MSR value.\r
1812 @param EDX Upper 32-bits of MSR value.\r
1813\r
1814 <b>Example usage</b>\r
1815 @code\r
1816 UINT64 Msr;\r
1817\r
1818 Msr = AsmReadMsr64 (MSR_SKYLAKE_UNC_CBO_0_PERFEVTSEL0);\r
1819 AsmWriteMsr64 (MSR_SKYLAKE_UNC_CBO_0_PERFEVTSEL0, Msr);\r
1820 @endcode\r
1821 @note MSR_SKYLAKE_UNC_CBO_0_PERFEVTSEL0 is defined as MSR_UNC_CBO_0_PERFEVTSEL0 in SDM.\r
1822**/\r
1823#define MSR_SKYLAKE_UNC_CBO_0_PERFEVTSEL0 0x00000700\r
1824\r
1825\r
1826/**\r
1827 Package. Uncore C-Box 0, counter 1 event select MSR.\r
1828\r
1829 @param ECX MSR_SKYLAKE_UNC_CBO_0_PERFEVTSEL1 (0x00000701)\r
1830 @param EAX Lower 32-bits of MSR value.\r
1831 @param EDX Upper 32-bits of MSR value.\r
1832\r
1833 <b>Example usage</b>\r
1834 @code\r
1835 UINT64 Msr;\r
1836\r
1837 Msr = AsmReadMsr64 (MSR_SKYLAKE_UNC_CBO_0_PERFEVTSEL1);\r
1838 AsmWriteMsr64 (MSR_SKYLAKE_UNC_CBO_0_PERFEVTSEL1, Msr);\r
1839 @endcode\r
1840 @note MSR_SKYLAKE_UNC_CBO_0_PERFEVTSEL1 is defined as MSR_UNC_CBO_0_PERFEVTSEL1 in SDM.\r
1841**/\r
1842#define MSR_SKYLAKE_UNC_CBO_0_PERFEVTSEL1 0x00000701\r
1843\r
1844\r
1845/**\r
1846 Package. Uncore C-Box 0, performance counter 0.\r
1847\r
1848 @param ECX MSR_SKYLAKE_UNC_CBO_0_PERFCTR0 (0x00000706)\r
1849 @param EAX Lower 32-bits of MSR value.\r
1850 @param EDX Upper 32-bits of MSR value.\r
1851\r
1852 <b>Example usage</b>\r
1853 @code\r
1854 UINT64 Msr;\r
1855\r
1856 Msr = AsmReadMsr64 (MSR_SKYLAKE_UNC_CBO_0_PERFCTR0);\r
1857 AsmWriteMsr64 (MSR_SKYLAKE_UNC_CBO_0_PERFCTR0, Msr);\r
1858 @endcode\r
1859 @note MSR_SKYLAKE_UNC_CBO_0_PERFCTR0 is defined as MSR_UNC_CBO_0_PERFCTR0 in SDM.\r
1860**/\r
1861#define MSR_SKYLAKE_UNC_CBO_0_PERFCTR0 0x00000706\r
1862\r
1863\r
1864/**\r
1865 Package. Uncore C-Box 0, performance counter 1.\r
1866\r
1867 @param ECX MSR_SKYLAKE_UNC_CBO_0_PERFCTR1 (0x00000707)\r
1868 @param EAX Lower 32-bits of MSR value.\r
1869 @param EDX Upper 32-bits of MSR value.\r
1870\r
1871 <b>Example usage</b>\r
1872 @code\r
1873 UINT64 Msr;\r
1874\r
1875 Msr = AsmReadMsr64 (MSR_SKYLAKE_UNC_CBO_0_PERFCTR1);\r
1876 AsmWriteMsr64 (MSR_SKYLAKE_UNC_CBO_0_PERFCTR1, Msr);\r
1877 @endcode\r
1878 @note MSR_SKYLAKE_UNC_CBO_0_PERFCTR1 is defined as MSR_UNC_CBO_0_PERFCTR1 in SDM.\r
1879**/\r
1880#define MSR_SKYLAKE_UNC_CBO_0_PERFCTR1 0x00000707\r
1881\r
1882\r
1883/**\r
1884 Package. Uncore C-Box 1, counter 0 event select MSR.\r
1885\r
1886 @param ECX MSR_SKYLAKE_UNC_CBO_1_PERFEVTSEL0 (0x00000710)\r
1887 @param EAX Lower 32-bits of MSR value.\r
1888 @param EDX Upper 32-bits of MSR value.\r
1889\r
1890 <b>Example usage</b>\r
1891 @code\r
1892 UINT64 Msr;\r
1893\r
1894 Msr = AsmReadMsr64 (MSR_SKYLAKE_UNC_CBO_1_PERFEVTSEL0);\r
1895 AsmWriteMsr64 (MSR_SKYLAKE_UNC_CBO_1_PERFEVTSEL0, Msr);\r
1896 @endcode\r
1897 @note MSR_SKYLAKE_UNC_CBO_1_PERFEVTSEL0 is defined as MSR_UNC_CBO_1_PERFEVTSEL0 in SDM.\r
1898**/\r
1899#define MSR_SKYLAKE_UNC_CBO_1_PERFEVTSEL0 0x00000710\r
1900\r
1901\r
1902/**\r
1903 Package. Uncore C-Box 1, counter 1 event select MSR.\r
1904\r
1905 @param ECX MSR_SKYLAKE_UNC_CBO_1_PERFEVTSEL1 (0x00000711)\r
1906 @param EAX Lower 32-bits of MSR value.\r
1907 @param EDX Upper 32-bits of MSR value.\r
1908\r
1909 <b>Example usage</b>\r
1910 @code\r
1911 UINT64 Msr;\r
1912\r
1913 Msr = AsmReadMsr64 (MSR_SKYLAKE_UNC_CBO_1_PERFEVTSEL1);\r
1914 AsmWriteMsr64 (MSR_SKYLAKE_UNC_CBO_1_PERFEVTSEL1, Msr);\r
1915 @endcode\r
1916 @note MSR_SKYLAKE_UNC_CBO_1_PERFEVTSEL1 is defined as MSR_UNC_CBO_1_PERFEVTSEL1 in SDM.\r
1917**/\r
1918#define MSR_SKYLAKE_UNC_CBO_1_PERFEVTSEL1 0x00000711\r
1919\r
1920\r
1921/**\r
1922 Package. Uncore C-Box 1, performance counter 0.\r
1923\r
1924 @param ECX MSR_SKYLAKE_UNC_CBO_1_PERFCTR0 (0x00000716)\r
1925 @param EAX Lower 32-bits of MSR value.\r
1926 @param EDX Upper 32-bits of MSR value.\r
1927\r
1928 <b>Example usage</b>\r
1929 @code\r
1930 UINT64 Msr;\r
1931\r
1932 Msr = AsmReadMsr64 (MSR_SKYLAKE_UNC_CBO_1_PERFCTR0);\r
1933 AsmWriteMsr64 (MSR_SKYLAKE_UNC_CBO_1_PERFCTR0, Msr);\r
1934 @endcode\r
1935 @note MSR_SKYLAKE_UNC_CBO_1_PERFCTR0 is defined as MSR_UNC_CBO_1_PERFCTR0 in SDM.\r
1936**/\r
1937#define MSR_SKYLAKE_UNC_CBO_1_PERFCTR0 0x00000716\r
1938\r
1939\r
1940/**\r
1941 Package. Uncore C-Box 1, performance counter 1.\r
1942\r
1943 @param ECX MSR_SKYLAKE_UNC_CBO_1_PERFCTR1 (0x00000717)\r
1944 @param EAX Lower 32-bits of MSR value.\r
1945 @param EDX Upper 32-bits of MSR value.\r
1946\r
1947 <b>Example usage</b>\r
1948 @code\r
1949 UINT64 Msr;\r
1950\r
1951 Msr = AsmReadMsr64 (MSR_SKYLAKE_UNC_CBO_1_PERFCTR1);\r
1952 AsmWriteMsr64 (MSR_SKYLAKE_UNC_CBO_1_PERFCTR1, Msr);\r
1953 @endcode\r
1954 @note MSR_SKYLAKE_UNC_CBO_1_PERFCTR1 is defined as MSR_UNC_CBO_1_PERFCTR1 in SDM.\r
1955**/\r
1956#define MSR_SKYLAKE_UNC_CBO_1_PERFCTR1 0x00000717\r
1957\r
1958\r
1959/**\r
1960 Package. Uncore C-Box 2, counter 0 event select MSR.\r
1961\r
1962 @param ECX MSR_SKYLAKE_UNC_CBO_2_PERFEVTSEL0 (0x00000720)\r
1963 @param EAX Lower 32-bits of MSR value.\r
1964 @param EDX Upper 32-bits of MSR value.\r
1965\r
1966 <b>Example usage</b>\r
1967 @code\r
1968 UINT64 Msr;\r
1969\r
1970 Msr = AsmReadMsr64 (MSR_SKYLAKE_UNC_CBO_2_PERFEVTSEL0);\r
1971 AsmWriteMsr64 (MSR_SKYLAKE_UNC_CBO_2_PERFEVTSEL0, Msr);\r
1972 @endcode\r
1973 @note MSR_SKYLAKE_UNC_CBO_2_PERFEVTSEL0 is defined as MSR_UNC_CBO_2_PERFEVTSEL0 in SDM.\r
1974**/\r
1975#define MSR_SKYLAKE_UNC_CBO_2_PERFEVTSEL0 0x00000720\r
1976\r
1977\r
1978/**\r
1979 Package. Uncore C-Box 2, counter 1 event select MSR.\r
1980\r
1981 @param ECX MSR_SKYLAKE_UNC_CBO_2_PERFEVTSEL1 (0x00000721)\r
1982 @param EAX Lower 32-bits of MSR value.\r
1983 @param EDX Upper 32-bits of MSR value.\r
1984\r
1985 <b>Example usage</b>\r
1986 @code\r
1987 UINT64 Msr;\r
1988\r
1989 Msr = AsmReadMsr64 (MSR_SKYLAKE_UNC_CBO_2_PERFEVTSEL1);\r
1990 AsmWriteMsr64 (MSR_SKYLAKE_UNC_CBO_2_PERFEVTSEL1, Msr);\r
1991 @endcode\r
1992 @note MSR_SKYLAKE_UNC_CBO_2_PERFEVTSEL1 is defined as MSR_UNC_CBO_2_PERFEVTSEL1 in SDM.\r
1993**/\r
1994#define MSR_SKYLAKE_UNC_CBO_2_PERFEVTSEL1 0x00000721\r
1995\r
1996\r
1997/**\r
1998 Package. Uncore C-Box 2, performance counter 0.\r
1999\r
2000 @param ECX MSR_SKYLAKE_UNC_CBO_2_PERFCTR0 (0x00000726)\r
2001 @param EAX Lower 32-bits of MSR value.\r
2002 @param EDX Upper 32-bits of MSR value.\r
2003\r
2004 <b>Example usage</b>\r
2005 @code\r
2006 UINT64 Msr;\r
2007\r
2008 Msr = AsmReadMsr64 (MSR_SKYLAKE_UNC_CBO_2_PERFCTR0);\r
2009 AsmWriteMsr64 (MSR_SKYLAKE_UNC_CBO_2_PERFCTR0, Msr);\r
2010 @endcode\r
2011 @note MSR_SKYLAKE_UNC_CBO_2_PERFCTR0 is defined as MSR_UNC_CBO_2_PERFCTR0 in SDM.\r
2012**/\r
2013#define MSR_SKYLAKE_UNC_CBO_2_PERFCTR0 0x00000726\r
2014\r
2015\r
2016/**\r
2017 Package. Uncore C-Box 2, performance counter 1.\r
2018\r
2019 @param ECX MSR_SKYLAKE_UNC_CBO_2_PERFCTR1 (0x00000727)\r
2020 @param EAX Lower 32-bits of MSR value.\r
2021 @param EDX Upper 32-bits of MSR value.\r
2022\r
2023 <b>Example usage</b>\r
2024 @code\r
2025 UINT64 Msr;\r
2026\r
2027 Msr = AsmReadMsr64 (MSR_SKYLAKE_UNC_CBO_2_PERFCTR1);\r
2028 AsmWriteMsr64 (MSR_SKYLAKE_UNC_CBO_2_PERFCTR1, Msr);\r
2029 @endcode\r
2030 @note MSR_SKYLAKE_UNC_CBO_2_PERFCTR1 is defined as MSR_UNC_CBO_2_PERFCTR1 in SDM.\r
2031**/\r
2032#define MSR_SKYLAKE_UNC_CBO_2_PERFCTR1 0x00000727\r
2033\r
2034\r
2035/**\r
2036 Package. Uncore C-Box 3, counter 0 event select MSR.\r
2037\r
2038 @param ECX MSR_SKYLAKE_UNC_CBO_3_PERFEVTSEL0 (0x00000730)\r
2039 @param EAX Lower 32-bits of MSR value.\r
2040 @param EDX Upper 32-bits of MSR value.\r
2041\r
2042 <b>Example usage</b>\r
2043 @code\r
2044 UINT64 Msr;\r
2045\r
2046 Msr = AsmReadMsr64 (MSR_SKYLAKE_UNC_CBO_3_PERFEVTSEL0);\r
2047 AsmWriteMsr64 (MSR_SKYLAKE_UNC_CBO_3_PERFEVTSEL0, Msr);\r
2048 @endcode\r
2049 @note MSR_SKYLAKE_UNC_CBO_3_PERFEVTSEL0 is defined as MSR_UNC_CBO_3_PERFEVTSEL0 in SDM.\r
2050**/\r
2051#define MSR_SKYLAKE_UNC_CBO_3_PERFEVTSEL0 0x00000730\r
2052\r
2053\r
2054/**\r
2055 Package. Uncore C-Box 3, counter 1 event select MSR.\r
2056\r
2057 @param ECX MSR_SKYLAKE_UNC_CBO_3_PERFEVTSEL1 (0x00000731)\r
2058 @param EAX Lower 32-bits of MSR value.\r
2059 @param EDX Upper 32-bits of MSR value.\r
2060\r
2061 <b>Example usage</b>\r
2062 @code\r
2063 UINT64 Msr;\r
2064\r
2065 Msr = AsmReadMsr64 (MSR_SKYLAKE_UNC_CBO_3_PERFEVTSEL1);\r
2066 AsmWriteMsr64 (MSR_SKYLAKE_UNC_CBO_3_PERFEVTSEL1, Msr);\r
2067 @endcode\r
2068 @note MSR_SKYLAKE_UNC_CBO_3_PERFEVTSEL1 is defined as MSR_UNC_CBO_3_PERFEVTSEL1 in SDM.\r
2069**/\r
2070#define MSR_SKYLAKE_UNC_CBO_3_PERFEVTSEL1 0x00000731\r
2071\r
2072\r
2073/**\r
2074 Package. Uncore C-Box 3, performance counter 0.\r
2075\r
2076 @param ECX MSR_SKYLAKE_UNC_CBO_3_PERFCTR0 (0x00000736)\r
2077 @param EAX Lower 32-bits of MSR value.\r
2078 @param EDX Upper 32-bits of MSR value.\r
2079\r
2080 <b>Example usage</b>\r
2081 @code\r
2082 UINT64 Msr;\r
2083\r
2084 Msr = AsmReadMsr64 (MSR_SKYLAKE_UNC_CBO_3_PERFCTR0);\r
2085 AsmWriteMsr64 (MSR_SKYLAKE_UNC_CBO_3_PERFCTR0, Msr);\r
2086 @endcode\r
2087 @note MSR_SKYLAKE_UNC_CBO_3_PERFCTR0 is defined as MSR_UNC_CBO_3_PERFCTR0 in SDM.\r
2088**/\r
2089#define MSR_SKYLAKE_UNC_CBO_3_PERFCTR0 0x00000736\r
2090\r
2091\r
2092/**\r
2093 Package. Uncore C-Box 3, performance counter 1.\r
2094\r
2095 @param ECX MSR_SKYLAKE_UNC_CBO_3_PERFCTR1 (0x00000737)\r
2096 @param EAX Lower 32-bits of MSR value.\r
2097 @param EDX Upper 32-bits of MSR value.\r
2098\r
2099 <b>Example usage</b>\r
2100 @code\r
2101 UINT64 Msr;\r
2102\r
2103 Msr = AsmReadMsr64 (MSR_SKYLAKE_UNC_CBO_3_PERFCTR1);\r
2104 AsmWriteMsr64 (MSR_SKYLAKE_UNC_CBO_3_PERFCTR1, Msr);\r
2105 @endcode\r
2106 @note MSR_SKYLAKE_UNC_CBO_3_PERFCTR1 is defined as MSR_UNC_CBO_3_PERFCTR1 in SDM.\r
2107**/\r
2108#define MSR_SKYLAKE_UNC_CBO_3_PERFCTR1 0x00000737\r
2109\r
2110\r
2111/**\r
2112 Package. Uncore PMU global control.\r
2113\r
2114 @param ECX MSR_SKYLAKE_UNC_PERF_GLOBAL_CTRL (0x00000E01)\r
2115 @param EAX Lower 32-bits of MSR value.\r
2116 Described by the type MSR_SKYLAKE_UNC_PERF_GLOBAL_CTRL_REGISTER.\r
2117 @param EDX Upper 32-bits of MSR value.\r
2118 Described by the type MSR_SKYLAKE_UNC_PERF_GLOBAL_CTRL_REGISTER.\r
2119\r
2120 <b>Example usage</b>\r
2121 @code\r
2122 MSR_SKYLAKE_UNC_PERF_GLOBAL_CTRL_REGISTER Msr;\r
2123\r
2124 Msr.Uint64 = AsmReadMsr64 (MSR_SKYLAKE_UNC_PERF_GLOBAL_CTRL);\r
2125 AsmWriteMsr64 (MSR_SKYLAKE_UNC_PERF_GLOBAL_CTRL, Msr.Uint64);\r
2126 @endcode\r
2127 @note MSR_SKYLAKE_UNC_PERF_GLOBAL_CTRL is defined as MSR_UNC_PERF_GLOBAL_CTRL in SDM.\r
2128**/\r
2129#define MSR_SKYLAKE_UNC_PERF_GLOBAL_CTRL 0x00000E01\r
2130\r
2131/**\r
2132 MSR information returned for MSR index #MSR_SKYLAKE_UNC_PERF_GLOBAL_CTRL\r
2133**/\r
2134typedef union {\r
2135 ///\r
2136 /// Individual bit fields\r
2137 ///\r
2138 struct {\r
2139 ///\r
2140 /// [Bit 0] Slice 0 select.\r
2141 ///\r
2142 UINT32 PMI_Sel_Slice0:1;\r
2143 ///\r
2144 /// [Bit 1] Slice 1 select.\r
2145 ///\r
2146 UINT32 PMI_Sel_Slice1:1;\r
2147 ///\r
2148 /// [Bit 2] Slice 2 select.\r
2149 ///\r
2150 UINT32 PMI_Sel_Slice2:1;\r
2151 ///\r
2152 /// [Bit 3] Slice 3 select.\r
2153 ///\r
2154 UINT32 PMI_Sel_Slice3:1;\r
2155 ///\r
2156 /// [Bit 4] Slice 4select.\r
2157 ///\r
2158 UINT32 PMI_Sel_Slice4:1;\r
2159 UINT32 Reserved1:14;\r
2160 UINT32 Reserved2:10;\r
2161 ///\r
2162 /// [Bit 29] Enable all uncore counters.\r
2163 ///\r
2164 UINT32 EN:1;\r
2165 ///\r
2166 /// [Bit 30] Enable wake on PMI.\r
2167 ///\r
2168 UINT32 WakePMI:1;\r
2169 ///\r
2170 /// [Bit 31] Enable Freezing counter when overflow.\r
2171 ///\r
2172 UINT32 FREEZE:1;\r
2173 UINT32 Reserved3:32;\r
2174 } Bits;\r
2175 ///\r
2176 /// All bit fields as a 32-bit value\r
2177 ///\r
2178 UINT32 Uint32;\r
2179 ///\r
2180 /// All bit fields as a 64-bit value\r
2181 ///\r
2182 UINT64 Uint64;\r
2183} MSR_SKYLAKE_UNC_PERF_GLOBAL_CTRL_REGISTER;\r
2184\r
2185\r
2186/**\r
2187 Package. Uncore PMU main status.\r
2188\r
2189 @param ECX MSR_SKYLAKE_UNC_PERF_GLOBAL_STATUS (0x00000E02)\r
2190 @param EAX Lower 32-bits of MSR value.\r
2191 Described by the type MSR_SKYLAKE_UNC_PERF_GLOBAL_STATUS_REGISTER.\r
2192 @param EDX Upper 32-bits of MSR value.\r
2193 Described by the type MSR_SKYLAKE_UNC_PERF_GLOBAL_STATUS_REGISTER.\r
2194\r
2195 <b>Example usage</b>\r
2196 @code\r
2197 MSR_SKYLAKE_UNC_PERF_GLOBAL_STATUS_REGISTER Msr;\r
2198\r
2199 Msr.Uint64 = AsmReadMsr64 (MSR_SKYLAKE_UNC_PERF_GLOBAL_STATUS);\r
2200 AsmWriteMsr64 (MSR_SKYLAKE_UNC_PERF_GLOBAL_STATUS, Msr.Uint64);\r
2201 @endcode\r
2202 @note MSR_SKYLAKE_UNC_PERF_GLOBAL_STATUS is defined as MSR_UNC_PERF_GLOBAL_STATUS in SDM.\r
2203**/\r
2204#define MSR_SKYLAKE_UNC_PERF_GLOBAL_STATUS 0x00000E02\r
2205\r
2206/**\r
2207 MSR information returned for MSR index #MSR_SKYLAKE_UNC_PERF_GLOBAL_STATUS\r
2208**/\r
2209typedef union {\r
2210 ///\r
2211 /// Individual bit fields\r
2212 ///\r
2213 struct {\r
2214 ///\r
2215 /// [Bit 0] Fixed counter overflowed.\r
2216 ///\r
2217 UINT32 Fixed:1;\r
2218 ///\r
2219 /// [Bit 1] An ARB counter overflowed.\r
2220 ///\r
2221 UINT32 ARB:1;\r
2222 UINT32 Reserved1:1;\r
2223 ///\r
2224 /// [Bit 3] A CBox counter overflowed (on any slice).\r
2225 ///\r
2226 UINT32 CBox:1;\r
2227 UINT32 Reserved2:28;\r
2228 UINT32 Reserved3:32;\r
2229 } Bits;\r
2230 ///\r
2231 /// All bit fields as a 32-bit value\r
2232 ///\r
2233 UINT32 Uint32;\r
2234 ///\r
2235 /// All bit fields as a 64-bit value\r
2236 ///\r
2237 UINT64 Uint64;\r
2238} MSR_SKYLAKE_UNC_PERF_GLOBAL_STATUS_REGISTER;\r
2239\r
6b55a245 2240#endif\r