]>
Commit | Line | Data |
---|---|---|
8e6bff88 MK |
1 | /** @file\r |
2 | MSR Definitions for P6 Family Processors.\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 | |
e057908f | 9 | Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.<BR>\r |
0acd8697 | 10 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
8e6bff88 MK |
11 | \r |
12 | @par Specification Reference:\r | |
ba1a2d11 ED |
13 | Intel(R) 64 and IA-32 Architectures Software Developer's Manual, Volume 4,\r |
14 | May 2018, Volume 4: Model-Specific-Registers (MSR)\r | |
8e6bff88 MK |
15 | \r |
16 | **/\r | |
17 | \r | |
18 | #ifndef __P6_MSR_H__\r | |
19 | #define __P6_MSR_H__\r | |
20 | \r | |
e057908f | 21 | #include <Register/Intel/ArchitecturalMsr.h>\r |
8e6bff88 | 22 | \r |
f4c982bf JF |
23 | /**\r |
24 | Is P6 Family Processors?\r | |
25 | \r | |
26 | @param DisplayFamily Display Family ID\r | |
27 | @param DisplayModel Display Model ID\r | |
28 | \r | |
29 | @retval TRUE Yes, it is.\r | |
30 | @retval FALSE No, it isn't.\r | |
31 | **/\r | |
32 | #define IS_P6_PROCESSOR(DisplayFamily, DisplayModel) \\r | |
33 | (DisplayFamily == 0x06 && \\r | |
34 | ( \\r | |
35 | DisplayModel == 0x03 || \\r | |
36 | DisplayModel == 0x05 || \\r | |
37 | DisplayModel == 0x07 || \\r | |
38 | DisplayModel == 0x08 || \\r | |
39 | DisplayModel == 0x0A || \\r | |
40 | DisplayModel == 0x0B \\r | |
41 | ) \\r | |
42 | )\r | |
43 | \r | |
8e6bff88 | 44 | /**\r |
ba1a2d11 | 45 | See Section 2.22, "MSRs in Pentium Processors.".\r |
8e6bff88 MK |
46 | \r |
47 | @param ECX MSR_P6_P5_MC_ADDR (0x00000000)\r | |
48 | @param EAX Lower 32-bits of MSR value.\r | |
49 | @param EDX Upper 32-bits of MSR value.\r | |
50 | \r | |
51 | <b>Example usage</b>\r | |
52 | @code\r | |
53 | UINT64 Msr;\r | |
54 | \r | |
55 | Msr = AsmReadMsr64 (MSR_P6_P5_MC_ADDR);\r | |
56 | AsmWriteMsr64 (MSR_P6_P5_MC_ADDR, Msr);\r | |
57 | @endcode\r | |
91e3003c | 58 | @note MSR_P6_P5_MC_ADDR is defined as P5_MC_ADDR in SDM.\r |
8e6bff88 | 59 | **/\r |
2f88bd3a | 60 | #define MSR_P6_P5_MC_ADDR 0x00000000\r |
8e6bff88 MK |
61 | \r |
62 | /**\r | |
ba1a2d11 | 63 | See Section 2.22, "MSRs in Pentium Processors.".\r |
8e6bff88 MK |
64 | \r |
65 | @param ECX MSR_P6_P5_MC_TYPE (0x00000001)\r | |
66 | @param EAX Lower 32-bits of MSR value.\r | |
67 | @param EDX Upper 32-bits of MSR value.\r | |
68 | \r | |
69 | <b>Example usage</b>\r | |
70 | @code\r | |
71 | UINT64 Msr;\r | |
72 | \r | |
73 | Msr = AsmReadMsr64 (MSR_P6_P5_MC_TYPE);\r | |
74 | AsmWriteMsr64 (MSR_P6_P5_MC_TYPE, Msr);\r | |
75 | @endcode\r | |
91e3003c | 76 | @note MSR_P6_P5_MC_TYPE is defined as P5_MC_TYPE in SDM.\r |
8e6bff88 | 77 | **/\r |
2f88bd3a | 78 | #define MSR_P6_P5_MC_TYPE 0x00000001\r |
8e6bff88 MK |
79 | \r |
80 | /**\r | |
ba1a2d11 | 81 | See Section 17.17, "Time-Stamp Counter.".\r |
8e6bff88 MK |
82 | \r |
83 | @param ECX MSR_P6_TSC (0x00000010)\r | |
84 | @param EAX Lower 32-bits of MSR value.\r | |
85 | @param EDX Upper 32-bits of MSR value.\r | |
86 | \r | |
87 | <b>Example usage</b>\r | |
88 | @code\r | |
89 | UINT64 Msr;\r | |
90 | \r | |
91 | Msr = AsmReadMsr64 (MSR_P6_TSC);\r | |
92 | AsmWriteMsr64 (MSR_P6_TSC, Msr);\r | |
93 | @endcode\r | |
91e3003c | 94 | @note MSR_P6_TSC is defined as TSC in SDM.\r |
8e6bff88 | 95 | **/\r |
2f88bd3a | 96 | #define MSR_P6_TSC 0x00000010\r |
8e6bff88 MK |
97 | \r |
98 | /**\r | |
99 | Platform ID (R) The operating system can use this MSR to determine "slot"\r | |
100 | information for the processor and the proper microcode update to load.\r | |
101 | \r | |
102 | @param ECX MSR_P6_IA32_PLATFORM_ID (0x00000017)\r | |
103 | @param EAX Lower 32-bits of MSR value.\r | |
104 | Described by the type MSR_P6_IA32_PLATFORM_ID_REGISTER.\r | |
105 | @param EDX Upper 32-bits of MSR value.\r | |
106 | Described by the type MSR_P6_IA32_PLATFORM_ID_REGISTER.\r | |
107 | \r | |
108 | <b>Example usage</b>\r | |
109 | @code\r | |
110 | MSR_P6_IA32_PLATFORM_ID_REGISTER Msr;\r | |
111 | \r | |
112 | Msr.Uint64 = AsmReadMsr64 (MSR_P6_IA32_PLATFORM_ID);\r | |
113 | @endcode\r | |
91e3003c | 114 | @note MSR_P6_IA32_PLATFORM_ID is defined as IA32_PLATFORM_ID in SDM.\r |
8e6bff88 | 115 | **/\r |
2f88bd3a | 116 | #define MSR_P6_IA32_PLATFORM_ID 0x00000017\r |
8e6bff88 MK |
117 | \r |
118 | /**\r | |
119 | MSR information returned for MSR index #MSR_P6_IA32_PLATFORM_ID\r | |
120 | **/\r | |
121 | typedef union {\r | |
122 | ///\r | |
123 | /// Individual bit fields\r | |
124 | ///\r | |
125 | struct {\r | |
2f88bd3a MK |
126 | UINT32 Reserved1 : 32;\r |
127 | UINT32 Reserved2 : 18;\r | |
8e6bff88 MK |
128 | ///\r |
129 | /// [Bits 52:50] Platform Id (R) Contains information concerning the\r | |
130 | /// intended platform for the processor.\r | |
131 | ///\r | |
132 | /// 52 51 50\r | |
133 | /// 0 0 0 Processor Flag 0.\r | |
134 | /// 0 0 1 Processor Flag 1\r | |
135 | /// 0 1 0 Processor Flag 2\r | |
136 | /// 0 1 1 Processor Flag 3\r | |
137 | /// 1 0 0 Processor Flag 4\r | |
138 | /// 1 0 1 Processor Flag 5\r | |
139 | /// 1 1 0 Processor Flag 6\r | |
140 | /// 1 1 1 Processor Flag 7\r | |
141 | ///\r | |
2f88bd3a | 142 | UINT32 PlatformId : 3;\r |
8e6bff88 MK |
143 | ///\r |
144 | /// [Bits 56:53] L2 Cache Latency Read.\r | |
145 | ///\r | |
2f88bd3a MK |
146 | UINT32 L2CacheLatencyRead : 4;\r |
147 | UINT32 Reserved3 : 3;\r | |
8e6bff88 MK |
148 | ///\r |
149 | /// [Bit 60] Clock Frequency Ratio Read.\r | |
150 | ///\r | |
2f88bd3a MK |
151 | UINT32 ClockFrequencyRatioRead : 1;\r |
152 | UINT32 Reserved4 : 3;\r | |
8e6bff88 MK |
153 | } Bits;\r |
154 | ///\r | |
155 | /// All bit fields as a 64-bit value\r | |
156 | ///\r | |
2f88bd3a | 157 | UINT64 Uint64;\r |
8e6bff88 MK |
158 | } MSR_P6_IA32_PLATFORM_ID_REGISTER;\r |
159 | \r | |
8e6bff88 MK |
160 | /**\r |
161 | Section 10.4.4, "Local APIC Status and Location.".\r | |
162 | \r | |
163 | @param ECX MSR_P6_APIC_BASE (0x0000001B)\r | |
164 | @param EAX Lower 32-bits of MSR value.\r | |
165 | Described by the type MSR_P6_APIC_BASE_REGISTER.\r | |
166 | @param EDX Upper 32-bits of MSR value.\r | |
167 | Described by the type MSR_P6_APIC_BASE_REGISTER.\r | |
168 | \r | |
169 | <b>Example usage</b>\r | |
170 | @code\r | |
171 | MSR_P6_APIC_BASE_REGISTER Msr;\r | |
172 | \r | |
173 | Msr.Uint64 = AsmReadMsr64 (MSR_P6_APIC_BASE);\r | |
174 | AsmWriteMsr64 (MSR_P6_APIC_BASE, Msr.Uint64);\r | |
175 | @endcode\r | |
91e3003c | 176 | @note MSR_P6_APIC_BASE is defined as APIC_BASE in SDM.\r |
8e6bff88 | 177 | **/\r |
2f88bd3a | 178 | #define MSR_P6_APIC_BASE 0x0000001B\r |
8e6bff88 MK |
179 | \r |
180 | /**\r | |
181 | MSR information returned for MSR index #MSR_P6_APIC_BASE\r | |
182 | **/\r | |
183 | typedef union {\r | |
184 | ///\r | |
185 | /// Individual bit fields\r | |
186 | ///\r | |
187 | struct {\r | |
2f88bd3a | 188 | UINT32 Reserved1 : 8;\r |
8e6bff88 MK |
189 | ///\r |
190 | /// [Bit 8] Boot Strap Processor indicator Bit 1 = BSP.\r | |
191 | ///\r | |
2f88bd3a MK |
192 | UINT32 BSP : 1;\r |
193 | UINT32 Reserved2 : 2;\r | |
8e6bff88 MK |
194 | ///\r |
195 | /// [Bit 11] APIC Global Enable Bit - Permanent till reset 1 = Enabled 0 =\r | |
196 | /// Disabled.\r | |
197 | ///\r | |
2f88bd3a | 198 | UINT32 EN : 1;\r |
8e6bff88 MK |
199 | ///\r |
200 | /// [Bits 31:12] APIC Base Address.\r | |
201 | ///\r | |
2f88bd3a MK |
202 | UINT32 ApicBase : 20;\r |
203 | UINT32 Reserved3 : 32;\r | |
8e6bff88 MK |
204 | } Bits;\r |
205 | ///\r | |
206 | /// All bit fields as a 32-bit value\r | |
207 | ///\r | |
2f88bd3a | 208 | UINT32 Uint32;\r |
8e6bff88 MK |
209 | ///\r |
210 | /// All bit fields as a 64-bit value\r | |
211 | ///\r | |
2f88bd3a | 212 | UINT64 Uint64;\r |
8e6bff88 MK |
213 | } MSR_P6_APIC_BASE_REGISTER;\r |
214 | \r | |
8e6bff88 MK |
215 | /**\r |
216 | Processor Hard Power-On Configuration (R/W) Enables and disables processor\r | |
217 | features; (R) indicates current processor configuration.\r | |
218 | \r | |
219 | @param ECX MSR_P6_EBL_CR_POWERON (0x0000002A)\r | |
220 | @param EAX Lower 32-bits of MSR value.\r | |
221 | Described by the type MSR_P6_EBL_CR_POWERON_REGISTER.\r | |
222 | @param EDX Upper 32-bits of MSR value.\r | |
223 | Described by the type MSR_P6_EBL_CR_POWERON_REGISTER.\r | |
224 | \r | |
225 | <b>Example usage</b>\r | |
226 | @code\r | |
227 | MSR_P6_EBL_CR_POWERON_REGISTER Msr;\r | |
228 | \r | |
229 | Msr.Uint64 = AsmReadMsr64 (MSR_P6_EBL_CR_POWERON);\r | |
230 | AsmWriteMsr64 (MSR_P6_EBL_CR_POWERON, Msr.Uint64);\r | |
231 | @endcode\r | |
91e3003c | 232 | @note MSR_P6_EBL_CR_POWERON is defined as EBL_CR_POWERON in SDM.\r |
8e6bff88 | 233 | **/\r |
2f88bd3a | 234 | #define MSR_P6_EBL_CR_POWERON 0x0000002A\r |
8e6bff88 MK |
235 | \r |
236 | /**\r | |
237 | MSR information returned for MSR index #MSR_P6_EBL_CR_POWERON\r | |
238 | **/\r | |
239 | typedef union {\r | |
240 | ///\r | |
241 | /// Individual bit fields\r | |
242 | ///\r | |
243 | struct {\r | |
2f88bd3a | 244 | UINT32 Reserved1 : 1;\r |
8e6bff88 MK |
245 | ///\r |
246 | /// [Bit 1] Data Error Checking Enable (R/W) 1 = Enabled 0 = Disabled.\r | |
247 | ///\r | |
2f88bd3a | 248 | UINT32 DataErrorCheckingEnable : 1;\r |
8e6bff88 MK |
249 | ///\r |
250 | /// [Bit 2] Response Error Checking Enable FRCERR Observation Enable (R/W)\r | |
251 | /// 1 = Enabled 0 = Disabled.\r | |
252 | ///\r | |
2f88bd3a | 253 | UINT32 ResponseErrorCheckingEnable : 1;\r |
8e6bff88 MK |
254 | ///\r |
255 | /// [Bit 3] AERR# Drive Enable (R/W) 1 = Enabled 0 = Disabled.\r | |
256 | ///\r | |
2f88bd3a | 257 | UINT32 AERR_DriveEnable : 1;\r |
8e6bff88 MK |
258 | ///\r |
259 | /// [Bit 4] BERR# Enable for Initiator Bus Requests (R/W) 1 = Enabled 0 =\r | |
260 | /// Disabled.\r | |
261 | ///\r | |
2f88bd3a MK |
262 | UINT32 BERR_Enable : 1;\r |
263 | UINT32 Reserved2 : 1;\r | |
8e6bff88 MK |
264 | ///\r |
265 | /// [Bit 6] BERR# Driver Enable for Initiator Internal Errors (R/W) 1 =\r | |
266 | /// Enabled 0 = Disabled.\r | |
267 | ///\r | |
2f88bd3a | 268 | UINT32 BERR_DriverEnable : 1;\r |
8e6bff88 MK |
269 | ///\r |
270 | /// [Bit 7] BINIT# Driver Enable (R/W) 1 = Enabled 0 = Disabled.\r | |
271 | ///\r | |
2f88bd3a | 272 | UINT32 BINIT_DriverEnable : 1;\r |
8e6bff88 MK |
273 | ///\r |
274 | /// [Bit 8] Output Tri-state Enabled (R) 1 = Enabled 0 = Disabled.\r | |
275 | ///\r | |
2f88bd3a | 276 | UINT32 OutputTriStateEnable : 1;\r |
8e6bff88 MK |
277 | ///\r |
278 | /// [Bit 9] Execute BIST (R) 1 = Enabled 0 = Disabled.\r | |
279 | ///\r | |
2f88bd3a | 280 | UINT32 ExecuteBIST : 1;\r |
8e6bff88 MK |
281 | ///\r |
282 | /// [Bit 10] AERR# Observation Enabled (R) 1 = Enabled 0 = Disabled.\r | |
283 | ///\r | |
2f88bd3a MK |
284 | UINT32 AERR_ObservationEnabled : 1;\r |
285 | UINT32 Reserved3 : 1;\r | |
8e6bff88 MK |
286 | ///\r |
287 | /// [Bit 12] BINIT# Observation Enabled (R) 1 = Enabled 0 = Disabled.\r | |
288 | ///\r | |
2f88bd3a | 289 | UINT32 BINIT_ObservationEnabled : 1;\r |
8e6bff88 MK |
290 | ///\r |
291 | /// [Bit 13] In Order Queue Depth (R) 1 = 1 0 = 8.\r | |
292 | ///\r | |
2f88bd3a | 293 | UINT32 InOrderQueueDepth : 1;\r |
8e6bff88 MK |
294 | ///\r |
295 | /// [Bit 14] 1-MByte Power on Reset Vector (R) 1 = 1MByte 0 = 4GBytes.\r | |
296 | ///\r | |
2f88bd3a | 297 | UINT32 ResetVector : 1;\r |
8e6bff88 MK |
298 | ///\r |
299 | /// [Bit 15] FRC Mode Enable (R) 1 = Enabled 0 = Disabled.\r | |
300 | ///\r | |
2f88bd3a | 301 | UINT32 FRCModeEnable : 1;\r |
8e6bff88 MK |
302 | ///\r |
303 | /// [Bits 17:16] APIC Cluster ID (R).\r | |
304 | ///\r | |
2f88bd3a | 305 | UINT32 APICClusterID : 2;\r |
8e6bff88 MK |
306 | ///\r |
307 | /// [Bits 19:18] System Bus Frequency (R) 00 = 66MHz 10 = 100Mhz 01 =\r | |
308 | /// 133MHz 11 = Reserved.\r | |
309 | ///\r | |
2f88bd3a | 310 | UINT32 SystemBusFrequency : 2;\r |
8e6bff88 MK |
311 | ///\r |
312 | /// [Bits 21:20] Symmetric Arbitration ID (R).\r | |
313 | ///\r | |
2f88bd3a | 314 | UINT32 SymmetricArbitrationID : 2;\r |
8e6bff88 MK |
315 | ///\r |
316 | /// [Bits 25:22] Clock Frequency Ratio (R).\r | |
317 | ///\r | |
2f88bd3a | 318 | UINT32 ClockFrequencyRatio : 4;\r |
8e6bff88 MK |
319 | ///\r |
320 | /// [Bit 26] Low Power Mode Enable (R/W).\r | |
321 | ///\r | |
2f88bd3a | 322 | UINT32 LowPowerModeEnable : 1;\r |
8e6bff88 MK |
323 | ///\r |
324 | /// [Bit 27] Clock Frequency Ratio.\r | |
325 | ///\r | |
2f88bd3a MK |
326 | UINT32 ClockFrequencyRatio1 : 1;\r |
327 | UINT32 Reserved4 : 4;\r | |
328 | UINT32 Reserved5 : 32;\r | |
8e6bff88 MK |
329 | } Bits;\r |
330 | ///\r | |
331 | /// All bit fields as a 32-bit value\r | |
332 | ///\r | |
2f88bd3a | 333 | UINT32 Uint32;\r |
8e6bff88 MK |
334 | ///\r |
335 | /// All bit fields as a 64-bit value\r | |
336 | ///\r | |
2f88bd3a | 337 | UINT64 Uint64;\r |
8e6bff88 MK |
338 | } MSR_P6_EBL_CR_POWERON_REGISTER;\r |
339 | \r | |
8e6bff88 MK |
340 | /**\r |
341 | Test Control Register.\r | |
342 | \r | |
343 | @param ECX MSR_P6_TEST_CTL (0x00000033)\r | |
344 | @param EAX Lower 32-bits of MSR value.\r | |
345 | Described by the type MSR_P6_TEST_CTL_REGISTER.\r | |
346 | @param EDX Upper 32-bits of MSR value.\r | |
347 | Described by the type MSR_P6_TEST_CTL_REGISTER.\r | |
348 | \r | |
349 | <b>Example usage</b>\r | |
350 | @code\r | |
351 | MSR_P6_TEST_CTL_REGISTER Msr;\r | |
352 | \r | |
353 | Msr.Uint64 = AsmReadMsr64 (MSR_P6_TEST_CTL);\r | |
354 | AsmWriteMsr64 (MSR_P6_TEST_CTL, Msr.Uint64);\r | |
355 | @endcode\r | |
91e3003c | 356 | @note MSR_P6_TEST_CTL is defined as TEST_CTL in SDM.\r |
8e6bff88 | 357 | **/\r |
2f88bd3a | 358 | #define MSR_P6_TEST_CTL 0x00000033\r |
8e6bff88 MK |
359 | \r |
360 | /**\r | |
361 | MSR information returned for MSR index #MSR_P6_TEST_CTL\r | |
362 | **/\r | |
363 | typedef union {\r | |
364 | ///\r | |
365 | /// Individual bit fields\r | |
366 | ///\r | |
367 | struct {\r | |
2f88bd3a | 368 | UINT32 Reserved1 : 30;\r |
8e6bff88 MK |
369 | ///\r |
370 | /// [Bit 30] Streaming Buffer Disable.\r | |
371 | ///\r | |
2f88bd3a | 372 | UINT32 StreamingBufferDisable : 1;\r |
8e6bff88 MK |
373 | ///\r |
374 | /// [Bit 31] Disable LOCK# Assertion for split locked access.\r | |
375 | ///\r | |
2f88bd3a MK |
376 | UINT32 Disable_LOCK : 1;\r |
377 | UINT32 Reserved2 : 32;\r | |
8e6bff88 MK |
378 | } Bits;\r |
379 | ///\r | |
380 | /// All bit fields as a 32-bit value\r | |
381 | ///\r | |
2f88bd3a | 382 | UINT32 Uint32;\r |
8e6bff88 MK |
383 | ///\r |
384 | /// All bit fields as a 64-bit value\r | |
385 | ///\r | |
2f88bd3a | 386 | UINT64 Uint64;\r |
8e6bff88 MK |
387 | } MSR_P6_TEST_CTL_REGISTER;\r |
388 | \r | |
8e6bff88 MK |
389 | /**\r |
390 | BIOS Update Trigger Register.\r | |
391 | \r | |
392 | @param ECX MSR_P6_BIOS_UPDT_TRIG (0x00000079)\r | |
393 | @param EAX Lower 32-bits of MSR value.\r | |
394 | @param EDX Upper 32-bits of MSR value.\r | |
395 | \r | |
396 | <b>Example usage</b>\r | |
397 | @code\r | |
398 | UINT64 Msr;\r | |
399 | \r | |
400 | Msr = AsmReadMsr64 (MSR_P6_BIOS_UPDT_TRIG);\r | |
401 | AsmWriteMsr64 (MSR_P6_BIOS_UPDT_TRIG, Msr);\r | |
402 | @endcode\r | |
91e3003c | 403 | @note MSR_P6_BIOS_UPDT_TRIG is defined as BIOS_UPDT_TRIG in SDM.\r |
8e6bff88 | 404 | **/\r |
2f88bd3a | 405 | #define MSR_P6_BIOS_UPDT_TRIG 0x00000079\r |
8e6bff88 MK |
406 | \r |
407 | /**\r | |
408 | Chunk n data register D[63:0]: used to write to and read from the L2.\r | |
409 | \r | |
410 | @param ECX MSR_P6_BBL_CR_Dn\r | |
411 | @param EAX Lower 32-bits of MSR value.\r | |
412 | @param EDX Upper 32-bits of MSR value.\r | |
413 | \r | |
414 | <b>Example usage</b>\r | |
415 | @code\r | |
416 | UINT64 Msr;\r | |
417 | \r | |
418 | Msr = AsmReadMsr64 (MSR_P6_BBL_CR_D0);\r | |
419 | AsmWriteMsr64 (MSR_P6_BBL_CR_D0, Msr);\r | |
420 | @endcode\r | |
91e3003c JF |
421 | @note MSR_P6_BBL_CR_D0 is defined as BBL_CR_D0 in SDM.\r |
422 | MSR_P6_BBL_CR_D1 is defined as BBL_CR_D1 in SDM.\r | |
423 | MSR_P6_BBL_CR_D2 is defined as BBL_CR_D2 in SDM.\r | |
8e6bff88 MK |
424 | @{\r |
425 | **/\r | |
2f88bd3a MK |
426 | #define MSR_P6_BBL_CR_D0 0x00000088\r |
427 | #define MSR_P6_BBL_CR_D1 0x00000089\r | |
428 | #define MSR_P6_BBL_CR_D2 0x0000008A\r | |
8e6bff88 MK |
429 | /// @}\r |
430 | \r | |
8e6bff88 MK |
431 | /**\r |
432 | BIOS Update Signature Register or Chunk 3 data register D[63:0] Used to\r | |
433 | write to and read from the L2 depending on the usage model.\r | |
434 | \r | |
435 | @param ECX MSR_P6_BIOS_SIGN (0x0000008B)\r | |
436 | @param EAX Lower 32-bits of MSR value.\r | |
437 | @param EDX Upper 32-bits of MSR value.\r | |
438 | \r | |
439 | <b>Example usage</b>\r | |
440 | @code\r | |
441 | UINT64 Msr;\r | |
442 | \r | |
443 | Msr = AsmReadMsr64 (MSR_P6_BIOS_SIGN);\r | |
444 | AsmWriteMsr64 (MSR_P6_BIOS_SIGN, Msr);\r | |
445 | @endcode\r | |
91e3003c | 446 | @note MSR_P6_BIOS_SIGN is defined as BIOS_SIGN in SDM.\r |
8e6bff88 | 447 | **/\r |
2f88bd3a | 448 | #define MSR_P6_BIOS_SIGN 0x0000008B\r |
8e6bff88 MK |
449 | \r |
450 | /**\r | |
451 | \r | |
452 | \r | |
453 | @param ECX MSR_P6_PERFCTR0 (0x000000C1)\r | |
454 | @param EAX Lower 32-bits of MSR value.\r | |
455 | @param EDX Upper 32-bits of MSR value.\r | |
456 | \r | |
457 | <b>Example usage</b>\r | |
458 | @code\r | |
459 | UINT64 Msr;\r | |
460 | \r | |
461 | Msr = AsmReadMsr64 (MSR_P6_PERFCTR0);\r | |
462 | AsmWriteMsr64 (MSR_P6_PERFCTR0, Msr);\r | |
463 | @endcode\r | |
91e3003c JF |
464 | @note MSR_P6_PERFCTR0 is defined as PERFCTR0 in SDM.\r |
465 | MSR_P6_PERFCTR1 is defined as PERFCTR1 in SDM.\r | |
8e6bff88 MK |
466 | @{\r |
467 | **/\r | |
2f88bd3a MK |
468 | #define MSR_P6_PERFCTR0 0x000000C1\r |
469 | #define MSR_P6_PERFCTR1 0x000000C2\r | |
8e6bff88 MK |
470 | /// @}\r |
471 | \r | |
8e6bff88 MK |
472 | /**\r |
473 | \r | |
474 | \r | |
475 | @param ECX MSR_P6_MTRRCAP (0x000000FE)\r | |
476 | @param EAX Lower 32-bits of MSR value.\r | |
477 | @param EDX Upper 32-bits of MSR value.\r | |
478 | \r | |
479 | <b>Example usage</b>\r | |
480 | @code\r | |
481 | UINT64 Msr;\r | |
482 | \r | |
483 | Msr = AsmReadMsr64 (MSR_P6_MTRRCAP);\r | |
484 | AsmWriteMsr64 (MSR_P6_MTRRCAP, Msr);\r | |
485 | @endcode\r | |
91e3003c | 486 | @note MSR_P6_MTRRCAP is defined as MTRRCAP in SDM.\r |
8e6bff88 | 487 | **/\r |
2f88bd3a | 488 | #define MSR_P6_MTRRCAP 0x000000FE\r |
8e6bff88 MK |
489 | \r |
490 | /**\r | |
491 | Address register: used to send specified address (A31-A3) to L2 during cache\r | |
492 | initialization accesses.\r | |
493 | \r | |
494 | @param ECX MSR_P6_BBL_CR_ADDR (0x00000116)\r | |
495 | @param EAX Lower 32-bits of MSR value.\r | |
496 | Described by the type MSR_P6_BBL_CR_ADDR_REGISTER.\r | |
497 | @param EDX Upper 32-bits of MSR value.\r | |
498 | Described by the type MSR_P6_BBL_CR_ADDR_REGISTER.\r | |
499 | \r | |
500 | <b>Example usage</b>\r | |
501 | @code\r | |
502 | MSR_P6_BBL_CR_ADDR_REGISTER Msr;\r | |
503 | \r | |
504 | Msr.Uint64 = AsmReadMsr64 (MSR_P6_BBL_CR_ADDR);\r | |
505 | AsmWriteMsr64 (MSR_P6_BBL_CR_ADDR, Msr.Uint64);\r | |
506 | @endcode\r | |
91e3003c | 507 | @note MSR_P6_BBL_CR_ADDR is defined as BBL_CR_ADDR in SDM.\r |
8e6bff88 | 508 | **/\r |
2f88bd3a | 509 | #define MSR_P6_BBL_CR_ADDR 0x00000116\r |
8e6bff88 MK |
510 | \r |
511 | /**\r | |
512 | MSR information returned for MSR index #MSR_P6_BBL_CR_ADDR\r | |
513 | **/\r | |
514 | typedef union {\r | |
515 | ///\r | |
516 | /// Individual bit fields\r | |
517 | ///\r | |
518 | struct {\r | |
2f88bd3a | 519 | UINT32 Reserved1 : 3;\r |
8e6bff88 MK |
520 | ///\r |
521 | /// [Bits 31:3] Address bits\r | |
522 | ///\r | |
2f88bd3a MK |
523 | UINT32 Address : 29;\r |
524 | UINT32 Reserved2 : 32;\r | |
8e6bff88 MK |
525 | } Bits;\r |
526 | ///\r | |
527 | /// All bit fields as a 32-bit value\r | |
528 | ///\r | |
2f88bd3a | 529 | UINT32 Uint32;\r |
8e6bff88 MK |
530 | ///\r |
531 | /// All bit fields as a 64-bit value\r | |
532 | ///\r | |
2f88bd3a | 533 | UINT64 Uint64;\r |
8e6bff88 MK |
534 | } MSR_P6_BBL_CR_ADDR_REGISTER;\r |
535 | \r | |
8e6bff88 MK |
536 | /**\r |
537 | Data ECC register D[7:0]: used to write ECC and read ECC to/from L2.\r | |
538 | \r | |
539 | @param ECX MSR_P6_BBL_CR_DECC (0x00000118)\r | |
540 | @param EAX Lower 32-bits of MSR value.\r | |
541 | @param EDX Upper 32-bits of MSR value.\r | |
542 | \r | |
543 | <b>Example usage</b>\r | |
544 | @code\r | |
545 | UINT64 Msr;\r | |
546 | \r | |
547 | Msr = AsmReadMsr64 (MSR_P6_BBL_CR_DECC);\r | |
548 | AsmWriteMsr64 (MSR_P6_BBL_CR_DECC, Msr);\r | |
549 | @endcode\r | |
91e3003c | 550 | @note MSR_P6_BBL_CR_DECC is defined as BBL_CR_DECC in SDM.\r |
8e6bff88 | 551 | **/\r |
2f88bd3a | 552 | #define MSR_P6_BBL_CR_DECC 0x00000118\r |
8e6bff88 MK |
553 | \r |
554 | /**\r | |
555 | Control register: used to program L2 commands to be issued via cache\r | |
556 | configuration accesses mechanism. Also receives L2 lookup response.\r | |
557 | \r | |
558 | @param ECX MSR_P6_BBL_CR_CTL (0x00000119)\r | |
559 | @param EAX Lower 32-bits of MSR value.\r | |
560 | Described by the type MSR_P6_BBL_CR_CTL_REGISTER.\r | |
561 | @param EDX Upper 32-bits of MSR value.\r | |
562 | Described by the type MSR_P6_BBL_CR_CTL_REGISTER.\r | |
563 | \r | |
564 | <b>Example usage</b>\r | |
565 | @code\r | |
566 | MSR_P6_BBL_CR_CTL_REGISTER Msr;\r | |
567 | \r | |
568 | Msr.Uint64 = AsmReadMsr64 (MSR_P6_BBL_CR_CTL);\r | |
569 | AsmWriteMsr64 (MSR_P6_BBL_CR_CTL, Msr.Uint64);\r | |
570 | @endcode\r | |
91e3003c | 571 | @note MSR_P6_BBL_CR_CTL is defined as BBL_CR_CTL in SDM.\r |
8e6bff88 | 572 | **/\r |
2f88bd3a | 573 | #define MSR_P6_BBL_CR_CTL 0x00000119\r |
8e6bff88 MK |
574 | \r |
575 | /**\r | |
576 | MSR information returned for MSR index #MSR_P6_BBL_CR_CTL\r | |
577 | **/\r | |
578 | typedef union {\r | |
579 | ///\r | |
580 | /// Individual bit fields\r | |
581 | ///\r | |
582 | struct {\r | |
583 | ///\r | |
584 | /// [Bits 4:0] L2 Command\r | |
585 | /// Data Read w/ LRU update (RLU)\r | |
586 | /// Tag Read w/ Data Read (TRR)\r | |
587 | /// Tag Inquire (TI)\r | |
588 | /// L2 Control Register Read (CR)\r | |
589 | /// L2 Control Register Write (CW)\r | |
590 | /// Tag Write w/ Data Read (TWR)\r | |
591 | /// Tag Write w/ Data Write (TWW)\r | |
592 | /// Tag Write (TW).\r | |
593 | ///\r | |
2f88bd3a | 594 | UINT32 L2Command : 5;\r |
8e6bff88 MK |
595 | ///\r |
596 | /// [Bits 6:5] State to L2\r | |
597 | ///\r | |
2f88bd3a MK |
598 | UINT32 StateToL2 : 2;\r |
599 | UINT32 Reserved : 1;\r | |
8e6bff88 MK |
600 | ///\r |
601 | /// [Bits 9:8] Way to L2.\r | |
602 | ///\r | |
2f88bd3a | 603 | UINT32 WayToL2 : 2;\r |
8e6bff88 MK |
604 | ///\r |
605 | /// [Bits 11:10] Way 0 - 00, Way 1 - 01, Way 2 - 10, Way 3 - 11.\r | |
606 | ///\r | |
2f88bd3a | 607 | UINT32 Way : 2;\r |
8e6bff88 MK |
608 | ///\r |
609 | /// [Bits 13:12] Modified - 11,Exclusive - 10, Shared - 01, Invalid - 00.\r | |
610 | ///\r | |
2f88bd3a | 611 | UINT32 MESI : 2;\r |
8e6bff88 MK |
612 | ///\r |
613 | /// [Bits 15:14] State from L2.\r | |
614 | ///\r | |
2f88bd3a MK |
615 | UINT32 StateFromL2 : 2;\r |
616 | UINT32 Reserved2 : 1;\r | |
8e6bff88 MK |
617 | ///\r |
618 | /// [Bit 17] L2 Hit.\r | |
619 | ///\r | |
2f88bd3a MK |
620 | UINT32 L2Hit : 1;\r |
621 | UINT32 Reserved3 : 1;\r | |
8e6bff88 MK |
622 | ///\r |
623 | /// [Bits 20:19] User supplied ECC.\r | |
624 | ///\r | |
2f88bd3a | 625 | UINT32 UserEcc : 2;\r |
8e6bff88 MK |
626 | ///\r |
627 | /// [Bit 21] Processor number Disable = 1 Enable = 0 Reserved.\r | |
628 | ///\r | |
2f88bd3a MK |
629 | UINT32 ProcessorNumber : 1;\r |
630 | UINT32 Reserved4 : 10;\r | |
631 | UINT32 Reserved5 : 32;\r | |
8e6bff88 MK |
632 | } Bits;\r |
633 | ///\r | |
634 | /// All bit fields as a 32-bit value\r | |
635 | ///\r | |
2f88bd3a | 636 | UINT32 Uint32;\r |
8e6bff88 MK |
637 | ///\r |
638 | /// All bit fields as a 64-bit value\r | |
639 | ///\r | |
2f88bd3a | 640 | UINT64 Uint64;\r |
8e6bff88 MK |
641 | } MSR_P6_BBL_CR_CTL_REGISTER;\r |
642 | \r | |
8e6bff88 MK |
643 | /**\r |
644 | Trigger register: used to initiate a cache configuration accesses access,\r | |
645 | Write only with Data = 0.\r | |
646 | \r | |
647 | @param ECX MSR_P6_BBL_CR_TRIG (0x0000011A)\r | |
648 | @param EAX Lower 32-bits of MSR value.\r | |
649 | @param EDX Upper 32-bits of MSR value.\r | |
650 | \r | |
651 | <b>Example usage</b>\r | |
652 | @code\r | |
653 | UINT64 Msr;\r | |
654 | \r | |
655 | Msr = AsmReadMsr64 (MSR_P6_BBL_CR_TRIG);\r | |
656 | AsmWriteMsr64 (MSR_P6_BBL_CR_TRIG, Msr);\r | |
657 | @endcode\r | |
91e3003c | 658 | @note MSR_P6_BBL_CR_TRIG is defined as BBL_CR_TRIG in SDM.\r |
8e6bff88 | 659 | **/\r |
2f88bd3a | 660 | #define MSR_P6_BBL_CR_TRIG 0x0000011A\r |
8e6bff88 MK |
661 | \r |
662 | /**\r | |
663 | Busy register: indicates when a cache configuration accesses L2 command is\r | |
664 | in progress. D[0] = 1 = BUSY.\r | |
665 | \r | |
666 | @param ECX MSR_P6_BBL_CR_BUSY (0x0000011B)\r | |
667 | @param EAX Lower 32-bits of MSR value.\r | |
668 | @param EDX Upper 32-bits of MSR value.\r | |
669 | \r | |
670 | <b>Example usage</b>\r | |
671 | @code\r | |
672 | UINT64 Msr;\r | |
673 | \r | |
674 | Msr = AsmReadMsr64 (MSR_P6_BBL_CR_BUSY);\r | |
675 | AsmWriteMsr64 (MSR_P6_BBL_CR_BUSY, Msr);\r | |
676 | @endcode\r | |
91e3003c | 677 | @note MSR_P6_BBL_CR_BUSY is defined as BBL_CR_BUSY in SDM.\r |
8e6bff88 | 678 | **/\r |
2f88bd3a | 679 | #define MSR_P6_BBL_CR_BUSY 0x0000011B\r |
8e6bff88 MK |
680 | \r |
681 | /**\r | |
682 | Control register 3: used to configure the L2 Cache.\r | |
683 | \r | |
684 | @param ECX MSR_P6_BBL_CR_CTL3 (0x0000011E)\r | |
685 | @param EAX Lower 32-bits of MSR value.\r | |
686 | Described by the type MSR_P6_BBL_CR_CTL3_REGISTER.\r | |
687 | @param EDX Upper 32-bits of MSR value.\r | |
688 | Described by the type MSR_P6_BBL_CR_CTL3_REGISTER.\r | |
689 | \r | |
690 | <b>Example usage</b>\r | |
691 | @code\r | |
692 | MSR_P6_BBL_CR_CTL3_REGISTER Msr;\r | |
693 | \r | |
694 | Msr.Uint64 = AsmReadMsr64 (MSR_P6_BBL_CR_CTL3);\r | |
695 | AsmWriteMsr64 (MSR_P6_BBL_CR_CTL3, Msr.Uint64);\r | |
696 | @endcode\r | |
91e3003c | 697 | @note MSR_P6_BBL_CR_CTL3 is defined as BBL_CR_CTL3 in SDM.\r |
8e6bff88 | 698 | **/\r |
2f88bd3a | 699 | #define MSR_P6_BBL_CR_CTL3 0x0000011E\r |
8e6bff88 MK |
700 | \r |
701 | /**\r | |
702 | MSR information returned for MSR index #MSR_P6_BBL_CR_CTL3\r | |
703 | **/\r | |
704 | typedef union {\r | |
705 | ///\r | |
706 | /// Individual bit fields\r | |
707 | ///\r | |
708 | struct {\r | |
709 | ///\r | |
710 | /// [Bit 0] L2 Configured (read/write ).\r | |
711 | ///\r | |
2f88bd3a | 712 | UINT32 L2Configured : 1;\r |
8e6bff88 MK |
713 | ///\r |
714 | /// [Bits 4:1] L2 Cache Latency (read/write).\r | |
715 | ///\r | |
2f88bd3a | 716 | UINT32 L2CacheLatency : 4;\r |
8e6bff88 MK |
717 | ///\r |
718 | /// [Bit 5] ECC Check Enable (read/write).\r | |
719 | ///\r | |
2f88bd3a | 720 | UINT32 ECCCheckEnable : 1;\r |
8e6bff88 MK |
721 | ///\r |
722 | /// [Bit 6] Address Parity Check Enable (read/write).\r | |
723 | ///\r | |
2f88bd3a | 724 | UINT32 AddressParityCheckEnable : 1;\r |
8e6bff88 MK |
725 | ///\r |
726 | /// [Bit 7] CRTN Parity Check Enable (read/write).\r | |
727 | ///\r | |
2f88bd3a | 728 | UINT32 CRTNParityCheckEnable : 1;\r |
8e6bff88 MK |
729 | ///\r |
730 | /// [Bit 8] L2 Enabled (read/write).\r | |
731 | ///\r | |
2f88bd3a | 732 | UINT32 L2Enabled : 1;\r |
8e6bff88 MK |
733 | ///\r |
734 | /// [Bits 10:9] L2 Associativity (read only) Direct Mapped 2 Way 4 Way\r | |
735 | /// Reserved.\r | |
736 | ///\r | |
2f88bd3a | 737 | UINT32 L2Associativity : 2;\r |
8e6bff88 MK |
738 | ///\r |
739 | /// [Bits 12:11] Number of L2 banks (read only).\r | |
740 | ///\r | |
2f88bd3a | 741 | UINT32 L2Banks : 2;\r |
8e6bff88 MK |
742 | ///\r |
743 | /// [Bits 17:13] Cache size per bank (read/write) 256KBytes 512KBytes\r | |
744 | /// 1MByte 2MByte 4MBytes.\r | |
745 | ///\r | |
2f88bd3a | 746 | UINT32 CacheSizePerBank : 5;\r |
8e6bff88 MK |
747 | ///\r |
748 | /// [Bit 18] Cache State error checking enable (read/write).\r | |
749 | ///\r | |
2f88bd3a MK |
750 | UINT32 CacheStateErrorEnable : 1;\r |
751 | UINT32 Reserved1 : 1;\r | |
8e6bff88 MK |
752 | ///\r |
753 | /// [Bits 22:20] L2 Physical Address Range support 64GBytes 32GBytes\r | |
754 | /// 16GBytes 8GBytes 4GBytes 2GBytes 1GBytes 512MBytes.\r | |
755 | ///\r | |
2f88bd3a | 756 | UINT32 L2AddressRange : 3;\r |
8e6bff88 MK |
757 | ///\r |
758 | /// [Bit 23] L2 Hardware Disable (read only).\r | |
759 | ///\r | |
2f88bd3a MK |
760 | UINT32 L2HardwareDisable : 1;\r |
761 | UINT32 Reserved2 : 1;\r | |
8e6bff88 MK |
762 | ///\r |
763 | /// [Bit 25] Cache bus fraction (read only).\r | |
764 | ///\r | |
2f88bd3a MK |
765 | UINT32 CacheBusFraction : 1;\r |
766 | UINT32 Reserved3 : 6;\r | |
767 | UINT32 Reserved4 : 32;\r | |
8e6bff88 MK |
768 | } Bits;\r |
769 | ///\r | |
770 | /// All bit fields as a 32-bit value\r | |
771 | ///\r | |
2f88bd3a | 772 | UINT32 Uint32;\r |
8e6bff88 MK |
773 | ///\r |
774 | /// All bit fields as a 64-bit value\r | |
775 | ///\r | |
2f88bd3a | 776 | UINT64 Uint64;\r |
8e6bff88 MK |
777 | } MSR_P6_BBL_CR_CTL3_REGISTER;\r |
778 | \r | |
8e6bff88 MK |
779 | /**\r |
780 | CS register target for CPL 0 code.\r | |
781 | \r | |
782 | @param ECX MSR_P6_SYSENTER_CS_MSR (0x00000174)\r | |
783 | @param EAX Lower 32-bits of MSR value.\r | |
784 | @param EDX Upper 32-bits of MSR value.\r | |
785 | \r | |
786 | <b>Example usage</b>\r | |
787 | @code\r | |
788 | UINT64 Msr;\r | |
789 | \r | |
790 | Msr = AsmReadMsr64 (MSR_P6_SYSENTER_CS_MSR);\r | |
791 | AsmWriteMsr64 (MSR_P6_SYSENTER_CS_MSR, Msr);\r | |
792 | @endcode\r | |
91e3003c | 793 | @note MSR_P6_SYSENTER_CS_MSR is defined as SYSENTER_CS_MSR in SDM.\r |
8e6bff88 | 794 | **/\r |
2f88bd3a | 795 | #define MSR_P6_SYSENTER_CS_MSR 0x00000174\r |
8e6bff88 MK |
796 | \r |
797 | /**\r | |
798 | Stack pointer for CPL 0 stack.\r | |
799 | \r | |
800 | @param ECX MSR_P6_SYSENTER_ESP_MSR (0x00000175)\r | |
801 | @param EAX Lower 32-bits of MSR value.\r | |
802 | @param EDX Upper 32-bits of MSR value.\r | |
803 | \r | |
804 | <b>Example usage</b>\r | |
805 | @code\r | |
806 | UINT64 Msr;\r | |
807 | \r | |
808 | Msr = AsmReadMsr64 (MSR_P6_SYSENTER_ESP_MSR);\r | |
809 | AsmWriteMsr64 (MSR_P6_SYSENTER_ESP_MSR, Msr);\r | |
810 | @endcode\r | |
91e3003c | 811 | @note MSR_P6_SYSENTER_ESP_MSR is defined as SYSENTER_ESP_MSR in SDM.\r |
8e6bff88 | 812 | **/\r |
2f88bd3a | 813 | #define MSR_P6_SYSENTER_ESP_MSR 0x00000175\r |
8e6bff88 MK |
814 | \r |
815 | /**\r | |
816 | CPL 0 code entry point.\r | |
817 | \r | |
818 | @param ECX MSR_P6_SYSENTER_EIP_MSR (0x00000176)\r | |
819 | @param EAX Lower 32-bits of MSR value.\r | |
820 | @param EDX Upper 32-bits of MSR value.\r | |
821 | \r | |
822 | <b>Example usage</b>\r | |
823 | @code\r | |
824 | UINT64 Msr;\r | |
825 | \r | |
826 | Msr = AsmReadMsr64 (MSR_P6_SYSENTER_EIP_MSR);\r | |
827 | AsmWriteMsr64 (MSR_P6_SYSENTER_EIP_MSR, Msr);\r | |
828 | @endcode\r | |
91e3003c | 829 | @note MSR_P6_SYSENTER_EIP_MSR is defined as SYSENTER_EIP_MSR in SDM.\r |
8e6bff88 | 830 | **/\r |
2f88bd3a | 831 | #define MSR_P6_SYSENTER_EIP_MSR 0x00000176\r |
8e6bff88 MK |
832 | \r |
833 | /**\r | |
834 | \r | |
835 | \r | |
836 | @param ECX MSR_P6_MCG_CAP (0x00000179)\r | |
837 | @param EAX Lower 32-bits of MSR value.\r | |
838 | @param EDX Upper 32-bits of MSR value.\r | |
839 | \r | |
840 | <b>Example usage</b>\r | |
841 | @code\r | |
842 | UINT64 Msr;\r | |
843 | \r | |
844 | Msr = AsmReadMsr64 (MSR_P6_MCG_CAP);\r | |
845 | AsmWriteMsr64 (MSR_P6_MCG_CAP, Msr);\r | |
846 | @endcode\r | |
91e3003c | 847 | @note MSR_P6_MCG_CAP is defined as MCG_CAP in SDM.\r |
8e6bff88 | 848 | **/\r |
2f88bd3a | 849 | #define MSR_P6_MCG_CAP 0x00000179\r |
8e6bff88 MK |
850 | \r |
851 | /**\r | |
852 | \r | |
853 | \r | |
854 | @param ECX MSR_P6_MCG_STATUS (0x0000017A)\r | |
855 | @param EAX Lower 32-bits of MSR value.\r | |
856 | @param EDX Upper 32-bits of MSR value.\r | |
857 | \r | |
858 | <b>Example usage</b>\r | |
859 | @code\r | |
860 | UINT64 Msr;\r | |
861 | \r | |
862 | Msr = AsmReadMsr64 (MSR_P6_MCG_STATUS);\r | |
863 | AsmWriteMsr64 (MSR_P6_MCG_STATUS, Msr);\r | |
864 | @endcode\r | |
91e3003c | 865 | @note MSR_P6_MCG_STATUS is defined as MCG_STATUS in SDM.\r |
8e6bff88 | 866 | **/\r |
2f88bd3a | 867 | #define MSR_P6_MCG_STATUS 0x0000017A\r |
8e6bff88 MK |
868 | \r |
869 | /**\r | |
870 | \r | |
871 | \r | |
872 | @param ECX MSR_P6_MCG_CTL (0x0000017B)\r | |
873 | @param EAX Lower 32-bits of MSR value.\r | |
874 | @param EDX Upper 32-bits of MSR value.\r | |
875 | \r | |
876 | <b>Example usage</b>\r | |
877 | @code\r | |
878 | UINT64 Msr;\r | |
879 | \r | |
880 | Msr = AsmReadMsr64 (MSR_P6_MCG_CTL);\r | |
881 | AsmWriteMsr64 (MSR_P6_MCG_CTL, Msr);\r | |
882 | @endcode\r | |
91e3003c | 883 | @note MSR_P6_MCG_CTL is defined as MCG_CTL in SDM.\r |
8e6bff88 | 884 | **/\r |
2f88bd3a | 885 | #define MSR_P6_MCG_CTL 0x0000017B\r |
8e6bff88 MK |
886 | \r |
887 | /**\r | |
888 | \r | |
889 | \r | |
890 | @param ECX MSR_P6_PERFEVTSELn\r | |
891 | @param EAX Lower 32-bits of MSR value.\r | |
892 | Described by the type MSR_P6_PERFEVTSEL_REGISTER.\r | |
893 | @param EDX Upper 32-bits of MSR value.\r | |
894 | Described by the type MSR_P6_PERFEVTSEL_REGISTER.\r | |
895 | \r | |
896 | <b>Example usage</b>\r | |
897 | @code\r | |
898 | MSR_P6_PERFEVTSEL_REGISTER Msr;\r | |
899 | \r | |
900 | Msr.Uint64 = AsmReadMsr64 (MSR_P6_PERFEVTSEL0);\r | |
901 | AsmWriteMsr64 (MSR_P6_PERFEVTSEL0, Msr.Uint64);\r | |
902 | @endcode\r | |
91e3003c JF |
903 | @note MSR_P6_PERFEVTSEL0 is defined as PERFEVTSEL0 in SDM.\r |
904 | MSR_P6_PERFEVTSEL1 is defined as PERFEVTSEL1 in SDM.\r | |
8e6bff88 MK |
905 | @{\r |
906 | **/\r | |
2f88bd3a MK |
907 | #define MSR_P6_PERFEVTSEL0 0x00000186\r |
908 | #define MSR_P6_PERFEVTSEL1 0x00000187\r | |
8e6bff88 MK |
909 | /// @}\r |
910 | \r | |
911 | /**\r | |
912 | MSR information returned for MSR indexes #MSR_P6_PERFEVTSEL0 and\r | |
913 | #MSR_P6_PERFEVTSEL1.\r | |
914 | **/\r | |
915 | typedef union {\r | |
916 | ///\r | |
917 | /// Individual bit fields\r | |
918 | ///\r | |
919 | struct {\r | |
920 | ///\r | |
921 | /// [Bits 7:0] Event Select Refer to Performance Counter section for a\r | |
922 | /// list of event encodings.\r | |
923 | ///\r | |
2f88bd3a | 924 | UINT32 EventSelect : 8;\r |
8e6bff88 MK |
925 | ///\r |
926 | /// [Bits 15:8] UMASK (Unit Mask) Unit mask register set to 0 to enable\r | |
927 | /// all count options.\r | |
928 | ///\r | |
2f88bd3a | 929 | UINT32 UMASK : 8;\r |
8e6bff88 MK |
930 | ///\r |
931 | /// [Bit 16] USER Controls the counting of events at Privilege levels of\r | |
932 | /// 1, 2, and 3.\r | |
933 | ///\r | |
2f88bd3a | 934 | UINT32 USR : 1;\r |
8e6bff88 MK |
935 | ///\r |
936 | /// [Bit 17] OS Controls the counting of events at Privilege level of 0.\r | |
937 | ///\r | |
2f88bd3a | 938 | UINT32 OS : 1;\r |
8e6bff88 MK |
939 | ///\r |
940 | /// [Bit 18] E Occurrence/Duration Mode Select 1 = Occurrence 0 = Duration.\r | |
941 | ///\r | |
2f88bd3a | 942 | UINT32 E : 1;\r |
8e6bff88 MK |
943 | ///\r |
944 | /// [Bit 19] PC Enabled the signaling of performance counter overflow via\r | |
945 | /// BP0 pin.\r | |
946 | ///\r | |
2f88bd3a | 947 | UINT32 PC : 1;\r |
8e6bff88 MK |
948 | ///\r |
949 | /// [Bit 20] INT Enables the signaling of counter overflow via input to\r | |
950 | /// APIC 1 = Enable 0 = Disable.\r | |
951 | ///\r | |
2f88bd3a MK |
952 | UINT32 INT : 1;\r |
953 | UINT32 Reserved1 : 1;\r | |
8e6bff88 MK |
954 | ///\r |
955 | /// [Bit 22] ENABLE Enables the counting of performance events in both\r | |
956 | /// counters 1 = Enable 0 = Disable.\r | |
957 | ///\r | |
2f88bd3a | 958 | UINT32 EN : 1;\r |
8e6bff88 MK |
959 | ///\r |
960 | /// [Bit 23] INV Inverts the result of the CMASK condition 1 = Inverted 0\r | |
961 | /// = Non-Inverted.\r | |
962 | ///\r | |
2f88bd3a | 963 | UINT32 INV : 1;\r |
8e6bff88 MK |
964 | ///\r |
965 | /// [Bits 31:24] CMASK (Counter Mask).\r | |
966 | ///\r | |
2f88bd3a MK |
967 | UINT32 CMASK : 8;\r |
968 | UINT32 Reserved2 : 32;\r | |
8e6bff88 MK |
969 | } Bits;\r |
970 | ///\r | |
971 | /// All bit fields as a 32-bit value\r | |
972 | ///\r | |
2f88bd3a | 973 | UINT32 Uint32;\r |
8e6bff88 MK |
974 | ///\r |
975 | /// All bit fields as a 64-bit value\r | |
976 | ///\r | |
2f88bd3a | 977 | UINT64 Uint64;\r |
8e6bff88 MK |
978 | } MSR_P6_PERFEVTSEL_REGISTER;\r |
979 | \r | |
8e6bff88 MK |
980 | /**\r |
981 | \r | |
982 | \r | |
983 | @param ECX MSR_P6_DEBUGCTLMSR (0x000001D9)\r | |
984 | @param EAX Lower 32-bits of MSR value.\r | |
985 | Described by the type MSR_P6_DEBUGCTLMSR_REGISTER.\r | |
986 | @param EDX Upper 32-bits of MSR value.\r | |
987 | Described by the type MSR_P6_DEBUGCTLMSR_REGISTER.\r | |
988 | \r | |
989 | <b>Example usage</b>\r | |
990 | @code\r | |
991 | MSR_P6_DEBUGCTLMSR_REGISTER Msr;\r | |
992 | \r | |
993 | Msr.Uint64 = AsmReadMsr64 (MSR_P6_DEBUGCTLMSR);\r | |
994 | AsmWriteMsr64 (MSR_P6_DEBUGCTLMSR, Msr.Uint64);\r | |
995 | @endcode\r | |
91e3003c | 996 | @note MSR_P6_DEBUGCTLMSR is defined as DEBUGCTLMSR in SDM.\r |
8e6bff88 | 997 | **/\r |
2f88bd3a | 998 | #define MSR_P6_DEBUGCTLMSR 0x000001D9\r |
8e6bff88 MK |
999 | \r |
1000 | /**\r | |
1001 | MSR information returned for MSR index #MSR_P6_DEBUGCTLMSR\r | |
1002 | **/\r | |
1003 | typedef union {\r | |
1004 | ///\r | |
1005 | /// Individual bit fields\r | |
1006 | ///\r | |
1007 | struct {\r | |
1008 | ///\r | |
1009 | /// [Bit 0] Enable/Disable Last Branch Records.\r | |
1010 | ///\r | |
2f88bd3a | 1011 | UINT32 LBR : 1;\r |
8e6bff88 MK |
1012 | ///\r |
1013 | /// [Bit 1] Branch Trap Flag.\r | |
1014 | ///\r | |
2f88bd3a | 1015 | UINT32 BTF : 1;\r |
8e6bff88 MK |
1016 | ///\r |
1017 | /// [Bit 2] Performance Monitoring/Break Point Pins.\r | |
1018 | ///\r | |
2f88bd3a | 1019 | UINT32 PB0 : 1;\r |
8e6bff88 MK |
1020 | ///\r |
1021 | /// [Bit 3] Performance Monitoring/Break Point Pins.\r | |
1022 | ///\r | |
2f88bd3a | 1023 | UINT32 PB1 : 1;\r |
8e6bff88 MK |
1024 | ///\r |
1025 | /// [Bit 4] Performance Monitoring/Break Point Pins.\r | |
1026 | ///\r | |
2f88bd3a | 1027 | UINT32 PB2 : 1;\r |
8e6bff88 MK |
1028 | ///\r |
1029 | /// [Bit 5] Performance Monitoring/Break Point Pins.\r | |
1030 | ///\r | |
2f88bd3a | 1031 | UINT32 PB3 : 1;\r |
8e6bff88 MK |
1032 | ///\r |
1033 | /// [Bit 6] Enable/Disable Execution Trace Messages.\r | |
1034 | ///\r | |
2f88bd3a MK |
1035 | UINT32 TR : 1;\r |
1036 | UINT32 Reserved1 : 25;\r | |
1037 | UINT32 Reserved2 : 32;\r | |
8e6bff88 MK |
1038 | } Bits;\r |
1039 | ///\r | |
1040 | /// All bit fields as a 32-bit value\r | |
1041 | ///\r | |
2f88bd3a | 1042 | UINT32 Uint32;\r |
8e6bff88 MK |
1043 | ///\r |
1044 | /// All bit fields as a 64-bit value\r | |
1045 | ///\r | |
2f88bd3a | 1046 | UINT64 Uint64;\r |
8e6bff88 MK |
1047 | } MSR_P6_DEBUGCTLMSR_REGISTER;\r |
1048 | \r | |
8e6bff88 MK |
1049 | /**\r |
1050 | \r | |
1051 | \r | |
1052 | @param ECX MSR_P6_LASTBRANCHFROMIP (0x000001DB)\r | |
1053 | @param EAX Lower 32-bits of MSR value.\r | |
1054 | @param EDX Upper 32-bits of MSR value.\r | |
1055 | \r | |
1056 | <b>Example usage</b>\r | |
1057 | @code\r | |
1058 | UINT64 Msr;\r | |
1059 | \r | |
1060 | Msr = AsmReadMsr64 (MSR_P6_LASTBRANCHFROMIP);\r | |
1061 | AsmWriteMsr64 (MSR_P6_LASTBRANCHFROMIP, Msr);\r | |
1062 | @endcode\r | |
91e3003c | 1063 | @note MSR_P6_LASTBRANCHFROMIP is defined as LASTBRANCHFROMIP in SDM.\r |
8e6bff88 | 1064 | **/\r |
2f88bd3a | 1065 | #define MSR_P6_LASTBRANCHFROMIP 0x000001DB\r |
8e6bff88 MK |
1066 | \r |
1067 | /**\r | |
1068 | \r | |
1069 | \r | |
1070 | @param ECX MSR_P6_LASTBRANCHTOIP (0x000001DC)\r | |
1071 | @param EAX Lower 32-bits of MSR value.\r | |
1072 | @param EDX Upper 32-bits of MSR value.\r | |
1073 | \r | |
1074 | <b>Example usage</b>\r | |
1075 | @code\r | |
1076 | UINT64 Msr;\r | |
1077 | \r | |
1078 | Msr = AsmReadMsr64 (MSR_P6_LASTBRANCHTOIP);\r | |
1079 | AsmWriteMsr64 (MSR_P6_LASTBRANCHTOIP, Msr);\r | |
1080 | @endcode\r | |
91e3003c | 1081 | @note MSR_P6_LASTBRANCHTOIP is defined as LASTBRANCHTOIP in SDM.\r |
8e6bff88 | 1082 | **/\r |
2f88bd3a | 1083 | #define MSR_P6_LASTBRANCHTOIP 0x000001DC\r |
8e6bff88 MK |
1084 | \r |
1085 | /**\r | |
1086 | \r | |
1087 | \r | |
1088 | @param ECX MSR_P6_LASTINTFROMIP (0x000001DD)\r | |
1089 | @param EAX Lower 32-bits of MSR value.\r | |
1090 | @param EDX Upper 32-bits of MSR value.\r | |
1091 | \r | |
1092 | <b>Example usage</b>\r | |
1093 | @code\r | |
1094 | UINT64 Msr;\r | |
1095 | \r | |
1096 | Msr = AsmReadMsr64 (MSR_P6_LASTINTFROMIP);\r | |
1097 | AsmWriteMsr64 (MSR_P6_LASTINTFROMIP, Msr);\r | |
1098 | @endcode\r | |
91e3003c | 1099 | @note MSR_P6_LASTINTFROMIP is defined as LASTINTFROMIP in SDM.\r |
8e6bff88 | 1100 | **/\r |
2f88bd3a | 1101 | #define MSR_P6_LASTINTFROMIP 0x000001DD\r |
8e6bff88 MK |
1102 | \r |
1103 | /**\r | |
1104 | \r | |
1105 | \r | |
1106 | @param ECX MSR_P6_LASTINTTOIP (0x000001DE)\r | |
1107 | @param EAX Lower 32-bits of MSR value.\r | |
1108 | @param EDX Upper 32-bits of MSR value.\r | |
1109 | \r | |
1110 | <b>Example usage</b>\r | |
1111 | @code\r | |
1112 | UINT64 Msr;\r | |
1113 | \r | |
1114 | Msr = AsmReadMsr64 (MSR_P6_LASTINTTOIP);\r | |
1115 | AsmWriteMsr64 (MSR_P6_LASTINTTOIP, Msr);\r | |
1116 | @endcode\r | |
91e3003c | 1117 | @note MSR_P6_LASTINTTOIP is defined as LASTINTTOIP in SDM.\r |
8e6bff88 | 1118 | **/\r |
2f88bd3a | 1119 | #define MSR_P6_LASTINTTOIP 0x000001DE\r |
8e6bff88 | 1120 | \r |
8e6bff88 MK |
1121 | /**\r |
1122 | \r | |
1123 | \r | |
1124 | @param ECX MSR_P6_MTRRPHYSBASEn\r | |
1125 | @param EAX Lower 32-bits of MSR value.\r | |
1126 | @param EDX Upper 32-bits of MSR value.\r | |
1127 | \r | |
1128 | <b>Example usage</b>\r | |
1129 | @code\r | |
1130 | UINT64 Msr;\r | |
1131 | \r | |
1132 | Msr = AsmReadMsr64 (MSR_P6_MTRRPHYSBASE0);\r | |
1133 | AsmWriteMsr64 (MSR_P6_MTRRPHYSBASE0, Msr);\r | |
1134 | @endcode\r | |
91e3003c JF |
1135 | @note MSR_P6_MTRRPHYSBASE0 is defined as MTRRPHYSBASE0 in SDM.\r |
1136 | MSR_P6_MTRRPHYSBASE1 is defined as MTRRPHYSBASE1 in SDM.\r | |
1137 | MSR_P6_MTRRPHYSBASE2 is defined as MTRRPHYSBASE2 in SDM.\r | |
1138 | MSR_P6_MTRRPHYSBASE3 is defined as MTRRPHYSBASE3 in SDM.\r | |
1139 | MSR_P6_MTRRPHYSBASE4 is defined as MTRRPHYSBASE4 in SDM.\r | |
1140 | MSR_P6_MTRRPHYSBASE5 is defined as MTRRPHYSBASE5 in SDM.\r | |
1141 | MSR_P6_MTRRPHYSBASE6 is defined as MTRRPHYSBASE6 in SDM.\r | |
1142 | MSR_P6_MTRRPHYSBASE7 is defined as MTRRPHYSBASE7 in SDM.\r | |
8e6bff88 MK |
1143 | @{\r |
1144 | **/\r | |
2f88bd3a MK |
1145 | #define MSR_P6_MTRRPHYSBASE0 0x00000200\r |
1146 | #define MSR_P6_MTRRPHYSBASE1 0x00000202\r | |
1147 | #define MSR_P6_MTRRPHYSBASE2 0x00000204\r | |
1148 | #define MSR_P6_MTRRPHYSBASE3 0x00000206\r | |
1149 | #define MSR_P6_MTRRPHYSBASE4 0x00000208\r | |
1150 | #define MSR_P6_MTRRPHYSBASE5 0x0000020A\r | |
1151 | #define MSR_P6_MTRRPHYSBASE6 0x0000020C\r | |
1152 | #define MSR_P6_MTRRPHYSBASE7 0x0000020E\r | |
8e6bff88 MK |
1153 | /// @}\r |
1154 | \r | |
8e6bff88 MK |
1155 | /**\r |
1156 | \r | |
1157 | \r | |
1158 | @param ECX MSR_P6_MTRRPHYSMASKn\r | |
1159 | @param EAX Lower 32-bits of MSR value.\r | |
1160 | @param EDX Upper 32-bits of MSR value.\r | |
1161 | \r | |
1162 | <b>Example usage</b>\r | |
1163 | @code\r | |
1164 | UINT64 Msr;\r | |
1165 | \r | |
1166 | Msr = AsmReadMsr64 (MSR_P6_MTRRPHYSMASK0);\r | |
1167 | AsmWriteMsr64 (MSR_P6_MTRRPHYSMASK0, Msr);\r | |
1168 | @endcode\r | |
91e3003c JF |
1169 | @note MSR_P6_MTRRPHYSMASK0 is defined as MTRRPHYSMASK0 in SDM.\r |
1170 | MSR_P6_MTRRPHYSMASK1 is defined as MTRRPHYSMASK1 in SDM.\r | |
1171 | MSR_P6_MTRRPHYSMASK2 is defined as MTRRPHYSMASK2 in SDM.\r | |
1172 | MSR_P6_MTRRPHYSMASK3 is defined as MTRRPHYSMASK3 in SDM.\r | |
1173 | MSR_P6_MTRRPHYSMASK4 is defined as MTRRPHYSMASK4 in SDM.\r | |
1174 | MSR_P6_MTRRPHYSMASK5 is defined as MTRRPHYSMASK5 in SDM.\r | |
1175 | MSR_P6_MTRRPHYSMASK6 is defined as MTRRPHYSMASK6 in SDM.\r | |
1176 | MSR_P6_MTRRPHYSMASK7 is defined as MTRRPHYSMASK7 in SDM.\r | |
8e6bff88 MK |
1177 | @{\r |
1178 | **/\r | |
2f88bd3a MK |
1179 | #define MSR_P6_MTRRPHYSMASK0 0x00000201\r |
1180 | #define MSR_P6_MTRRPHYSMASK1 0x00000203\r | |
1181 | #define MSR_P6_MTRRPHYSMASK2 0x00000205\r | |
1182 | #define MSR_P6_MTRRPHYSMASK3 0x00000207\r | |
1183 | #define MSR_P6_MTRRPHYSMASK4 0x00000209\r | |
1184 | #define MSR_P6_MTRRPHYSMASK5 0x0000020B\r | |
1185 | #define MSR_P6_MTRRPHYSMASK6 0x0000020D\r | |
1186 | #define MSR_P6_MTRRPHYSMASK7 0x0000020F\r | |
8e6bff88 MK |
1187 | /// @}\r |
1188 | \r | |
8e6bff88 MK |
1189 | /**\r |
1190 | \r | |
1191 | \r | |
1192 | @param ECX MSR_P6_MTRRFIX64K_00000 (0x00000250)\r | |
1193 | @param EAX Lower 32-bits of MSR value.\r | |
1194 | @param EDX Upper 32-bits of MSR value.\r | |
1195 | \r | |
1196 | <b>Example usage</b>\r | |
1197 | @code\r | |
1198 | UINT64 Msr;\r | |
1199 | \r | |
1200 | Msr = AsmReadMsr64 (MSR_P6_MTRRFIX64K_00000);\r | |
1201 | AsmWriteMsr64 (MSR_P6_MTRRFIX64K_00000, Msr);\r | |
1202 | @endcode\r | |
91e3003c | 1203 | @note MSR_P6_MTRRFIX64K_00000 is defined as MTRRFIX64K_00000 in SDM.\r |
8e6bff88 | 1204 | **/\r |
2f88bd3a | 1205 | #define MSR_P6_MTRRFIX64K_00000 0x00000250\r |
8e6bff88 MK |
1206 | \r |
1207 | /**\r | |
1208 | \r | |
1209 | \r | |
1210 | @param ECX MSR_P6_MTRRFIX16K_80000 (0x00000258)\r | |
1211 | @param EAX Lower 32-bits of MSR value.\r | |
1212 | @param EDX Upper 32-bits of MSR value.\r | |
1213 | \r | |
1214 | <b>Example usage</b>\r | |
1215 | @code\r | |
1216 | UINT64 Msr;\r | |
1217 | \r | |
1218 | Msr = AsmReadMsr64 (MSR_P6_MTRRFIX16K_80000);\r | |
1219 | AsmWriteMsr64 (MSR_P6_MTRRFIX16K_80000, Msr);\r | |
1220 | @endcode\r | |
91e3003c | 1221 | @note MSR_P6_MTRRFIX16K_80000 is defined as MTRRFIX16K_80000 in SDM.\r |
8e6bff88 | 1222 | **/\r |
2f88bd3a | 1223 | #define MSR_P6_MTRRFIX16K_80000 0x00000258\r |
8e6bff88 MK |
1224 | \r |
1225 | /**\r | |
1226 | \r | |
1227 | \r | |
1228 | @param ECX MSR_P6_MTRRFIX16K_A0000 (0x00000259)\r | |
1229 | @param EAX Lower 32-bits of MSR value.\r | |
1230 | @param EDX Upper 32-bits of MSR value.\r | |
1231 | \r | |
1232 | <b>Example usage</b>\r | |
1233 | @code\r | |
1234 | UINT64 Msr;\r | |
1235 | \r | |
1236 | Msr = AsmReadMsr64 (MSR_P6_MTRRFIX16K_A0000);\r | |
1237 | AsmWriteMsr64 (MSR_P6_MTRRFIX16K_A0000, Msr);\r | |
1238 | @endcode\r | |
91e3003c | 1239 | @note MSR_P6_MTRRFIX16K_A0000 is defined as MTRRFIX16K_A0000 in SDM.\r |
8e6bff88 | 1240 | **/\r |
2f88bd3a | 1241 | #define MSR_P6_MTRRFIX16K_A0000 0x00000259\r |
8e6bff88 MK |
1242 | \r |
1243 | /**\r | |
1244 | \r | |
1245 | \r | |
1246 | @param ECX MSR_P6_MTRRFIX4K_C0000 (0x00000268)\r | |
1247 | @param EAX Lower 32-bits of MSR value.\r | |
1248 | @param EDX Upper 32-bits of MSR value.\r | |
1249 | \r | |
1250 | <b>Example usage</b>\r | |
1251 | @code\r | |
1252 | UINT64 Msr;\r | |
1253 | \r | |
1254 | Msr = AsmReadMsr64 (MSR_P6_MTRRFIX4K_C0000);\r | |
1255 | AsmWriteMsr64 (MSR_P6_MTRRFIX4K_C0000, Msr);\r | |
1256 | @endcode\r | |
91e3003c | 1257 | @note MSR_P6_MTRRFIX4K_C0000 is defined as MTRRFIX4K_C0000 in SDM.\r |
8e6bff88 | 1258 | **/\r |
2f88bd3a | 1259 | #define MSR_P6_MTRRFIX4K_C0000 0x00000268\r |
8e6bff88 MK |
1260 | \r |
1261 | /**\r | |
1262 | \r | |
1263 | \r | |
1264 | @param ECX MSR_P6_MTRRFIX4K_C8000 (0x00000269)\r | |
1265 | @param EAX Lower 32-bits of MSR value.\r | |
1266 | @param EDX Upper 32-bits of MSR value.\r | |
1267 | \r | |
1268 | <b>Example usage</b>\r | |
1269 | @code\r | |
1270 | UINT64 Msr;\r | |
1271 | \r | |
1272 | Msr = AsmReadMsr64 (MSR_P6_MTRRFIX4K_C8000);\r | |
1273 | AsmWriteMsr64 (MSR_P6_MTRRFIX4K_C8000, Msr);\r | |
1274 | @endcode\r | |
91e3003c | 1275 | @note MSR_P6_MTRRFIX4K_C8000 is defined as MTRRFIX4K_C8000 in SDM.\r |
8e6bff88 | 1276 | **/\r |
2f88bd3a | 1277 | #define MSR_P6_MTRRFIX4K_C8000 0x00000269\r |
8e6bff88 MK |
1278 | \r |
1279 | /**\r | |
1280 | \r | |
1281 | \r | |
1282 | @param ECX MSR_P6_MTRRFIX4K_D0000 (0x0000026A)\r | |
1283 | @param EAX Lower 32-bits of MSR value.\r | |
1284 | @param EDX Upper 32-bits of MSR value.\r | |
1285 | \r | |
1286 | <b>Example usage</b>\r | |
1287 | @code\r | |
1288 | UINT64 Msr;\r | |
1289 | \r | |
1290 | Msr = AsmReadMsr64 (MSR_P6_MTRRFIX4K_D0000);\r | |
1291 | AsmWriteMsr64 (MSR_P6_MTRRFIX4K_D0000, Msr);\r | |
1292 | @endcode\r | |
91e3003c | 1293 | @note MSR_P6_MTRRFIX4K_D0000 is defined as MTRRFIX4K_D0000 in SDM.\r |
8e6bff88 | 1294 | **/\r |
2f88bd3a | 1295 | #define MSR_P6_MTRRFIX4K_D0000 0x0000026A\r |
8e6bff88 MK |
1296 | \r |
1297 | /**\r | |
1298 | \r | |
1299 | \r | |
1300 | @param ECX MSR_P6_MTRRFIX4K_D8000 (0x0000026B)\r | |
1301 | @param EAX Lower 32-bits of MSR value.\r | |
1302 | @param EDX Upper 32-bits of MSR value.\r | |
1303 | \r | |
1304 | <b>Example usage</b>\r | |
1305 | @code\r | |
1306 | UINT64 Msr;\r | |
1307 | \r | |
1308 | Msr = AsmReadMsr64 (MSR_P6_MTRRFIX4K_D8000);\r | |
1309 | AsmWriteMsr64 (MSR_P6_MTRRFIX4K_D8000, Msr);\r | |
1310 | @endcode\r | |
91e3003c | 1311 | @note MSR_P6_MTRRFIX4K_D8000 is defined as MTRRFIX4K_D8000 in SDM.\r |
8e6bff88 | 1312 | **/\r |
2f88bd3a | 1313 | #define MSR_P6_MTRRFIX4K_D8000 0x0000026B\r |
8e6bff88 MK |
1314 | \r |
1315 | /**\r | |
1316 | \r | |
1317 | \r | |
1318 | @param ECX MSR_P6_MTRRFIX4K_E0000 (0x0000026C)\r | |
1319 | @param EAX Lower 32-bits of MSR value.\r | |
1320 | @param EDX Upper 32-bits of MSR value.\r | |
1321 | \r | |
1322 | <b>Example usage</b>\r | |
1323 | @code\r | |
1324 | UINT64 Msr;\r | |
1325 | \r | |
1326 | Msr = AsmReadMsr64 (MSR_P6_MTRRFIX4K_E0000);\r | |
1327 | AsmWriteMsr64 (MSR_P6_MTRRFIX4K_E0000, Msr);\r | |
1328 | @endcode\r | |
91e3003c | 1329 | @note MSR_P6_MTRRFIX4K_E0000 is defined as MTRRFIX4K_E0000 in SDM.\r |
8e6bff88 | 1330 | **/\r |
2f88bd3a | 1331 | #define MSR_P6_MTRRFIX4K_E0000 0x0000026C\r |
8e6bff88 MK |
1332 | \r |
1333 | /**\r | |
1334 | \r | |
1335 | \r | |
1336 | @param ECX MSR_P6_MTRRFIX4K_E8000 (0x0000026D)\r | |
1337 | @param EAX Lower 32-bits of MSR value.\r | |
1338 | @param EDX Upper 32-bits of MSR value.\r | |
1339 | \r | |
1340 | <b>Example usage</b>\r | |
1341 | @code\r | |
1342 | UINT64 Msr;\r | |
1343 | \r | |
1344 | Msr = AsmReadMsr64 (MSR_P6_MTRRFIX4K_E8000);\r | |
1345 | AsmWriteMsr64 (MSR_P6_MTRRFIX4K_E8000, Msr);\r | |
1346 | @endcode\r | |
91e3003c | 1347 | @note MSR_P6_MTRRFIX4K_E8000 is defined as MTRRFIX4K_E8000 in SDM.\r |
8e6bff88 | 1348 | **/\r |
2f88bd3a | 1349 | #define MSR_P6_MTRRFIX4K_E8000 0x0000026D\r |
8e6bff88 MK |
1350 | \r |
1351 | /**\r | |
1352 | \r | |
1353 | \r | |
1354 | @param ECX MSR_P6_MTRRFIX4K_F0000 (0x0000026E)\r | |
1355 | @param EAX Lower 32-bits of MSR value.\r | |
1356 | @param EDX Upper 32-bits of MSR value.\r | |
1357 | \r | |
1358 | <b>Example usage</b>\r | |
1359 | @code\r | |
1360 | UINT64 Msr;\r | |
1361 | \r | |
1362 | Msr = AsmReadMsr64 (MSR_P6_MTRRFIX4K_F0000);\r | |
1363 | AsmWriteMsr64 (MSR_P6_MTRRFIX4K_F0000, Msr);\r | |
1364 | @endcode\r | |
91e3003c | 1365 | @note MSR_P6_MTRRFIX4K_F0000 is defined as MTRRFIX4K_F0000 in SDM.\r |
8e6bff88 | 1366 | **/\r |
2f88bd3a | 1367 | #define MSR_P6_MTRRFIX4K_F0000 0x0000026E\r |
8e6bff88 MK |
1368 | \r |
1369 | /**\r | |
1370 | \r | |
1371 | \r | |
1372 | @param ECX MSR_P6_MTRRFIX4K_F8000 (0x0000026F)\r | |
1373 | @param EAX Lower 32-bits of MSR value.\r | |
1374 | @param EDX Upper 32-bits of MSR value.\r | |
1375 | \r | |
1376 | <b>Example usage</b>\r | |
1377 | @code\r | |
1378 | UINT64 Msr;\r | |
1379 | \r | |
1380 | Msr = AsmReadMsr64 (MSR_P6_MTRRFIX4K_F8000);\r | |
1381 | AsmWriteMsr64 (MSR_P6_MTRRFIX4K_F8000, Msr);\r | |
1382 | @endcode\r | |
91e3003c | 1383 | @note MSR_P6_MTRRFIX4K_F8000 is defined as MTRRFIX4K_F8000 in SDM.\r |
8e6bff88 | 1384 | **/\r |
2f88bd3a | 1385 | #define MSR_P6_MTRRFIX4K_F8000 0x0000026F\r |
8e6bff88 MK |
1386 | \r |
1387 | /**\r | |
1388 | \r | |
1389 | \r | |
1390 | @param ECX MSR_P6_MTRRDEFTYPE (0x000002FF)\r | |
1391 | @param EAX Lower 32-bits of MSR value.\r | |
1392 | Described by the type MSR_P6_MTRRDEFTYPE_REGISTER.\r | |
1393 | @param EDX Upper 32-bits of MSR value.\r | |
1394 | Described by the type MSR_P6_MTRRDEFTYPE_REGISTER.\r | |
1395 | \r | |
1396 | <b>Example usage</b>\r | |
1397 | @code\r | |
1398 | MSR_P6_MTRRDEFTYPE_REGISTER Msr;\r | |
1399 | \r | |
1400 | Msr.Uint64 = AsmReadMsr64 (MSR_P6_MTRRDEFTYPE);\r | |
1401 | AsmWriteMsr64 (MSR_P6_MTRRDEFTYPE, Msr.Uint64);\r | |
1402 | @endcode\r | |
91e3003c | 1403 | @note MSR_P6_MTRRDEFTYPE is defined as MTRRDEFTYPE in SDM.\r |
8e6bff88 | 1404 | **/\r |
2f88bd3a | 1405 | #define MSR_P6_MTRRDEFTYPE 0x000002FF\r |
8e6bff88 MK |
1406 | \r |
1407 | /**\r | |
1408 | MSR information returned for MSR index #MSR_P6_MTRRDEFTYPE\r | |
1409 | **/\r | |
1410 | typedef union {\r | |
1411 | ///\r | |
1412 | /// Individual bit fields\r | |
1413 | ///\r | |
1414 | struct {\r | |
1415 | ///\r | |
1416 | /// [Bits 2:0] Default memory type.\r | |
1417 | ///\r | |
2f88bd3a MK |
1418 | UINT32 Type : 3;\r |
1419 | UINT32 Reserved1 : 7;\r | |
8e6bff88 MK |
1420 | ///\r |
1421 | /// [Bit 10] Fixed MTRR enable.\r | |
1422 | ///\r | |
2f88bd3a | 1423 | UINT32 FE : 1;\r |
8e6bff88 MK |
1424 | ///\r |
1425 | /// [Bit 11] MTRR Enable.\r | |
1426 | ///\r | |
2f88bd3a MK |
1427 | UINT32 E : 1;\r |
1428 | UINT32 Reserved2 : 20;\r | |
1429 | UINT32 Reserved3 : 32;\r | |
8e6bff88 MK |
1430 | } Bits;\r |
1431 | ///\r | |
1432 | /// All bit fields as a 32-bit value\r | |
1433 | ///\r | |
2f88bd3a | 1434 | UINT32 Uint32;\r |
8e6bff88 MK |
1435 | ///\r |
1436 | /// All bit fields as a 64-bit value\r | |
1437 | ///\r | |
2f88bd3a | 1438 | UINT64 Uint64;\r |
8e6bff88 MK |
1439 | } MSR_P6_MTRRDEFTYPE_REGISTER;\r |
1440 | \r | |
8e6bff88 MK |
1441 | /**\r |
1442 | \r | |
1443 | \r | |
1444 | @param ECX MSR_P6_MC0_CTL (0x00000400)\r | |
1445 | @param EAX Lower 32-bits of MSR value.\r | |
1446 | @param EDX Upper 32-bits of MSR value.\r | |
1447 | \r | |
1448 | <b>Example usage</b>\r | |
1449 | @code\r | |
1450 | UINT64 Msr;\r | |
1451 | \r | |
1452 | Msr = AsmReadMsr64 (MSR_P6_MC0_CTL);\r | |
1453 | AsmWriteMsr64 (MSR_P6_MC0_CTL, Msr);\r | |
1454 | @endcode\r | |
91e3003c JF |
1455 | @note MSR_P6_MC0_CTL is defined as MC0_CTL in SDM.\r |
1456 | MSR_P6_MC1_CTL is defined as MC1_CTL in SDM.\r | |
1457 | MSR_P6_MC2_CTL is defined as MC2_CTL in SDM.\r | |
1458 | MSR_P6_MC3_CTL is defined as MC3_CTL in SDM.\r | |
1459 | MSR_P6_MC4_CTL is defined as MC4_CTL in SDM.\r | |
8e6bff88 MK |
1460 | @{\r |
1461 | **/\r | |
2f88bd3a MK |
1462 | #define MSR_P6_MC0_CTL 0x00000400\r |
1463 | #define MSR_P6_MC1_CTL 0x00000404\r | |
1464 | #define MSR_P6_MC2_CTL 0x00000408\r | |
1465 | #define MSR_P6_MC3_CTL 0x00000410\r | |
1466 | #define MSR_P6_MC4_CTL 0x0000040C\r | |
8e6bff88 MK |
1467 | /// @}\r |
1468 | \r | |
8e6bff88 MK |
1469 | /**\r |
1470 | \r | |
1471 | Bit definitions for MSR_P6_MC4_STATUS are the same as MSR_P6_MC0_STATUS,\r | |
1472 | except bits 0, 4, 57, and 61 are hardcoded to 1.\r | |
1473 | \r | |
1474 | @param ECX MSR_P6_MCn_STATUS\r | |
1475 | @param EAX Lower 32-bits of MSR value.\r | |
1476 | Described by the type MSR_P6_MC_STATUS_REGISTER.\r | |
1477 | @param EDX Upper 32-bits of MSR value.\r | |
1478 | Described by the type MSR_P6_MC_STATUS_REGISTER.\r | |
1479 | \r | |
1480 | <b>Example usage</b>\r | |
1481 | @code\r | |
1482 | MSR_P6_MC_STATUS_REGISTER Msr;\r | |
1483 | \r | |
1484 | Msr.Uint64 = AsmReadMsr64 (MSR_P6_MC0_STATUS);\r | |
1485 | AsmWriteMsr64 (MSR_P6_MC0_STATUS, Msr.Uint64);\r | |
1486 | @endcode\r | |
91e3003c JF |
1487 | @note MSR_P6_MC0_STATUS is defined as MC0_STATUS in SDM.\r |
1488 | MSR_P6_MC1_STATUS is defined as MC1_STATUS in SDM.\r | |
1489 | MSR_P6_MC2_STATUS is defined as MC2_STATUS in SDM.\r | |
1490 | MSR_P6_MC3_STATUS is defined as MC3_STATUS in SDM.\r | |
1491 | MSR_P6_MC4_STATUS is defined as MC4_STATUS in SDM.\r | |
8e6bff88 MK |
1492 | @{\r |
1493 | **/\r | |
2f88bd3a MK |
1494 | #define MSR_P6_MC0_STATUS 0x00000401\r |
1495 | #define MSR_P6_MC1_STATUS 0x00000405\r | |
1496 | #define MSR_P6_MC2_STATUS 0x00000409\r | |
1497 | #define MSR_P6_MC3_STATUS 0x00000411\r | |
1498 | #define MSR_P6_MC4_STATUS 0x0000040D\r | |
8e6bff88 MK |
1499 | /// @}\r |
1500 | \r | |
1501 | /**\r | |
1502 | MSR information returned for MSR index #MSR_P6_MC0_STATUS to\r | |
1503 | #MSR_P6_MC4_STATUS\r | |
1504 | **/\r | |
1505 | typedef union {\r | |
1506 | ///\r | |
1507 | /// Individual bit fields\r | |
1508 | ///\r | |
1509 | struct {\r | |
1510 | ///\r | |
1511 | /// [Bits 15:0] MC_STATUS_MCACOD.\r | |
1512 | ///\r | |
2f88bd3a | 1513 | UINT32 MC_STATUS_MCACOD : 16;\r |
8e6bff88 MK |
1514 | ///\r |
1515 | /// [Bits 31:16] MC_STATUS_MSCOD.\r | |
1516 | ///\r | |
2f88bd3a MK |
1517 | UINT32 MC_STATUS_MSCOD : 16;\r |
1518 | UINT32 Reserved : 25;\r | |
8e6bff88 MK |
1519 | ///\r |
1520 | /// [Bit 57] MC_STATUS_DAM.\r | |
1521 | ///\r | |
2f88bd3a | 1522 | UINT32 MC_STATUS_DAM : 1;\r |
8e6bff88 MK |
1523 | ///\r |
1524 | /// [Bit 58] MC_STATUS_ADDRV.\r | |
1525 | ///\r | |
2f88bd3a | 1526 | UINT32 MC_STATUS_ADDRV : 1;\r |
8e6bff88 MK |
1527 | ///\r |
1528 | /// [Bit 59] MC_STATUS_MISCV.\r | |
1529 | ///\r | |
2f88bd3a | 1530 | UINT32 MC_STATUS_MISCV : 1;\r |
8e6bff88 MK |
1531 | ///\r |
1532 | /// [Bit 60] MC_STATUS_EN. (Note: For MC0_STATUS only, this bit is\r | |
1533 | /// hardcoded to 1.).\r | |
1534 | ///\r | |
2f88bd3a | 1535 | UINT32 MC_STATUS_EN : 1;\r |
8e6bff88 MK |
1536 | ///\r |
1537 | /// [Bit 61] MC_STATUS_UC.\r | |
1538 | ///\r | |
2f88bd3a | 1539 | UINT32 MC_STATUS_UC : 1;\r |
8e6bff88 MK |
1540 | ///\r |
1541 | /// [Bit 62] MC_STATUS_O.\r | |
1542 | ///\r | |
2f88bd3a | 1543 | UINT32 MC_STATUS_O : 1;\r |
8e6bff88 MK |
1544 | ///\r |
1545 | /// [Bit 63] MC_STATUS_V.\r | |
1546 | ///\r | |
2f88bd3a | 1547 | UINT32 MC_STATUS_V : 1;\r |
8e6bff88 MK |
1548 | } Bits;\r |
1549 | ///\r | |
1550 | /// All bit fields as a 64-bit value\r | |
1551 | ///\r | |
2f88bd3a | 1552 | UINT64 Uint64;\r |
8e6bff88 MK |
1553 | } MSR_P6_MC_STATUS_REGISTER;\r |
1554 | \r | |
8e6bff88 MK |
1555 | /**\r |
1556 | \r | |
1557 | MSR_P6_MC4_ADDR is defined in MCA architecture but not implemented in P6 Family processors.\r | |
1558 | \r | |
1559 | @param ECX MSR_P6_MC0_ADDR (0x00000402)\r | |
1560 | @param EAX Lower 32-bits of MSR value.\r | |
1561 | @param EDX Upper 32-bits of MSR value.\r | |
1562 | \r | |
1563 | <b>Example usage</b>\r | |
1564 | @code\r | |
1565 | UINT64 Msr;\r | |
1566 | \r | |
1567 | Msr = AsmReadMsr64 (MSR_P6_MC0_ADDR);\r | |
1568 | AsmWriteMsr64 (MSR_P6_MC0_ADDR, Msr);\r | |
1569 | @endcode\r | |
91e3003c JF |
1570 | @note MSR_P6_MC0_ADDR is defined as MC0_ADDR in SDM.\r |
1571 | MSR_P6_MC1_ADDR is defined as MC1_ADDR in SDM.\r | |
1572 | MSR_P6_MC2_ADDR is defined as MC2_ADDR in SDM.\r | |
1573 | MSR_P6_MC3_ADDR is defined as MC3_ADDR in SDM.\r | |
1574 | MSR_P6_MC4_ADDR is defined as MC4_ADDR in SDM.\r | |
8e6bff88 MK |
1575 | @{\r |
1576 | **/\r | |
2f88bd3a MK |
1577 | #define MSR_P6_MC0_ADDR 0x00000402\r |
1578 | #define MSR_P6_MC1_ADDR 0x00000406\r | |
1579 | #define MSR_P6_MC2_ADDR 0x0000040A\r | |
1580 | #define MSR_P6_MC3_ADDR 0x00000412\r | |
1581 | #define MSR_P6_MC4_ADDR 0x0000040E\r | |
8e6bff88 MK |
1582 | /// @}\r |
1583 | \r | |
8e6bff88 MK |
1584 | /**\r |
1585 | Defined in MCA architecture but not implemented in the P6 family processors.\r | |
1586 | \r | |
1587 | @param ECX MSR_P6_MC0_MISC (0x00000403)\r | |
1588 | @param EAX Lower 32-bits of MSR value.\r | |
1589 | @param EDX Upper 32-bits of MSR value.\r | |
1590 | \r | |
1591 | <b>Example usage</b>\r | |
1592 | @code\r | |
1593 | UINT64 Msr;\r | |
1594 | \r | |
1595 | Msr = AsmReadMsr64 (MSR_P6_MC0_MISC);\r | |
1596 | AsmWriteMsr64 (MSR_P6_MC0_MISC, Msr);\r | |
1597 | @endcode\r | |
91e3003c JF |
1598 | @note MSR_P6_MC0_MISC is defined as MC0_MISC in SDM.\r |
1599 | MSR_P6_MC1_MISC is defined as MC1_MISC in SDM.\r | |
1600 | MSR_P6_MC2_MISC is defined as MC2_MISC in SDM.\r | |
1601 | MSR_P6_MC3_MISC is defined as MC3_MISC in SDM.\r | |
1602 | MSR_P6_MC4_MISC is defined as MC4_MISC in SDM.\r | |
8e6bff88 MK |
1603 | @{\r |
1604 | **/\r | |
2f88bd3a MK |
1605 | #define MSR_P6_MC0_MISC 0x00000403\r |
1606 | #define MSR_P6_MC1_MISC 0x00000407\r | |
1607 | #define MSR_P6_MC2_MISC 0x0000040B\r | |
1608 | #define MSR_P6_MC3_MISC 0x00000413\r | |
1609 | #define MSR_P6_MC4_MISC 0x0000040F\r | |
8e6bff88 MK |
1610 | /// @}\r |
1611 | \r | |
1612 | #endif\r |