]>
Commit | Line | Data |
---|---|---|
28a7ddf0 | 1 | /** @file\r |
57d16ba1 | 2 | CPUID leaf definitions.\r |
28a7ddf0 | 3 | \r |
57d16ba1 MK |
4 | Provides defines for CPUID leaf indexes. Data structures are provided for\r |
5 | registers returned by a CPUID leaf that contain one or more bit fields.\r | |
6 | If a register returned is a single 32-bit value, then a data structure is\r | |
7 | not provided for that register.\r | |
28a7ddf0 | 8 | \r |
516e3397 | 9 | Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.<BR>\r |
57d16ba1 MK |
10 | This program and the accompanying materials are licensed and made available under\r |
11 | the terms and conditions of the BSD License which accompanies this distribution.\r | |
12 | The full text of the license may be found at\r | |
13 | http://opensource.org/licenses/bsd-license.php\r | |
28a7ddf0 | 14 | \r |
57d16ba1 MK |
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 2A,\r | |
ee27f6ee | 20 | November 2018, CPUID instruction.\r |
28a7ddf0 MK |
21 | \r |
22 | **/\r | |
23 | \r | |
24 | #ifndef __CPUID_H__\r | |
25 | #define __CPUID_H__\r | |
26 | \r | |
57d16ba1 MK |
27 | /**\r |
28 | CPUID Signature Information\r | |
29 | \r | |
30 | @param EAX CPUID_SIGNATURE (0x00)\r | |
31 | \r | |
32 | @retval EAX Returns the highest value the CPUID instruction recognizes for\r | |
33 | returning basic processor information. The value is returned is\r | |
34 | processor specific.\r | |
35 | @retval EBX First 4 characters of a vendor identification string.\r | |
36 | @retval ECX Last 4 characters of a vendor identification string.\r | |
37 | @retval EDX Middle 4 characters of a vendor identification string.\r | |
38 | \r | |
39 | <b>Example usage</b>\r | |
40 | @code\r | |
41 | UINT32 Eax;\r | |
42 | UINT32 Ebx;\r | |
43 | UINT32 Ecx;\r | |
44 | UINT32 Edx;\r | |
45 | \r | |
46 | AsmCpuid (CPUID_SIGNATURE, &Eax, &Ebx, &Ecx, &Edx);\r | |
47 | @endcode\r | |
48 | **/\r | |
49 | #define CPUID_SIGNATURE 0x00\r | |
50 | \r | |
51 | ///\r | |
52 | /// @{ CPUID signature values returned by Intel processors\r | |
53 | ///\r | |
54 | #define CPUID_SIGNATURE_GENUINE_INTEL_EBX SIGNATURE_32 ('G', 'e', 'n', 'u')\r | |
55 | #define CPUID_SIGNATURE_GENUINE_INTEL_EDX SIGNATURE_32 ('i', 'n', 'e', 'I')\r | |
56 | #define CPUID_SIGNATURE_GENUINE_INTEL_ECX SIGNATURE_32 ('n', 't', 'e', 'l')\r | |
57 | ///\r | |
58 | /// @}\r | |
59 | ///\r | |
60 | \r | |
61 | \r | |
62 | /**\r | |
63 | CPUID Version Information\r | |
64 | \r | |
65 | @param EAX CPUID_VERSION_INFO (0x01)\r | |
66 | \r | |
67 | @retval EAX Returns Model, Family, Stepping Information described by the\r | |
68 | type CPUID_VERSION_INFO_EAX.\r | |
69 | @retval EBX Returns Brand, Cache Line Size, and Initial APIC ID described by\r | |
70 | the type CPUID_VERSION_INFO_EBX.\r | |
71 | @retval ECX CPU Feature Information described by the type\r | |
72 | CPUID_VERSION_INFO_ECX.\r | |
73 | @retval EDX CPU Feature Information described by the type\r | |
74 | CPUID_VERSION_INFO_EDX.\r | |
75 | \r | |
76 | <b>Example usage</b>\r | |
77 | @code\r | |
78 | CPUID_VERSION_INFO_EAX Eax;\r | |
79 | CPUID_VERSION_INFO_EBX Ebx;\r | |
80 | CPUID_VERSION_INFO_ECX Ecx;\r | |
81 | CPUID_VERSION_INFO_EDX Edx;\r | |
82 | \r | |
83 | AsmCpuid (CPUID_VERSION_INFO, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32);\r | |
84 | @endcode\r | |
85 | **/\r | |
86 | #define CPUID_VERSION_INFO 0x01\r | |
87 | \r | |
88 | /**\r | |
89 | CPUID Version Information returned in EAX for CPUID leaf\r | |
90 | #CPUID_VERSION_INFO.\r | |
91 | **/\r | |
92 | typedef union {\r | |
93 | ///\r | |
94 | /// Individual bit fields\r | |
95 | ///\r | |
96 | struct {\r | |
97 | UINT32 SteppingId:4; ///< [Bits 3:0] Stepping ID\r | |
98 | UINT32 Model:4; ///< [Bits 7:4] Model\r | |
99 | UINT32 FamilyId:4; ///< [Bits 11:8] Family\r | |
100 | UINT32 ProcessorType:2; ///< [Bits 13:12] Processor Type\r | |
101 | UINT32 Reserved1:2; ///< [Bits 15:14] Reserved\r | |
102 | UINT32 ExtendedModelId:4; ///< [Bits 19:16] Extended Model ID\r | |
103 | UINT32 ExtendedFamilyId:8; ///< [Bits 27:20] Extended Family ID\r | |
104 | UINT32 Reserved2:4; ///< Reserved\r | |
105 | } Bits;\r | |
106 | ///\r | |
107 | /// All bit fields as a 32-bit value\r | |
108 | ///\r | |
109 | UINT32 Uint32;\r | |
110 | } CPUID_VERSION_INFO_EAX;\r | |
111 | \r | |
112 | ///\r | |
113 | /// @{ Define value for bit field CPUID_VERSION_INFO_EAX.ProcessorType\r | |
114 | ///\r | |
115 | #define CPUID_VERSION_INFO_EAX_PROCESSOR_TYPE_ORIGINAL_OEM_PROCESSOR 0x00\r | |
116 | #define CPUID_VERSION_INFO_EAX_PROCESSOR_TYPE_INTEL_OVERDRIVE_PROCESSOR 0x01\r | |
117 | #define CPUID_VERSION_INFO_EAX_PROCESSOR_TYPE_DUAL_PROCESSOR 0x02\r | |
118 | ///\r | |
119 | /// @}\r | |
120 | ///\r | |
121 | \r | |
122 | /**\r | |
123 | CPUID Version Information returned in EBX for CPUID leaf\r | |
124 | #CPUID_VERSION_INFO.\r | |
125 | **/\r | |
126 | typedef union {\r | |
127 | ///\r | |
128 | /// Individual bit fields\r | |
129 | ///\r | |
130 | struct {\r | |
131 | ///\r | |
132 | /// [Bits 7:0] Provides an entry into a brand string table that contains\r | |
133 | /// brand strings for IA-32 processors.\r | |
134 | ///\r | |
135 | UINT32 BrandIndex:8;\r | |
136 | ///\r | |
137 | /// [Bits 15:8] Indicates the size of the cache line flushed by the CLFLUSH\r | |
138 | /// and CLFLUSHOPT instructions in 8-byte increments. This field was\r | |
139 | /// introduced in the Pentium 4 processor.\r | |
140 | ///\r | |
141 | UINT32 CacheLineSize:8;\r | |
142 | ///\r | |
143 | /// [Bits 23:16] Maximum number of addressable IDs for logical processors\r | |
144 | /// in this physical package.\r | |
145 | ///\r | |
146 | /// @note\r | |
147 | /// The nearest power-of-2 integer that is not smaller than EBX[23:16] is\r | |
148 | /// the number of unique initial APICIDs reserved for addressing different\r | |
149 | /// logical processors in a physical package. This field is only valid if\r | |
150 | /// CPUID.1.EDX.HTT[bit 28]= 1.\r | |
151 | ///\r | |
152 | UINT32 MaximumAddressableIdsForLogicalProcessors:8;\r | |
153 | ///\r | |
154 | /// [Bits 31:24] The 8-bit ID that is assigned to the local APIC on the\r | |
155 | /// processor during power up. This field was introduced in the Pentium 4\r | |
156 | /// processor.\r | |
157 | ///\r | |
158 | UINT32 InitialLocalApicId:8;\r | |
159 | } Bits;\r | |
160 | ///\r | |
161 | /// All bit fields as a 32-bit value\r | |
162 | ///\r | |
163 | UINT32 Uint32;\r | |
164 | } CPUID_VERSION_INFO_EBX;\r | |
165 | \r | |
166 | /**\r | |
167 | CPUID Version Information returned in ECX for CPUID leaf\r | |
168 | #CPUID_VERSION_INFO.\r | |
169 | **/\r | |
170 | typedef union {\r | |
171 | ///\r | |
172 | /// Individual bit fields\r | |
173 | ///\r | |
174 | struct {\r | |
175 | ///\r | |
176 | /// [Bit 0] Streaming SIMD Extensions 3 (SSE3). A value of 1 indicates the\r | |
177 | /// processor supports this technology\r | |
178 | ///\r | |
179 | UINT32 SSE3:1;\r | |
180 | ///\r | |
181 | /// [Bit 1] A value of 1 indicates the processor supports the PCLMULQDQ\r | |
182 | /// instruction. Carryless Multiplication\r | |
183 | ///\r | |
184 | UINT32 PCLMULQDQ:1;\r | |
185 | ///\r | |
186 | /// [Bit 2] 64-bit DS Area. A value of 1 indicates the processor supports\r | |
187 | /// DS area using 64-bit layout.\r | |
188 | ///\r | |
189 | UINT32 DTES64:1;\r | |
190 | ///\r | |
191 | /// [Bit 3] MONITOR/MWAIT. A value of 1 indicates the processor supports\r | |
192 | /// this feature.\r | |
193 | ///\r | |
194 | UINT32 MONITOR:1;\r | |
195 | ///\r | |
196 | /// [Bit 4] CPL Qualified Debug Store. A value of 1 indicates the processor\r | |
197 | /// supports the extensions to the Debug Store feature to allow for branch\r | |
198 | /// message storage qualified by CPL\r | |
199 | ///\r | |
200 | UINT32 DS_CPL:1;\r | |
201 | ///\r | |
202 | /// [Bit 5] Virtual Machine Extensions. A value of 1 indicates that the\r | |
203 | /// processor supports this technology.\r | |
204 | ///\r | |
205 | UINT32 VMX:1;\r | |
206 | ///\r | |
207 | /// [Bit 6] Safer Mode Extensions. A value of 1 indicates that the processor\r | |
208 | /// supports this technology\r | |
209 | ///\r | |
210 | UINT32 SMX:1;\r | |
211 | ///\r | |
212 | /// [Bit 7] Enhanced Intel SpeedStep(R) technology. A value of 1 indicates\r | |
213 | /// that the processor supports this technology\r | |
214 | ///\r | |
215 | UINT32 EIST:1;\r | |
216 | ///\r | |
217 | /// [Bit 8] Thermal Monitor 2. A value of 1 indicates whether the processor\r | |
218 | /// supports this technology\r | |
219 | ///\r | |
220 | UINT32 TM2:1;\r | |
221 | ///\r | |
222 | /// [Bit 9] A value of 1 indicates the presence of the Supplemental Streaming\r | |
223 | /// SIMD Extensions 3 (SSSE3). A value of 0 indicates the instruction\r | |
224 | /// extensions are not present in the processor.\r | |
225 | ///\r | |
226 | UINT32 SSSE3:1;\r | |
227 | ///\r | |
228 | /// [Bit 10] L1 Context ID. A value of 1 indicates the L1 data cache mode\r | |
229 | /// can be set to either adaptive mode or shared mode. A value of 0 indicates\r | |
230 | /// this feature is not supported. See definition of the IA32_MISC_ENABLE MSR\r | |
231 | /// Bit 24 (L1 Data Cache Context Mode) for details\r | |
232 | ///\r | |
233 | UINT32 CNXT_ID:1;\r | |
234 | ///\r | |
235 | /// [Bit 11] A value of 1 indicates the processor supports IA32_DEBUG_INTERFACE\r | |
236 | /// MSR for silicon debug\r | |
237 | ///\r | |
238 | UINT32 SDBG:1;\r | |
239 | ///\r | |
240 | /// [Bit 12] A value of 1 indicates the processor supports FMA (Fused Multiple\r | |
241 | /// Add) extensions using YMM state.\r | |
242 | ///\r | |
243 | UINT32 FMA:1;\r | |
244 | ///\r | |
245 | /// [Bit 13] CMPXCHG16B Available. A value of 1 indicates that the feature\r | |
246 | /// is available.\r | |
247 | ///\r | |
248 | UINT32 CMPXCHG16B:1;\r | |
249 | ///\r | |
250 | /// [Bit 14] xTPR Update Control. A value of 1 indicates that the processor\r | |
251 | /// supports changing IA32_MISC_ENABLE[Bit 23].\r | |
252 | ///\r | |
253 | UINT32 xTPR_Update_Control:1;\r | |
254 | ///\r | |
255 | /// [Bit 15] Perfmon and Debug Capability: A value of 1 indicates the\r | |
256 | /// processor supports the performance and debug feature indication MSR\r | |
257 | /// IA32_PERF_CAPABILITIES.\r | |
258 | ///\r | |
259 | UINT32 PDCM:1;\r | |
260 | UINT32 Reserved:1;\r | |
261 | ///\r | |
262 | /// [Bit 17] Process-context identifiers. A value of 1 indicates that the\r | |
263 | /// processor supports PCIDs and that software may set CR4.PCIDE to 1.\r | |
264 | ///\r | |
265 | UINT32 PCID:1;\r | |
266 | ///\r | |
267 | /// [Bit 18] A value of 1 indicates the processor supports the ability to\r | |
268 | /// prefetch data from a memory mapped device. Direct Cache Access.\r | |
269 | ///\r | |
270 | UINT32 DCA:1;\r | |
271 | ///\r | |
272 | /// [Bit 19] A value of 1 indicates that the processor supports SSE4.1.\r | |
273 | ///\r | |
274 | UINT32 SSE4_1:1;\r | |
275 | ///\r | |
276 | /// [Bit 20] A value of 1 indicates that the processor supports SSE4.2.\r | |
277 | ///\r | |
278 | UINT32 SSE4_2:1;\r | |
279 | ///\r | |
280 | /// [Bit 21] A value of 1 indicates that the processor supports x2APIC\r | |
281 | /// feature.\r | |
282 | ///\r | |
283 | UINT32 x2APIC:1;\r | |
284 | ///\r | |
285 | /// [Bit 22] A value of 1 indicates that the processor supports MOVBE\r | |
286 | /// instruction.\r | |
287 | ///\r | |
288 | UINT32 MOVBE:1;\r | |
289 | ///\r | |
290 | /// [Bit 23] A value of 1 indicates that the processor supports the POPCNT\r | |
291 | /// instruction.\r | |
292 | ///\r | |
293 | UINT32 POPCNT:1;\r | |
294 | ///\r | |
295 | /// [Bit 24] A value of 1 indicates that the processor's local APIC timer\r | |
296 | /// supports one-shot operation using a TSC deadline value.\r | |
297 | ///\r | |
298 | UINT32 TSC_Deadline:1;\r | |
299 | ///\r | |
300 | /// [Bit 25] A value of 1 indicates that the processor supports the AESNI\r | |
301 | /// instruction extensions.\r | |
302 | ///\r | |
303 | UINT32 AESNI:1;\r | |
304 | ///\r | |
305 | /// [Bit 26] A value of 1 indicates that the processor supports the\r | |
306 | /// XSAVE/XRSTOR processor extended states feature, the XSETBV/XGETBV\r | |
307 | /// instructions, and XCR0.\r | |
308 | ///\r | |
309 | UINT32 XSAVE:1;\r | |
310 | ///\r | |
311 | /// [Bit 27] A value of 1 indicates that the OS has set CR4.OSXSAVE[Bit 18]\r | |
312 | /// to enable XSETBV/XGETBV instructions to access XCR0 and to support\r | |
313 | /// processor extended state management using XSAVE/XRSTOR.\r | |
314 | ///\r | |
315 | UINT32 OSXSAVE:1;\r | |
316 | ///\r | |
317 | /// [Bit 28] A value of 1 indicates the processor supports the AVX instruction\r | |
318 | /// extensions.\r | |
319 | ///\r | |
320 | UINT32 AVX:1;\r | |
321 | ///\r | |
322 | /// [Bit 29] A value of 1 indicates that processor supports 16-bit\r | |
323 | /// floating-point conversion instructions.\r | |
324 | ///\r | |
325 | UINT32 F16C:1;\r | |
326 | ///\r | |
327 | /// [Bit 30] A value of 1 indicates that processor supports RDRAND instruction.\r | |
328 | ///\r | |
329 | UINT32 RDRAND:1;\r | |
330 | ///\r | |
331 | /// [Bit 31] Always returns 0.\r | |
332 | ///\r | |
333 | UINT32 NotUsed:1;\r | |
334 | } Bits;\r | |
335 | ///\r | |
336 | /// All bit fields as a 32-bit value\r | |
337 | ///\r | |
338 | UINT32 Uint32;\r | |
339 | } CPUID_VERSION_INFO_ECX;\r | |
340 | \r | |
341 | /**\r | |
342 | CPUID Version Information returned in EDX for CPUID leaf\r | |
343 | #CPUID_VERSION_INFO.\r | |
344 | **/\r | |
345 | typedef union {\r | |
346 | ///\r | |
347 | /// Individual bit fields\r | |
348 | ///\r | |
349 | struct {\r | |
350 | ///\r | |
351 | /// [Bit 0] Floating Point Unit On-Chip. The processor contains an x87 FPU.\r | |
352 | ///\r | |
353 | UINT32 FPU:1;\r | |
354 | ///\r | |
355 | /// [Bit 1] Virtual 8086 Mode Enhancements. Virtual 8086 mode enhancements,\r | |
356 | /// including CR4.VME for controlling the feature, CR4.PVI for protected\r | |
357 | /// mode virtual interrupts, software interrupt indirection, expansion of\r | |
358 | /// the TSS with the software indirection bitmap, and EFLAGS.VIF and\r | |
359 | /// EFLAGS.VIP flags.\r | |
360 | ///\r | |
361 | UINT32 VME:1;\r | |
362 | ///\r | |
363 | /// [Bit 2] Debugging Extensions. Support for I/O breakpoints, including\r | |
364 | /// CR4.DE for controlling the feature, and optional trapping of accesses to\r | |
365 | /// DR4 and DR5.\r | |
366 | ///\r | |
367 | UINT32 DE:1;\r | |
368 | ///\r | |
369 | /// [Bit 3] Page Size Extension. Large pages of size 4 MByte are supported,\r | |
370 | /// including CR4.PSE for controlling the feature, the defined dirty bit in\r | |
371 | /// PDE (Page Directory Entries), optional reserved bit trapping in CR3,\r | |
372 | /// PDEs, and PTEs.\r | |
373 | ///\r | |
374 | UINT32 PSE:1;\r | |
375 | ///\r | |
376 | /// [Bit 4] Time Stamp Counter. The RDTSC instruction is supported,\r | |
377 | /// including CR4.TSD for controlling privilege.\r | |
378 | ///\r | |
379 | UINT32 TSC:1;\r | |
380 | ///\r | |
381 | /// [Bit 5] Model Specific Registers RDMSR and WRMSR Instructions. The\r | |
382 | /// RDMSR and WRMSR instructions are supported. Some of the MSRs are\r | |
383 | /// implementation dependent.\r | |
384 | ///\r | |
385 | UINT32 MSR:1;\r | |
386 | ///\r | |
387 | /// [Bit 6] Physical Address Extension. Physical addresses greater than 32\r | |
388 | /// bits are supported: extended page table entry formats, an extra level in\r | |
389 | /// the page translation tables is defined, 2-MByte pages are supported\r | |
390 | /// instead of 4 Mbyte pages if PAE bit is 1.\r | |
391 | ///\r | |
392 | UINT32 PAE:1;\r | |
393 | ///\r | |
394 | /// [Bit 7] Machine Check Exception. Exception 18 is defined for Machine\r | |
395 | /// Checks, including CR4.MCE for controlling the feature. This feature does\r | |
396 | /// not define the model-specific implementations of machine-check error\r | |
397 | /// logging, reporting, and processor shutdowns. Machine Check exception\r | |
398 | /// handlers may have to depend on processor version to do model specific\r | |
399 | /// processing of the exception, or test for the presence of the Machine\r | |
400 | /// Check feature.\r | |
401 | ///\r | |
402 | UINT32 MCE:1;\r | |
403 | ///\r | |
404 | /// [Bit 8] CMPXCHG8B Instruction. The compare-and-exchange 8 bytes(64 bits)\r | |
405 | /// instruction is supported (implicitly locked and atomic).\r | |
406 | ///\r | |
407 | UINT32 CX8:1;\r | |
408 | ///\r | |
409 | /// [Bit 9] APIC On-Chip. The processor contains an Advanced Programmable\r | |
410 | /// Interrupt Controller (APIC), responding to memory mapped commands in the\r | |
411 | /// physical address range FFFE0000H to FFFE0FFFH (by default - some\r | |
412 | /// processors permit the APIC to be relocated).\r | |
413 | ///\r | |
414 | UINT32 APIC:1;\r | |
415 | UINT32 Reserved1:1;\r | |
416 | ///\r | |
417 | /// [Bit 11] SYSENTER and SYSEXIT Instructions. The SYSENTER and SYSEXIT\r | |
418 | /// and associated MSRs are supported.\r | |
419 | ///\r | |
420 | UINT32 SEP:1;\r | |
421 | ///\r | |
422 | /// [Bit 12] Memory Type Range Registers. MTRRs are supported. The MTRRcap\r | |
423 | /// MSR contains feature bits that describe what memory types are supported,\r | |
424 | /// how many variable MTRRs are supported, and whether fixed MTRRs are\r | |
425 | /// supported.\r | |
426 | ///\r | |
427 | UINT32 MTRR:1;\r | |
428 | ///\r | |
429 | /// [Bit 13] Page Global Bit. The global bit is supported in paging-structure\r | |
430 | /// entries that map a page, indicating TLB entries that are common to\r | |
431 | /// different processes and need not be flushed. The CR4.PGE bit controls\r | |
432 | /// this feature.\r | |
433 | ///\r | |
434 | UINT32 PGE:1;\r | |
435 | ///\r | |
14806d7b HW |
436 | /// [Bit 14] Machine Check Architecture. A value of 1 indicates the Machine\r |
437 | /// Check Architecture of reporting machine errors is supported. The MCG_CAP\r | |
438 | /// MSR contains feature bits describing how many banks of error reporting\r | |
439 | /// MSRs are supported.\r | |
57d16ba1 MK |
440 | ///\r |
441 | UINT32 MCA:1;\r | |
442 | ///\r | |
443 | /// [Bit 15] Conditional Move Instructions. The conditional move instruction\r | |
444 | /// CMOV is supported. In addition, if x87 FPU is present as indicated by the\r | |
445 | /// CPUID.FPU feature bit, then the FCOMI and FCMOV instructions are supported.\r | |
446 | ///\r | |
447 | UINT32 CMOV:1;\r | |
448 | ///\r | |
449 | /// [Bit 16] Page Attribute Table. Page Attribute Table is supported. This\r | |
450 | /// feature augments the Memory Type Range Registers (MTRRs), allowing an\r | |
451 | /// operating system to specify attributes of memory accessed through a\r | |
452 | /// linear address on a 4KB granularity.\r | |
453 | ///\r | |
454 | UINT32 PAT:1;\r | |
455 | ///\r | |
456 | /// [Bit 17] 36-Bit Page Size Extension. 4-MByte pages addressing physical\r | |
457 | /// memory beyond 4 GBytes are supported with 32-bit paging. This feature\r | |
458 | /// indicates that upper bits of the physical address of a 4-MByte page are\r | |
459 | /// encoded in bits 20:13 of the page-directory entry. Such physical\r | |
460 | /// addresses are limited by MAXPHYADDR and may be up to 40 bits in size.\r | |
461 | ///\r | |
462 | UINT32 PSE_36:1;\r | |
463 | ///\r | |
464 | /// [Bit 18] Processor Serial Number. The processor supports the 96-bit\r | |
465 | /// processor identification number feature and the feature is enabled.\r | |
466 | ///\r | |
467 | UINT32 PSN:1;\r | |
468 | ///\r | |
469 | /// [Bit 19] CLFLUSH Instruction. CLFLUSH Instruction is supported.\r | |
470 | ///\r | |
471 | UINT32 CLFSH:1;\r | |
472 | UINT32 Reserved2:1;\r | |
473 | ///\r | |
474 | /// [Bit 21] Debug Store. The processor supports the ability to write debug\r | |
475 | /// information into a memory resident buffer. This feature is used by the\r | |
476 | /// branch trace store (BTS) and precise event-based sampling (PEBS)\r | |
477 | /// facilities.\r | |
478 | ///\r | |
479 | UINT32 DS:1;\r | |
480 | ///\r | |
481 | /// [Bit 22] Thermal Monitor and Software Controlled Clock Facilities. The\r | |
482 | /// processor implements internal MSRs that allow processor temperature to\r | |
483 | /// be monitored and processor performance to be modulated in predefined\r | |
484 | /// duty cycles under software control.\r | |
485 | ///\r | |
486 | UINT32 ACPI:1;\r | |
487 | ///\r | |
488 | /// [Bit 23] Intel MMX Technology. The processor supports the Intel MMX\r | |
489 | /// technology.\r | |
490 | ///\r | |
491 | UINT32 MMX:1;\r | |
492 | ///\r | |
493 | /// [Bit 24] FXSAVE and FXRSTOR Instructions. The FXSAVE and FXRSTOR\r | |
494 | /// instructions are supported for fast save and restore of the floating\r | |
495 | /// point context. Presence of this bit also indicates that CR4.OSFXSR is\r | |
496 | /// available for an operating system to indicate that it supports the\r | |
497 | /// FXSAVE and FXRSTOR instructions.\r | |
498 | ///\r | |
499 | UINT32 FXSR:1;\r | |
500 | ///\r | |
501 | /// [Bit 25] SSE. The processor supports the SSE extensions.\r | |
502 | ///\r | |
503 | UINT32 SSE:1;\r | |
504 | ///\r | |
505 | /// [Bit 26] SSE2. The processor supports the SSE2 extensions.\r | |
506 | ///\r | |
507 | UINT32 SSE2:1;\r | |
508 | ///\r | |
509 | /// [Bit 27] Self Snoop. The processor supports the management of\r | |
510 | /// conflicting memory types by performing a snoop of its own cache\r | |
511 | /// structure for transactions issued to the bus.\r | |
512 | ///\r | |
513 | UINT32 SS:1;\r | |
514 | ///\r | |
515 | /// [Bit 28] Max APIC IDs reserved field is Valid. A value of 0 for HTT\r | |
516 | /// indicates there is only a single logical processor in the package and\r | |
517 | /// software should assume only a single APIC ID is reserved. A value of 1\r | |
518 | /// for HTT indicates the value in CPUID.1.EBX[23:16] (the Maximum number of\r | |
519 | /// addressable IDs for logical processors in this package) is valid for the\r | |
520 | /// package.\r | |
521 | ///\r | |
522 | UINT32 HTT:1;\r | |
523 | ///\r | |
524 | /// [Bit 29] Thermal Monitor. The processor implements the thermal monitor\r | |
525 | /// automatic thermal control circuitry (TCC).\r | |
526 | ///\r | |
527 | UINT32 TM:1;\r | |
528 | UINT32 Reserved3:1;\r | |
529 | ///\r | |
530 | /// [Bit 31] Pending Break Enable. The processor supports the use of the\r | |
531 | /// FERR#/PBE# pin when the processor is in the stop-clock state (STPCLK# is\r | |
532 | /// asserted) to signal the processor that an interrupt is pending and that\r | |
533 | /// the processor should return to normal operation to handle the interrupt.\r | |
534 | /// Bit 10 (PBE enable) in the IA32_MISC_ENABLE MSR enables this capability.\r | |
535 | ///\r | |
536 | UINT32 PBE:1;\r | |
537 | } Bits;\r | |
538 | ///\r | |
539 | /// All bit fields as a 32-bit value\r | |
540 | ///\r | |
541 | UINT32 Uint32;\r | |
542 | } CPUID_VERSION_INFO_EDX;\r | |
543 | \r | |
544 | \r | |
545 | /**\r | |
546 | CPUID Cache and TLB Information\r | |
547 | \r | |
548 | @param EAX CPUID_CACHE_INFO (0x02)\r | |
549 | \r | |
550 | @retval EAX Cache and TLB Information described by the type\r | |
551 | CPUID_CACHE_INFO_CACHE_TLB.\r | |
552 | CPUID_CACHE_INFO_CACHE_TLB.CacheDescriptor[0] always returns\r | |
553 | 0x01 and must be ignored. Only valid if\r | |
554 | CPUID_CACHE_INFO_CACHE_TLB.Bits.NotValid is clear.\r | |
555 | @retval EBX Cache and TLB Information described by the type\r | |
556 | CPUID_CACHE_INFO_CACHE_TLB. Only valid if\r | |
557 | CPUID_CACHE_INFO_CACHE_TLB.Bits.NotValid is clear.\r | |
558 | @retval ECX Cache and TLB Information described by the type\r | |
559 | CPUID_CACHE_INFO_CACHE_TLB. Only valid if\r | |
560 | CPUID_CACHE_INFO_CACHE_TLB.Bits.NotValid is clear.\r | |
561 | @retval EDX Cache and TLB Information described by the type\r | |
562 | CPUID_CACHE_INFO_CACHE_TLB. Only valid if\r | |
563 | CPUID_CACHE_INFO_CACHE_TLB.Bits.NotValid is clear.\r | |
564 | \r | |
565 | <b>Example usage</b>\r | |
566 | @code\r | |
567 | CPUID_CACHE_INFO_CACHE_TLB Eax;\r | |
568 | CPUID_CACHE_INFO_CACHE_TLB Ebx;\r | |
569 | CPUID_CACHE_INFO_CACHE_TLB Ecx;\r | |
570 | CPUID_CACHE_INFO_CACHE_TLB Edx;\r | |
571 | \r | |
572 | AsmCpuid (CPUID_CACHE_INFO, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32);\r | |
573 | @endcode\r | |
574 | \r | |
575 | <b>Cache Descriptor values</b>\r | |
576 | <table>\r | |
577 | <tr><th>Value </th><th> Type </th><th> Description </th></tr>\r | |
578 | <tr><td> 0x00 </td><td> General </td><td> Null descriptor, this byte contains no information</td></tr>\r | |
579 | <tr><td> 0x01 </td><td> TLB </td><td> Instruction TLB: 4 KByte pages, 4-way set associative, 32 entries</td></tr>\r | |
580 | <tr><td> 0x02 </td><td> TLB </td><td> Instruction TLB: 4 MByte pages, fully associative, 2 entries</td></tr>\r | |
581 | <tr><td> 0x03 </td><td> TLB </td><td> Data TLB: 4 KByte pages, 4-way set associative, 64 entries</td></tr>\r | |
582 | <tr><td> 0x04 </td><td> TLB </td><td> Data TLB: 4 MByte pages, 4-way set associative, 8 entries</td></tr>\r | |
583 | <tr><td> 0x05 </td><td> TLB </td><td> Data TLB1: 4 MByte pages, 4-way set associative, 32 entries</td></tr>\r | |
584 | <tr><td> 0x06 </td><td> Cache </td><td> 1st-level instruction cache: 8 KBytes, 4-way set associative,\r | |
585 | 32 byte line size</td></tr>\r | |
586 | <tr><td> 0x08 </td><td> Cache </td><td> 1st-level instruction cache: 16 KBytes, 4-way set associative,\r | |
587 | 32 byte line size</td></tr>\r | |
588 | <tr><td> 0x09 </td><td> Cache </td><td> 1st-level instruction cache: 32KBytes, 4-way set associative,\r | |
589 | 64 byte line size</td></tr>\r | |
590 | <tr><td> 0x0A </td><td> Cache </td><td> 1st-level data cache: 8 KBytes, 2-way set associative, 32 byte line size</td></tr>\r | |
591 | <tr><td> 0x0B </td><td> TLB </td><td> Instruction TLB: 4 MByte pages, 4-way set associative, 4 entries</td></tr>\r | |
592 | <tr><td> 0x0C </td><td> Cache </td><td> 1st-level data cache: 16 KBytes, 4-way set associative, 32 byte line size</td></tr>\r | |
593 | <tr><td> 0x0D </td><td> Cache </td><td> 1st-level data cache: 16 KBytes, 4-way set associative, 64 byte line size</td></tr>\r | |
594 | <tr><td> 0x0E </td><td> Cache </td><td> 1st-level data cache: 24 KBytes, 6-way set associative, 64 byte line size</td></tr>\r | |
595 | <tr><td> 0x1D </td><td> Cache </td><td> 2nd-level cache: 128 KBytes, 2-way set associative, 64 byte line size</td></tr>\r | |
596 | <tr><td> 0x21 </td><td> Cache </td><td> 2nd-level cache: 256 KBytes, 8-way set associative, 64 byte line size</td></tr>\r | |
597 | <tr><td> 0x22 </td><td> Cache </td><td> 3rd-level cache: 512 KBytes, 4-way set associative, 64 byte line size,\r | |
598 | 2 lines per sector</td></tr>\r | |
599 | <tr><td> 0x23 </td><td> Cache </td><td> 3rd-level cache: 1 MBytes, 8-way set associative, 64 byte line size,\r | |
600 | 2 lines per sector</td></tr>\r | |
601 | <tr><td> 0x24 </td><td> Cache </td><td> 2nd-level cache: 1 MBytes, 16-way set associative, 64 byte line size</td></tr>\r | |
602 | <tr><td> 0x25 </td><td> Cache </td><td> 3rd-level cache: 2 MBytes, 8-way set associative, 64 byte line size,\r | |
603 | 2 lines per sector</td></tr>\r | |
604 | <tr><td> 0x29 </td><td> Cache </td><td> 3rd-level cache: 4 MBytes, 8-way set associative, 64 byte line size,\r | |
605 | 2 lines per sector</td></tr>\r | |
606 | <tr><td> 0x2C </td><td> Cache </td><td> 1st-level data cache: 32 KBytes, 8-way set associative,\r | |
607 | 64 byte line size</td></tr>\r | |
608 | <tr><td> 0x30 </td><td> Cache </td><td> 1st-level instruction cache: 32 KBytes, 8-way set associative,\r | |
609 | 64 byte line size</td></tr>\r | |
610 | <tr><td> 0x40 </td><td> Cache </td><td> No 2nd-level cache or, if processor contains a valid 2nd-level cache,\r | |
611 | no 3rd-level cache</td></tr>\r | |
612 | <tr><td> 0x41 </td><td> Cache </td><td> 2nd-level cache: 128 KBytes, 4-way set associative, 32 byte line size</td></tr>\r | |
613 | <tr><td> 0x42 </td><td> Cache </td><td> 2nd-level cache: 256 KBytes, 4-way set associative, 32 byte line size</td></tr>\r | |
614 | <tr><td> 0x43 </td><td> Cache </td><td> 2nd-level cache: 512 KBytes, 4-way set associative, 32 byte line size</td></tr>\r | |
615 | <tr><td> 0x44 </td><td> Cache </td><td> 2nd-level cache: 1 MByte, 4-way set associative, 32 byte line size</td></tr>\r | |
616 | <tr><td> 0x45 </td><td> Cache </td><td> 2nd-level cache: 2 MByte, 4-way set associative, 32 byte line size</td></tr>\r | |
617 | <tr><td> 0x46 </td><td> Cache </td><td> 3rd-level cache: 4 MByte, 4-way set associative, 64 byte line size</td></tr>\r | |
618 | <tr><td> 0x47 </td><td> Cache </td><td> 3rd-level cache: 8 MByte, 8-way set associative, 64 byte line size</td></tr>\r | |
619 | <tr><td> 0x48 </td><td> Cache </td><td> 2nd-level cache: 3MByte, 12-way set associative, 64 byte line size</td></tr>\r | |
620 | <tr><td> 0x49 </td><td> Cache </td><td> 3rd-level cache: 4MB, 16-way set associative, 64-byte line size\r | |
621 | (Intel Xeon processor MP, Family 0FH, Model 06H)<BR>\r | |
622 | 2nd-level cache: 4 MByte, 16-way set associative, 64 byte line size</td></tr>\r | |
623 | <tr><td> 0x4A </td><td> Cache </td><td> 3rd-level cache: 6MByte, 12-way set associative, 64 byte line size</td></tr>\r | |
624 | <tr><td> 0x4B </td><td> Cache </td><td> 3rd-level cache: 8MByte, 16-way set associative, 64 byte line size</td></tr>\r | |
625 | <tr><td> 0x4C </td><td> Cache </td><td> 3rd-level cache: 12MByte, 12-way set associative, 64 byte line size</td></tr>\r | |
626 | <tr><td> 0x4D </td><td> Cache </td><td> 3rd-level cache: 16MByte, 16-way set associative, 64 byte line size</td></tr>\r | |
627 | <tr><td> 0x4E </td><td> Cache </td><td> 2nd-level cache: 6MByte, 24-way set associative, 64 byte line size</td></tr>\r | |
628 | <tr><td> 0x4F </td><td> TLB </td><td> Instruction TLB: 4 KByte pages, 32 entries</td></tr>\r | |
629 | <tr><td> 0x50 </td><td> TLB </td><td> Instruction TLB: 4 KByte and 2-MByte or 4-MByte pages, 64 entries</td></tr>\r | |
630 | <tr><td> 0x51 </td><td> TLB </td><td> Instruction TLB: 4 KByte and 2-MByte or 4-MByte pages, 128 entries</td></tr>\r | |
631 | <tr><td> 0x52 </td><td> TLB </td><td> Instruction TLB: 4 KByte and 2-MByte or 4-MByte pages, 256 entries</td></tr>\r | |
632 | <tr><td> 0x55 </td><td> TLB </td><td> Instruction TLB: 2-MByte or 4-MByte pages, fully associative, 7 entries</td></tr>\r | |
633 | <tr><td> 0x56 </td><td> TLB </td><td> Data TLB0: 4 MByte pages, 4-way set associative, 16 entries</td></tr>\r | |
634 | <tr><td> 0x57 </td><td> TLB </td><td> Data TLB0: 4 KByte pages, 4-way associative, 16 entries</td></tr>\r | |
635 | <tr><td> 0x59 </td><td> TLB </td><td> Data TLB0: 4 KByte pages, fully associative, 16 entries</td></tr>\r | |
14806d7b | 636 | <tr><td> 0x5A </td><td> TLB </td><td> Data TLB0: 2 MByte or 4 MByte pages, 4-way set associative, 32 entries</td></tr>\r |
57d16ba1 MK |
637 | <tr><td> 0x5B </td><td> TLB </td><td> Data TLB: 4 KByte and 4 MByte pages, 64 entries</td></tr>\r |
638 | <tr><td> 0x5C </td><td> TLB </td><td> Data TLB: 4 KByte and 4 MByte pages,128 entries</td></tr>\r | |
639 | <tr><td> 0x5D </td><td> TLB </td><td> Data TLB: 4 KByte and 4 MByte pages,256 entries</td></tr>\r | |
640 | <tr><td> 0x60 </td><td> Cache </td><td> 1st-level data cache: 16 KByte, 8-way set associative, 64 byte line size</td></tr>\r | |
641 | <tr><td> 0x61 </td><td> TLB </td><td> Instruction TLB: 4 KByte pages, fully associative, 48 entries</td></tr>\r | |
14806d7b HW |
642 | <tr><td> 0x63 </td><td> TLB </td><td> Data TLB: 2 MByte or 4 MByte pages, 4-way set associative,\r |
643 | 32 entries and a separate array with 1 GByte pages, 4-way set associative,\r | |
644 | 4 entries</td></tr>\r | |
645 | <tr><td> 0x64 </td><td> TLB </td><td> Data TLB: 4 KByte pages, 4-way set associative, 512 entries</td></tr>\r | |
57d16ba1 MK |
646 | <tr><td> 0x66 </td><td> Cache </td><td> 1st-level data cache: 8 KByte, 4-way set associative, 64 byte line size</td></tr>\r |
647 | <tr><td> 0x67 </td><td> Cache </td><td> 1st-level data cache: 16 KByte, 4-way set associative, 64 byte line size</td></tr>\r | |
648 | <tr><td> 0x68 </td><td> Cache </td><td> 1st-level data cache: 32 KByte, 4-way set associative, 64 byte line size</td></tr>\r | |
649 | <tr><td> 0x6A </td><td> Cache </td><td> uTLB: 4 KByte pages, 8-way set associative, 64 entries</td></tr>\r | |
650 | <tr><td> 0x6B </td><td> Cache </td><td> DTLB: 4 KByte pages, 8-way set associative, 256 entries</td></tr>\r | |
651 | <tr><td> 0x6C </td><td> Cache </td><td> DTLB: 2M/4M pages, 8-way set associative, 128 entries</td></tr>\r | |
652 | <tr><td> 0x6D </td><td> Cache </td><td> DTLB: 1 GByte pages, fully associative, 16 entries</td></tr>\r | |
653 | <tr><td> 0x70 </td><td> Cache </td><td> Trace cache: 12 K-uop, 8-way set associative</td></tr>\r | |
654 | <tr><td> 0x71 </td><td> Cache </td><td> Trace cache: 16 K-uop, 8-way set associative</td></tr>\r | |
655 | <tr><td> 0x72 </td><td> Cache </td><td> Trace cache: 32 K-uop, 8-way set associative</td></tr>\r | |
656 | <tr><td> 0x76 </td><td> TLB </td><td> Instruction TLB: 2M/4M pages, fully associative, 8 entries</td></tr>\r | |
657 | <tr><td> 0x78 </td><td> Cache </td><td> 2nd-level cache: 1 MByte, 4-way set associative, 64byte line size</td></tr>\r | |
658 | <tr><td> 0x79 </td><td> Cache </td><td> 2nd-level cache: 128 KByte, 8-way set associative, 64 byte line size,\r | |
659 | 2 lines per sector</td></tr>\r | |
660 | <tr><td> 0x7A </td><td> Cache </td><td> 2nd-level cache: 256 KByte, 8-way set associative, 64 byte line size,\r | |
661 | 2 lines per sector</td></tr>\r | |
662 | <tr><td> 0x7B </td><td> Cache </td><td> 2nd-level cache: 512 KByte, 8-way set associative, 64 byte line size,\r | |
663 | 2 lines per sector</td></tr>\r | |
664 | <tr><td> 0x7C </td><td> Cache </td><td> 2nd-level cache: 1 MByte, 8-way set associative, 64 byte line size,\r | |
665 | 2 lines per sector</td></tr>\r | |
666 | <tr><td> 0x7D </td><td> Cache </td><td> 2nd-level cache: 2 MByte, 8-way set associative, 64byte line size</td></tr>\r | |
667 | <tr><td> 0x7F </td><td> Cache </td><td> 2nd-level cache: 512 KByte, 2-way set associative, 64-byte line size</td></tr>\r | |
668 | <tr><td> 0x80 </td><td> Cache </td><td> 2nd-level cache: 512 KByte, 8-way set associative, 64-byte line size</td></tr>\r | |
669 | <tr><td> 0x82 </td><td> Cache </td><td> 2nd-level cache: 256 KByte, 8-way set associative, 32 byte line size</td></tr>\r | |
670 | <tr><td> 0x83 </td><td> Cache </td><td> 2nd-level cache: 512 KByte, 8-way set associative, 32 byte line size</td></tr>\r | |
671 | <tr><td> 0x84 </td><td> Cache </td><td> 2nd-level cache: 1 MByte, 8-way set associative, 32 byte line size</td></tr>\r | |
672 | <tr><td> 0x85 </td><td> Cache </td><td> 2nd-level cache: 2 MByte, 8-way set associative, 32 byte line size</td></tr>\r | |
673 | <tr><td> 0x86 </td><td> Cache </td><td> 2nd-level cache: 512 KByte, 4-way set associative, 64 byte line size</td></tr>\r | |
674 | <tr><td> 0x87 </td><td> Cache </td><td> 2nd-level cache: 1 MByte, 8-way set associative, 64 byte line size</td></tr>\r | |
675 | <tr><td> 0xA0 </td><td> DTLB </td><td> DTLB: 4k pages, fully associative, 32 entries</td></tr>\r | |
676 | <tr><td> 0xB0 </td><td> TLB </td><td> Instruction TLB: 4 KByte pages, 4-way set associative, 128 entries</td></tr>\r | |
677 | <tr><td> 0xB1 </td><td> TLB </td><td> Instruction TLB: 2M pages, 4-way, 8 entries or 4M pages, 4-way, 4 entries</td></tr>\r | |
678 | <tr><td> 0xB2 </td><td> TLB </td><td> Instruction TLB: 4KByte pages, 4-way set associative, 64 entries</td></tr>\r | |
679 | <tr><td> 0xB3 </td><td> TLB </td><td> Data TLB: 4 KByte pages, 4-way set associative, 128 entries</td></tr>\r | |
680 | <tr><td> 0xB4 </td><td> TLB </td><td> Data TLB1: 4 KByte pages, 4-way associative, 256 entries</td></tr>\r | |
681 | <tr><td> 0xB5 </td><td> TLB </td><td> Instruction TLB: 4KByte pages, 8-way set associative, 64 entries</td></tr>\r | |
682 | <tr><td> 0xB6 </td><td> TLB </td><td> Instruction TLB: 4KByte pages, 8-way set associative,\r | |
683 | 128 entries</td></tr>\r | |
684 | <tr><td> 0xBA </td><td> TLB </td><td> Data TLB1: 4 KByte pages, 4-way associative, 64 entries</td></tr>\r | |
685 | <tr><td> 0xC0 </td><td> TLB </td><td> Data TLB: 4 KByte and 4 MByte pages, 4-way associative, 8 entries</td></tr>\r | |
686 | <tr><td> 0xC1 </td><td> STLB </td><td> Shared 2nd-Level TLB: 4 KByte/2MByte pages, 8-way associative,\r | |
687 | 1024 entries</td></tr>\r | |
688 | <tr><td> 0xC2 </td><td> DTLB </td><td> DTLB: 4 KByte/2 MByte pages, 4-way associative, 16 entries</td></tr>\r | |
689 | <tr><td> 0xC3 </td><td> STLB </td><td> Shared 2nd-Level TLB: 4 KByte /2 MByte pages, 6-way associative,\r | |
690 | 1536 entries. Also 1GBbyte pages, 4-way, 16 entries.</td></tr>\r | |
14806d7b | 691 | <tr><td> 0xC4 </td><td> DTLB </td><td> DTLB: 2M/4M Byte pages, 4-way associative, 32 entries</td></tr>\r |
57d16ba1 MK |
692 | <tr><td> 0xCA </td><td> STLB </td><td> Shared 2nd-Level TLB: 4 KByte pages, 4-way associative, 512 entries</td></tr>\r |
693 | <tr><td> 0xD0 </td><td> Cache </td><td> 3rd-level cache: 512 KByte, 4-way set associative, 64 byte line size</td></tr>\r | |
694 | <tr><td> 0xD1 </td><td> Cache </td><td> 3rd-level cache: 1 MByte, 4-way set associative, 64 byte line size</td></tr>\r | |
695 | <tr><td> 0xD2 </td><td> Cache </td><td> 3rd-level cache: 2 MByte, 4-way set associative, 64 byte line size</td></tr>\r | |
696 | <tr><td> 0xD6 </td><td> Cache </td><td> 3rd-level cache: 1 MByte, 8-way set associative, 64 byte line size</td></tr>\r | |
697 | <tr><td> 0xD7 </td><td> Cache </td><td> 3rd-level cache: 2 MByte, 8-way set associative, 64 byte line size</td></tr>\r | |
698 | <tr><td> 0xD8 </td><td> Cache </td><td> 3rd-level cache: 4 MByte, 8-way set associative, 64 byte line size</td></tr>\r | |
699 | <tr><td> 0xDC </td><td> Cache </td><td> 3rd-level cache: 1.5 MByte, 12-way set associative, 64 byte line size</td></tr>\r | |
700 | <tr><td> 0xDD </td><td> Cache </td><td> 3rd-level cache: 3 MByte, 12-way set associative, 64 byte line size</td></tr>\r | |
701 | <tr><td> 0xDE </td><td> Cache </td><td> 3rd-level cache: 6 MByte, 12-way set associative, 64 byte line size</td></tr>\r | |
702 | <tr><td> 0xE2 </td><td> Cache </td><td> 3rd-level cache: 2 MByte, 16-way set associative, 64 byte line size</td></tr>\r | |
703 | <tr><td> 0xE3 </td><td> Cache </td><td> 3rd-level cache: 4 MByte, 16-way set associative, 64 byte line size</td></tr>\r | |
704 | <tr><td> 0xE4 </td><td> Cache </td><td> 3rd-level cache: 8 MByte, 16-way set associative, 64 byte line size</td></tr>\r | |
705 | <tr><td> 0xEA </td><td> Cache </td><td> 3rd-level cache: 12MByte, 24-way set associative, 64 byte line size</td></tr>\r | |
706 | <tr><td> 0xEB </td><td> Cache </td><td> 3rd-level cache: 18MByte, 24-way set associative, 64 byte line size</td></tr>\r | |
707 | <tr><td> 0xEC </td><td> Cache </td><td> 3rd-level cache: 24MByte, 24-way set associative, 64 byte line size</td></tr>\r | |
708 | <tr><td> 0xF0 </td><td> Prefetch</td><td> 64-Byte prefetching</td></tr>\r | |
709 | <tr><td> 0xF1 </td><td> Prefetch</td><td> 128-Byte prefetching</td></tr>\r | |
ee27f6ee ED |
710 | <tr><td> 0xFE </td><td> General </td><td> CPUID leaf 2 does not report TLB descriptor information; use CPUID\r |
711 | leaf 18H to query TLB and other address translation parameters.</td></tr>\r | |
57d16ba1 MK |
712 | <tr><td> 0xFF </td><td> General </td><td> CPUID leaf 2 does not report cache descriptor information,\r |
713 | use CPUID leaf 4 to query cache parameters</td></tr>\r | |
714 | </table>\r | |
715 | **/\r | |
716 | #define CPUID_CACHE_INFO 0x02\r | |
717 | \r | |
718 | /**\r | |
719 | CPUID Cache and TLB Information returned in EAX, EBX, ECX, and EDX for CPUID\r | |
720 | leaf #CPUID_CACHE_INFO.\r | |
721 | **/\r | |
722 | typedef union {\r | |
723 | ///\r | |
724 | /// Individual bit fields\r | |
725 | ///\r | |
726 | struct {\r | |
727 | UINT32 Reserved:31;\r | |
728 | ///\r | |
729 | /// [Bit 31] If 0, then the cache descriptor bytes in the register are valid.\r | |
730 | /// if 1, then none of the cache descriptor bytes in the register are valid.\r | |
731 | ///\r | |
732 | UINT32 NotValid:1;\r | |
733 | } Bits;\r | |
734 | ///\r | |
735 | /// Array of Cache and TLB descriptor bytes\r | |
736 | ///\r | |
737 | UINT8 CacheDescriptor[4];\r | |
738 | ///\r | |
739 | /// All bit fields as a 32-bit value\r | |
740 | ///\r | |
741 | UINT32 Uint32;\r | |
742 | } CPUID_CACHE_INFO_CACHE_TLB;\r | |
743 | \r | |
744 | \r | |
745 | /**\r | |
746 | CPUID Processor Serial Number\r | |
747 | \r | |
748 | Processor serial number (PSN) is not supported in the Pentium 4 processor\r | |
749 | or later. On all models, use the PSN flag (returned using CPUID) to check\r | |
750 | for PSN support before accessing the feature.\r | |
751 | \r | |
752 | @param EAX CPUID_SERIAL_NUMBER (0x03)\r | |
753 | \r | |
754 | @retval EAX Reserved.\r | |
755 | @retval EBX Reserved.\r | |
756 | @retval ECX Bits 31:0 of 96 bit processor serial number. (Available in\r | |
757 | Pentium III processor only; otherwise, the value in this\r | |
758 | register is reserved.)\r | |
759 | @retval EDX Bits 63:32 of 96 bit processor serial number. (Available in\r | |
760 | Pentium III processor only; otherwise, the value in this\r | |
761 | register is reserved.)\r | |
762 | \r | |
763 | <b>Example usage</b>\r | |
764 | @code\r | |
765 | UINT32 Ecx;\r | |
766 | UINT32 Edx;\r | |
767 | \r | |
768 | AsmCpuid (CPUID_SERIAL_NUMBER, NULL, NULL, &Ecx, &Edx);\r | |
769 | @endcode\r | |
770 | **/\r | |
771 | #define CPUID_SERIAL_NUMBER 0x03\r | |
772 | \r | |
773 | \r | |
774 | /**\r | |
775 | CPUID Cache Parameters\r | |
776 | \r | |
777 | @param EAX CPUID_CACHE_PARAMS (0x04)\r | |
778 | @param ECX Cache Level. Valid values start at 0. Software can enumerate\r | |
779 | the deterministic cache parameters for each level of the cache\r | |
780 | hierarchy starting with an index value of 0, until the\r | |
781 | parameters report the value associated with the CacheType\r | |
782 | field in CPUID_CACHE_PARAMS_EAX is 0.\r | |
783 | \r | |
784 | @retval EAX Returns cache type information described by the type\r | |
785 | CPUID_CACHE_PARAMS_EAX.\r | |
786 | @retval EBX Returns cache line and associativity information described by\r | |
787 | the type CPUID_CACHE_PARAMS_EBX.\r | |
788 | @retval ECX Returns the number of sets in the cache.\r | |
789 | @retval EDX Returns cache WINVD/INVD behavior described by the type\r | |
790 | CPUID_CACHE_PARAMS_EDX.\r | |
791 | \r | |
792 | <b>Example usage</b>\r | |
793 | @code\r | |
794 | UINT32 CacheLevel;\r | |
795 | CPUID_CACHE_PARAMS_EAX Eax;\r | |
796 | CPUID_CACHE_PARAMS_EBX Ebx;\r | |
797 | UINT32 Ecx;\r | |
798 | CPUID_CACHE_PARAMS_EDX Edx;\r | |
799 | \r | |
800 | CacheLevel = 0;\r | |
801 | do {\r | |
802 | AsmCpuidEx (\r | |
803 | CPUID_CACHE_PARAMS, CacheLevel,\r | |
804 | &Eax.Uint32, &Ebx.Uint32, &Ecx, &Edx.Uint32\r | |
805 | );\r | |
806 | CacheLevel++;\r | |
807 | } while (Eax.Bits.CacheType != CPUID_CACHE_PARAMS_CACHE_TYPE_NULL);\r | |
808 | @endcode\r | |
809 | **/\r | |
810 | #define CPUID_CACHE_PARAMS 0x04\r | |
811 | \r | |
812 | /**\r | |
813 | CPUID Cache Parameters Information returned in EAX for CPUID leaf\r | |
814 | #CPUID_CACHE_PARAMS.\r | |
815 | **/\r | |
816 | typedef union {\r | |
817 | ///\r | |
818 | /// Individual bit fields\r | |
819 | ///\r | |
820 | struct {\r | |
821 | ///\r | |
822 | /// [Bits 4:0] Cache type field. If #CPUID_CACHE_PARAMS_CACHE_TYPE_NULL,\r | |
823 | /// then there is no information for the requested cache level.\r | |
824 | ///\r | |
825 | UINT32 CacheType:5;\r | |
826 | ///\r | |
827 | /// [Bits 7:5] Cache level (Starts at 1).\r | |
828 | ///\r | |
829 | UINT32 CacheLevel:3;\r | |
830 | ///\r | |
831 | /// [Bit 8] Self Initializing cache level (does not need SW initialization).\r | |
832 | ///\r | |
833 | UINT32 SelfInitializingCache:1;\r | |
834 | ///\r | |
835 | /// [Bit 9] Fully Associative cache.\r | |
836 | ///\r | |
837 | UINT32 FullyAssociativeCache:1;\r | |
838 | ///\r | |
839 | /// [Bits 13:10] Reserved.\r | |
840 | ///\r | |
841 | UINT32 Reserved:4;\r | |
842 | ///\r | |
843 | /// [Bits 25:14] Maximum number of addressable IDs for logical processors\r | |
844 | /// sharing this cache.\r | |
845 | ///\r | |
846 | /// Add one to the return value to get the result.\r | |
847 | /// The nearest power-of-2 integer that is not smaller than (1 + EAX[25:14])\r | |
848 | /// is the number of unique initial APIC IDs reserved for addressing\r | |
849 | /// different logical processors sharing this cache.\r | |
850 | ///\r | |
851 | UINT32 MaximumAddressableIdsForLogicalProcessors:12;\r | |
852 | ///\r | |
853 | /// [Bits 31:26] Maximum number of addressable IDs for processor cores in\r | |
854 | /// the physical package.\r | |
855 | ///\r | |
856 | /// The nearest power-of-2 integer that is not smaller than (1 + EAX[31:26])\r | |
857 | /// is the number of unique Core_IDs reserved for addressing different\r | |
858 | /// processor cores in a physical package. Core ID is a subset of bits of\r | |
859 | /// the initial APIC ID.\r | |
860 | /// The returned value is constant for valid initial values in ECX. Valid\r | |
861 | /// ECX values start from 0.\r | |
862 | ///\r | |
863 | UINT32 MaximumAddressableIdsForProcessorCores:6;\r | |
864 | } Bits;\r | |
865 | ///\r | |
866 | /// All bit fields as a 32-bit value\r | |
867 | ///\r | |
868 | UINT32 Uint32;\r | |
869 | } CPUID_CACHE_PARAMS_EAX;\r | |
870 | \r | |
871 | ///\r | |
872 | /// @{ Define value for bit field CPUID_CACHE_PARAMS_EAX.CacheType\r | |
873 | ///\r | |
874 | #define CPUID_CACHE_PARAMS_CACHE_TYPE_NULL 0x00\r | |
875 | #define CPUID_CACHE_PARAMS_CACHE_TYPE_DATA 0x01\r | |
876 | #define CPUID_CACHE_PARAMS_CACHE_TYPE_INSTRUCTION 0x02\r | |
877 | #define CPUID_CACHE_PARAMS_CACHE_TYPE_UNIFIED 0x03\r | |
878 | ///\r | |
879 | /// @}\r | |
880 | ///\r | |
881 | \r | |
882 | /**\r | |
883 | CPUID Cache Parameters Information returned in EBX for CPUID leaf\r | |
884 | #CPUID_CACHE_PARAMS.\r | |
885 | **/\r | |
886 | typedef union {\r | |
887 | ///\r | |
888 | /// Individual bit fields\r | |
889 | ///\r | |
890 | struct {\r | |
891 | ///\r | |
892 | /// [Bits 11:0] System Coherency Line Size. Add one to the return value to\r | |
893 | /// get the result.\r | |
894 | ///\r | |
895 | UINT32 LineSize:12;\r | |
896 | ///\r | |
897 | /// [Bits 21:12] Physical Line Partitions. Add one to the return value to\r | |
898 | /// get the result.\r | |
899 | ///\r | |
900 | UINT32 LinePartitions:10;\r | |
901 | ///\r | |
902 | /// [Bits 31:22] Ways of associativity. Add one to the return value to get\r | |
903 | /// the result.\r | |
904 | ///\r | |
905 | UINT32 Ways:10;\r | |
906 | } Bits;\r | |
907 | ///\r | |
908 | /// All bit fields as a 32-bit value\r | |
909 | ///\r | |
910 | UINT32 Uint32;\r | |
911 | } CPUID_CACHE_PARAMS_EBX;\r | |
912 | \r | |
913 | /**\r | |
914 | CPUID Cache Parameters Information returned in EDX for CPUID leaf\r | |
915 | #CPUID_CACHE_PARAMS.\r | |
916 | **/\r | |
917 | typedef union {\r | |
918 | ///\r | |
919 | /// Individual bit fields\r | |
920 | ///\r | |
921 | struct {\r | |
922 | ///\r | |
923 | /// [Bit 0] Write-Back Invalidate/Invalidate.\r | |
924 | /// 0 = WBINVD/INVD from threads sharing this cache acts upon lower level\r | |
925 | /// caches for threads sharing this cache.\r | |
926 | /// 1 = WBINVD/INVD is not guaranteed to act upon lower level caches of\r | |
927 | /// non-originating threads sharing this cache.\r | |
928 | ///\r | |
929 | UINT32 Invalidate:1;\r | |
930 | ///\r | |
931 | /// [Bit 1] Cache Inclusiveness.\r | |
932 | /// 0 = Cache is not inclusive of lower cache levels.\r | |
933 | /// 1 = Cache is inclusive of lower cache levels.\r | |
934 | ///\r | |
935 | UINT32 CacheInclusiveness:1;\r | |
936 | ///\r | |
937 | /// [Bit 2] Complex Cache Indexing.\r | |
938 | /// 0 = Direct mapped cache.\r | |
939 | /// 1 = A complex function is used to index the cache, potentially using all\r | |
940 | /// address bits.\r | |
941 | ///\r | |
942 | UINT32 ComplexCacheIndexing:1;\r | |
943 | UINT32 Reserved:29;\r | |
944 | } Bits;\r | |
945 | ///\r | |
946 | /// All bit fields as a 32-bit value\r | |
947 | ///\r | |
948 | UINT32 Uint32;\r | |
949 | } CPUID_CACHE_PARAMS_EDX;\r | |
950 | \r | |
951 | \r | |
952 | /**\r | |
953 | CPUID MONITOR/MWAIT Information\r | |
954 | \r | |
955 | @param EAX CPUID_MONITOR_MWAIT (0x05)\r | |
956 | \r | |
957 | @retval EAX Smallest monitor-line size in bytes described by the type\r | |
958 | CPUID_MONITOR_MWAIT_EAX.\r | |
959 | @retval EBX Largest monitor-line size in bytes described by the type\r | |
960 | CPUID_MONITOR_MWAIT_EBX.\r | |
961 | @retval ECX Enumeration of Monitor-Mwait extensions support described by\r | |
962 | the type CPUID_MONITOR_MWAIT_ECX.\r | |
963 | @retval EDX Sub C-states supported described by the type\r | |
964 | CPUID_MONITOR_MWAIT_EDX.\r | |
965 | \r | |
966 | <b>Example usage</b>\r | |
967 | @code\r | |
968 | CPUID_MONITOR_MWAIT_EAX Eax;\r | |
969 | CPUID_MONITOR_MWAIT_EBX Ebx;\r | |
970 | CPUID_MONITOR_MWAIT_ECX Ecx;\r | |
971 | CPUID_MONITOR_MWAIT_EDX Edx;\r | |
972 | \r | |
973 | AsmCpuid (CPUID_MONITOR_MWAIT, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32);\r | |
974 | @endcode\r | |
975 | **/\r | |
976 | #define CPUID_MONITOR_MWAIT 0x05\r | |
977 | \r | |
978 | /**\r | |
979 | CPUID MONITOR/MWAIT Information returned in EAX for CPUID leaf\r | |
980 | #CPUID_MONITOR_MWAIT.\r | |
981 | **/\r | |
982 | typedef union {\r | |
983 | ///\r | |
984 | /// Individual bit fields\r | |
985 | ///\r | |
986 | struct {\r | |
987 | ///\r | |
988 | /// [Bits 15:0] Smallest monitor-line size in bytes (default is processor's\r | |
989 | /// monitor granularity).\r | |
990 | ///\r | |
991 | UINT32 SmallestMonitorLineSize:16;\r | |
992 | UINT32 Reserved:16;\r | |
993 | } Bits;\r | |
994 | ///\r | |
995 | /// All bit fields as a 32-bit value\r | |
996 | ///\r | |
997 | UINT32 Uint32;\r | |
998 | } CPUID_MONITOR_MWAIT_EAX;\r | |
999 | \r | |
1000 | /**\r | |
1001 | CPUID MONITOR/MWAIT Information returned in EBX for CPUID leaf\r | |
1002 | #CPUID_MONITOR_MWAIT.\r | |
1003 | **/\r | |
1004 | typedef union {\r | |
1005 | ///\r | |
1006 | /// Individual bit fields\r | |
1007 | ///\r | |
1008 | struct {\r | |
1009 | ///\r | |
1010 | /// [Bits 15:0] Largest monitor-line size in bytes (default is processor's\r | |
1011 | /// monitor granularity).\r | |
1012 | ///\r | |
1013 | UINT32 LargestMonitorLineSize:16;\r | |
1014 | UINT32 Reserved:16;\r | |
1015 | } Bits;\r | |
1016 | ///\r | |
1017 | /// All bit fields as a 32-bit value\r | |
1018 | ///\r | |
1019 | UINT32 Uint32;\r | |
1020 | } CPUID_MONITOR_MWAIT_EBX;\r | |
1021 | \r | |
1022 | /**\r | |
1023 | CPUID MONITOR/MWAIT Information returned in ECX for CPUID leaf\r | |
1024 | #CPUID_MONITOR_MWAIT.\r | |
1025 | **/\r | |
1026 | typedef union {\r | |
1027 | ///\r | |
1028 | /// Individual bit fields\r | |
1029 | ///\r | |
1030 | struct {\r | |
1031 | ///\r | |
1032 | /// [Bit 0] If 0, then only EAX and EBX are valid. If 1, then EAX, EBX, ECX,\r | |
1033 | /// and EDX are valid.\r | |
1034 | ///\r | |
1035 | UINT32 ExtensionsSupported:1;\r | |
1036 | ///\r | |
1037 | /// [Bit 1] Supports treating interrupts as break-event for MWAIT, even when\r | |
1038 | /// interrupts disabled.\r | |
1039 | ///\r | |
1040 | UINT32 InterruptAsBreak:1;\r | |
1041 | UINT32 Reserved:30;\r | |
1042 | } Bits;\r | |
1043 | ///\r | |
1044 | /// All bit fields as a 32-bit value\r | |
1045 | ///\r | |
1046 | UINT32 Uint32;\r | |
1047 | } CPUID_MONITOR_MWAIT_ECX;\r | |
1048 | \r | |
1049 | /**\r | |
1050 | CPUID MONITOR/MWAIT Information returned in EDX for CPUID leaf\r | |
1051 | #CPUID_MONITOR_MWAIT.\r | |
1052 | \r | |
1053 | @note\r | |
1054 | The definition of C0 through C7 states for MWAIT extension are\r | |
1055 | processor-specific C-states, not ACPI C-states.\r | |
1056 | **/\r | |
1057 | typedef union {\r | |
1058 | ///\r | |
1059 | /// Individual bit fields\r | |
1060 | ///\r | |
1061 | struct {\r | |
1062 | ///\r | |
1063 | /// [Bits 3:0] Number of C0 sub C-states supported using MWAIT.\r | |
1064 | ///\r | |
1065 | UINT32 C0States:4;\r | |
1066 | ///\r | |
1067 | /// [Bits 7:4] Number of C1 sub C-states supported using MWAIT.\r | |
1068 | ///\r | |
1069 | UINT32 C1States:4;\r | |
1070 | ///\r | |
1071 | /// [Bits 11:8] Number of C2 sub C-states supported using MWAIT.\r | |
1072 | ///\r | |
1073 | UINT32 C2States:4;\r | |
1074 | ///\r | |
1075 | /// [Bits 15:12] Number of C3 sub C-states supported using MWAIT.\r | |
1076 | ///\r | |
1077 | UINT32 C3States:4;\r | |
1078 | ///\r | |
1079 | /// [Bits 19:16] Number of C4 sub C-states supported using MWAIT.\r | |
1080 | ///\r | |
1081 | UINT32 C4States:4;\r | |
1082 | ///\r | |
1083 | /// [Bits 23:20] Number of C5 sub C-states supported using MWAIT.\r | |
1084 | ///\r | |
1085 | UINT32 C5States:4;\r | |
1086 | ///\r | |
1087 | /// [Bits 27:24] Number of C6 sub C-states supported using MWAIT.\r | |
1088 | ///\r | |
1089 | UINT32 C6States:4;\r | |
1090 | ///\r | |
1091 | /// [Bits 31:28] Number of C7 sub C-states supported using MWAIT.\r | |
1092 | ///\r | |
1093 | UINT32 C7States:4;\r | |
1094 | } Bits;\r | |
1095 | ///\r | |
1096 | /// All bit fields as a 32-bit value\r | |
1097 | ///\r | |
1098 | UINT32 Uint32;\r | |
1099 | } CPUID_MONITOR_MWAIT_EDX;\r | |
1100 | \r | |
1101 | \r | |
1102 | /**\r | |
1103 | CPUID Thermal and Power Management\r | |
1104 | \r | |
1105 | @param EAX CPUID_THERMAL_POWER_MANAGEMENT (0x06)\r | |
1106 | \r | |
1107 | @retval EAX Thermal and power management features described by the type\r | |
1108 | CPUID_THERMAL_POWER_MANAGEMENT_EAX.\r | |
1109 | @retval EBX Number of Interrupt Thresholds in Digital Thermal Sensor\r | |
1110 | described by the type CPUID_THERMAL_POWER_MANAGEMENT_EBX.\r | |
1111 | @retval ECX Performance features described by the type\r | |
1112 | CPUID_THERMAL_POWER_MANAGEMENT_ECX.\r | |
1113 | @retval EDX Reserved.\r | |
1114 | \r | |
1115 | <b>Example usage</b>\r | |
1116 | @code\r | |
1117 | CPUID_THERMAL_POWER_MANAGEMENT_EAX Eax;\r | |
1118 | CPUID_THERMAL_POWER_MANAGEMENT_EBX Ebx;\r | |
1119 | CPUID_THERMAL_POWER_MANAGEMENT_ECX Ecx;\r | |
1120 | \r | |
1121 | AsmCpuid (CPUID_THERMAL_POWER_MANAGEMENT, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, NULL);\r | |
1122 | @endcode\r | |
1123 | **/\r | |
1124 | #define CPUID_THERMAL_POWER_MANAGEMENT 0x06\r | |
1125 | \r | |
1126 | /**\r | |
1127 | CPUID Thermal and Power Management Information returned in EAX for CPUID leaf\r | |
1128 | #CPUID_THERMAL_POWER_MANAGEMENT.\r | |
1129 | **/\r | |
1130 | typedef union {\r | |
1131 | ///\r | |
1132 | /// Individual bit fields\r | |
1133 | ///\r | |
1134 | struct {\r | |
1135 | ///\r | |
1136 | /// [Bit 0] Digital temperature sensor is supported if set.\r | |
1137 | ///\r | |
1138 | UINT32 DigitalTemperatureSensor:1;\r | |
1139 | ///\r | |
1140 | /// [Bit 1] Intel Turbo Boost Technology Available (see IA32_MISC_ENABLE[38]).\r | |
1141 | ///\r | |
1142 | UINT32 TurboBoostTechnology:1;\r | |
1143 | ///\r | |
1144 | /// [Bit 2] APIC-Timer-always-running feature is supported if set.\r | |
1145 | ///\r | |
1146 | UINT32 ARAT:1;\r | |
1147 | UINT32 Reserved1:1;\r | |
1148 | ///\r | |
1149 | /// [Bit 4] Power limit notification controls are supported if set.\r | |
1150 | ///\r | |
1151 | UINT32 PLN:1;\r | |
1152 | ///\r | |
1153 | /// [Bit 5] Clock modulation duty cycle extension is supported if set.\r | |
1154 | ///\r | |
1155 | UINT32 ECMD:1;\r | |
1156 | ///\r | |
1157 | /// [Bit 6] Package thermal management is supported if set.\r | |
1158 | ///\r | |
1159 | UINT32 PTM:1;\r | |
1160 | ///\r | |
1161 | /// [Bit 7] HWP base registers (IA32_PM_ENABLE[Bit 0], IA32_HWP_CAPABILITIES,\r | |
1162 | /// IA32_HWP_REQUEST, IA32_HWP_STATUS) are supported if set.\r | |
1163 | ///\r | |
1164 | UINT32 HWP:1;\r | |
1165 | ///\r | |
1166 | /// [Bit 8] IA32_HWP_INTERRUPT MSR is supported if set.\r | |
1167 | ///\r | |
1168 | UINT32 HWP_Notification:1;\r | |
1169 | ///\r | |
1170 | /// [Bit 9] IA32_HWP_REQUEST[Bits 41:32] is supported if set.\r | |
1171 | ///\r | |
1172 | UINT32 HWP_Activity_Window:1;\r | |
1173 | ///\r | |
1174 | /// [Bit 10] IA32_HWP_REQUEST[Bits 31:24] is supported if set.\r | |
1175 | ///\r | |
1176 | UINT32 HWP_Energy_Performance_Preference:1;\r | |
1177 | ///\r | |
1178 | /// [Bit 11] IA32_HWP_REQUEST_PKG MSR is supported if set.\r | |
1179 | ///\r | |
1180 | UINT32 HWP_Package_Level_Request:1;\r | |
1181 | UINT32 Reserved2:1;\r | |
1182 | ///\r | |
1183 | /// [Bit 13] HDC base registers IA32_PKG_HDC_CTL, IA32_PM_CTL1,\r | |
1184 | /// IA32_THREAD_STALL MSRs are supported if set.\r | |
1185 | ///\r | |
1186 | UINT32 HDC:1;\r | |
ee27f6ee ED |
1187 | ///\r |
1188 | /// [Bit 14] Intel Turbo Boost Max Technology 3.0 available.\r | |
1189 | ///\r | |
1190 | UINT32 TurboBoostMaxTechnology30:1;\r | |
1191 | ///\r | |
1192 | /// [Bit 15] HWP Capabilities.\r | |
1193 | /// Highest Performance change is supported if set.\r | |
1194 | ///\r | |
1195 | UINT32 HWPCapabilities:1;\r | |
1196 | ///\r | |
1197 | /// [Bit 16] HWP PECI override is supported if set.\r | |
1198 | ///\r | |
1199 | UINT32 HWPPECIOverride:1;\r | |
1200 | ///\r | |
1201 | /// [Bit 17] Flexible HWP is supported if set.\r | |
1202 | ///\r | |
1203 | UINT32 FlexibleHWP:1;\r | |
1204 | ///\r | |
1205 | /// [Bit 18] Fast access mode for the IA32_HWP_REQUEST MSR is supported if set.\r | |
1206 | ///\r | |
1207 | UINT32 FastAccessMode:1;\r | |
1208 | UINT32 Reserved4:1;\r | |
1209 | ///\r | |
1210 | /// [Bit 20] Ignoring Idle Logical Processor HWP request is supported if set.\r | |
1211 | ///\r | |
1212 | UINT32 IgnoringIdleLogicalProcessorHWPRequest:1;\r | |
1213 | UINT32 Reserved5:11;\r | |
57d16ba1 MK |
1214 | } Bits;\r |
1215 | ///\r | |
1216 | /// All bit fields as a 32-bit value\r | |
1217 | ///\r | |
1218 | UINT32 Uint32;\r | |
1219 | } CPUID_THERMAL_POWER_MANAGEMENT_EAX;\r | |
1220 | \r | |
1221 | /**\r | |
1222 | CPUID Thermal and Power Management Information returned in EBX for CPUID leaf\r | |
1223 | #CPUID_THERMAL_POWER_MANAGEMENT.\r | |
1224 | **/\r | |
1225 | typedef union {\r | |
1226 | ///\r | |
1227 | /// Individual bit fields\r | |
1228 | ///\r | |
1229 | struct {\r | |
1230 | ///\r | |
1231 | /// {Bits 3:0] Number of Interrupt Thresholds in Digital Thermal Sensor.\r | |
1232 | ///\r | |
1233 | UINT32 InterruptThresholds:4;\r | |
1234 | UINT32 Reserved:28;\r | |
1235 | } Bits;\r | |
1236 | ///\r | |
1237 | /// All bit fields as a 32-bit value\r | |
1238 | ///\r | |
1239 | UINT32 Uint32;\r | |
1240 | } CPUID_THERMAL_POWER_MANAGEMENT_EBX;\r | |
1241 | \r | |
1242 | /**\r | |
1243 | CPUID Thermal and Power Management Information returned in ECX for CPUID leaf\r | |
1244 | #CPUID_THERMAL_POWER_MANAGEMENT.\r | |
1245 | **/\r | |
1246 | typedef union {\r | |
1247 | ///\r | |
1248 | /// Individual bit fields\r | |
1249 | ///\r | |
1250 | struct {\r | |
1251 | ///\r | |
1252 | /// [Bit 0] Hardware Coordination Feedback Capability (Presence of IA32_MPERF\r | |
1253 | /// and IA32_APERF). The capability to provide a measure of delivered\r | |
1254 | /// processor performance (since last reset of the counters), as a percentage\r | |
1255 | /// of the expected processor performance when running at the TSC frequency.\r | |
1256 | ///\r | |
1257 | UINT32 HardwareCoordinationFeedback:1;\r | |
1258 | UINT32 Reserved1:2;\r | |
1259 | ///\r | |
1260 | /// [Bit 3] If this bit is set, then the processor supports performance-energy\r | |
1261 | /// bias preference and the architectural MSR called IA32_ENERGY_PERF_BIAS\r | |
1262 | /// (1B0H).\r | |
1263 | ///\r | |
1264 | UINT32 PerformanceEnergyBias:1;\r | |
1265 | UINT32 Reserved2:28;\r | |
1266 | } Bits;\r | |
1267 | ///\r | |
1268 | /// All bit fields as a 32-bit value\r | |
1269 | ///\r | |
1270 | UINT32 Uint32;\r | |
1271 | } CPUID_THERMAL_POWER_MANAGEMENT_ECX;\r | |
1272 | \r | |
1273 | \r | |
1274 | /**\r | |
1275 | CPUID Structured Extended Feature Flags Enumeration\r | |
1276 | \r | |
1277 | @param EAX CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS (0x07)\r | |
1278 | @param ECX CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_SUB_LEAF_INFO (0x00).\r | |
1279 | \r | |
1280 | @note\r | |
1281 | If ECX contains an invalid sub-leaf index, EAX/EBX/ECX/EDX return 0. Sub-leaf\r | |
1282 | index n is invalid if n exceeds the value that sub-leaf 0 returns in EAX.\r | |
1283 | \r | |
1284 | @retval EAX The maximum input value for ECX to retrieve sub-leaf information.\r | |
1285 | @retval EBX Structured Extended Feature Flags described by the type\r | |
1286 | CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_EBX.\r | |
1287 | @retval EBX Structured Extended Feature Flags described by the type\r | |
1288 | CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_ECX.\r | |
1289 | @retval EDX Reserved.\r | |
1290 | \r | |
1291 | <b>Example usage</b>\r | |
1292 | @code\r | |
1293 | UINT32 Eax;\r | |
1294 | CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_EBX Ebx;\r | |
1295 | CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_ECX Ecx;\r | |
1296 | UINT32 SubLeaf;\r | |
1297 | \r | |
1298 | AsmCpuidEx (\r | |
1299 | CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS,\r | |
1300 | CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_SUB_LEAF_INFO,\r | |
1301 | &Eax, NULL, NULL, NULL\r | |
1302 | );\r | |
1303 | for (SubLeaf = 0; SubLeaf <= Eax; SubLeaf++) {\r | |
1304 | AsmCpuidEx (\r | |
1305 | CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS,\r | |
1306 | SubLeaf,\r | |
1307 | NULL, &Ebx.Uint32, &Ecx.Uint32, NULL\r | |
1308 | );\r | |
d93a10c0 | 1309 | }\r |
57d16ba1 MK |
1310 | @endcode\r |
1311 | **/\r | |
1312 | #define CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS 0x07\r | |
1313 | \r | |
1314 | ///\r | |
1315 | /// CPUID Structured Extended Feature Flags Enumeration sub-leaf\r | |
1316 | ///\r | |
1317 | #define CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_SUB_LEAF_INFO 0x00\r | |
1318 | \r | |
1319 | /**\r | |
1320 | CPUID Structured Extended Feature Flags Enumeration in EBX for CPUID leaf\r | |
1321 | #CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS sub leaf\r | |
1322 | #CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_SUB_LEAF_INFO.\r | |
1323 | **/\r | |
1324 | typedef union {\r | |
1325 | ///\r | |
1326 | /// Individual bit fields\r | |
1327 | ///\r | |
1328 | struct {\r | |
1329 | ///\r | |
1330 | /// [Bit 0] Supports RDFSBASE/RDGSBASE/WRFSBASE/WRGSBASE if 1.\r | |
1331 | ///\r | |
1332 | UINT32 FSGSBASE:1;\r | |
1333 | ///\r | |
1334 | /// [Bit 1] IA32_TSC_ADJUST MSR is supported if 1.\r | |
1335 | ///\r | |
1336 | UINT32 IA32_TSC_ADJUST:1;\r | |
c606a9a5 JF |
1337 | ///\r |
1338 | /// [Bit 2] Intel SGX is supported if 1. See section 37.7 "DISCOVERING SUPPORT\r | |
1339 | /// FOR INTEL(R) SGX AND ENABLING ENCLAVE INSTRUCTIONS".\r | |
1340 | ///\r | |
1341 | UINT32 SGX:1;\r | |
57d16ba1 MK |
1342 | ///\r |
1343 | /// [Bit 3] If 1 indicates the processor supports the first group of advanced\r | |
1344 | /// bit manipulation extensions (ANDN, BEXTR, BLSI, BLSMSK, BLSR, TZCNT)\r | |
1345 | ///\r | |
1346 | UINT32 BMI1:1;\r | |
1347 | ///\r | |
1348 | /// [Bit 4] Hardware Lock Elision\r | |
1349 | ///\r | |
1350 | UINT32 HLE:1;\r | |
1351 | ///\r | |
1352 | /// [Bit 5] If 1 indicates the processor supports AVX2 instruction extensions.\r | |
1353 | ///\r | |
1354 | UINT32 AVX2:1;\r | |
1355 | ///\r | |
1356 | /// [Bit 6] x87 FPU Data Pointer updated only on x87 exceptions if 1.\r | |
1357 | ///\r | |
1358 | UINT32 FDP_EXCPTN_ONLY:1;\r | |
1359 | ///\r | |
1360 | /// [Bit 7] Supports Supervisor-Mode Execution Prevention if 1.\r | |
1361 | ///\r | |
1362 | UINT32 SMEP:1;\r | |
1363 | ///\r | |
1364 | /// [Bit 8] If 1 indicates the processor supports the second group of\r | |
1365 | /// advanced bit manipulation extensions (BZHI, MULX, PDEP, PEXT, RORX,\r | |
1366 | /// SARX, SHLX, SHRX)\r | |
1367 | ///\r | |
1368 | UINT32 BMI2:1;\r | |
1369 | ///\r | |
1370 | /// [Bit 9] Supports Enhanced REP MOVSB/STOSB if 1.\r | |
1371 | ///\r | |
1372 | UINT32 EnhancedRepMovsbStosb:1;\r | |
1373 | ///\r | |
1374 | /// [Bit 10] If 1, supports INVPCID instruction for system software that\r | |
1375 | /// manages process-context identifiers.\r | |
1376 | ///\r | |
1377 | UINT32 INVPCID:1;\r | |
1378 | ///\r | |
1379 | /// [Bit 11] Restricted Transactional Memory\r | |
1380 | ///\r | |
1381 | UINT32 RTM:1;\r | |
1382 | ///\r | |
14806d7b HW |
1383 | /// [Bit 12] Supports Intel(R) Resource Director Technology (Intel(R) RDT)\r |
1384 | /// Monitoring capability if 1.\r | |
57d16ba1 | 1385 | ///\r |
14806d7b | 1386 | UINT32 RDT_M:1;\r |
57d16ba1 MK |
1387 | ///\r |
1388 | /// [Bit 13] Deprecates FPU CS and FPU DS values if 1.\r | |
1389 | ///\r | |
1390 | UINT32 DeprecateFpuCsDs:1;\r | |
1391 | ///\r | |
1392 | /// [Bit 14] Supports Intel(R) Memory Protection Extensions if 1.\r | |
1393 | ///\r | |
1394 | UINT32 MPX:1;\r | |
1395 | ///\r | |
14806d7b HW |
1396 | /// [Bit 15] Supports Intel(R) Resource Director Technology (Intel(R) RDT)\r |
1397 | /// Allocation capability if 1.\r | |
57d16ba1 | 1398 | ///\r |
14806d7b | 1399 | UINT32 RDT_A:1;\r |
ee27f6ee ED |
1400 | ///\r |
1401 | /// [Bit 16] AVX512F.\r | |
1402 | ///\r | |
1403 | UINT32 AVX512F:1;\r | |
1404 | ///\r | |
1405 | /// [Bit 17] AVX512DQ.\r | |
1406 | ///\r | |
1407 | UINT32 AVX512DQ:1;\r | |
57d16ba1 MK |
1408 | ///\r |
1409 | /// [Bit 18] If 1 indicates the processor supports the RDSEED instruction.\r | |
1410 | ///\r | |
1411 | UINT32 RDSEED:1;\r | |
1412 | ///\r | |
1413 | /// [Bit 19] If 1 indicates the processor supports the ADCX and ADOX\r | |
1414 | /// instructions.\r | |
1415 | ///\r | |
1416 | UINT32 ADX:1;\r | |
1417 | ///\r | |
1418 | /// [Bit 20] Supports Supervisor-Mode Access Prevention (and the CLAC/STAC\r | |
1419 | /// instructions) if 1.\r | |
1420 | ///\r | |
1421 | UINT32 SMAP:1;\r | |
ee27f6ee ED |
1422 | ///\r |
1423 | /// [Bit 21] AVX512_IFMA.\r | |
1424 | ///\r | |
1425 | UINT32 AVX512_IFMA:1;\r | |
1426 | UINT32 Reserved6:1;\r | |
57d16ba1 MK |
1427 | ///\r |
1428 | /// [Bit 23] If 1 indicates the processor supports the CLFLUSHOPT instruction.\r | |
1429 | ///\r | |
1430 | UINT32 CLFLUSHOPT:1;\r | |
14806d7b HW |
1431 | ///\r |
1432 | /// [Bit 24] If 1 indicates the processor supports the CLWB instruction.\r | |
1433 | ///\r | |
1434 | UINT32 CLWB:1;\r | |
57d16ba1 MK |
1435 | ///\r |
1436 | /// [Bit 25] If 1 indicates the processor supports the Intel Processor Trace\r | |
1437 | /// extensions.\r | |
1438 | ///\r | |
1439 | UINT32 IntelProcessorTrace:1;\r | |
ee27f6ee ED |
1440 | ///\r |
1441 | /// [Bit 26] AVX512PF. (Intel Xeon Phi only.).\r | |
1442 | ///\r | |
1443 | UINT32 AVX512PF:1;\r | |
1444 | ///\r | |
1445 | /// [Bit 27] AVX512ER. (Intel Xeon Phi only.).\r | |
1446 | ///\r | |
1447 | UINT32 AVX512ER:1;\r | |
1448 | ///\r | |
1449 | /// [Bit 28] AVX512CD.\r | |
1450 | ///\r | |
1451 | UINT32 AVX512CD:1;\r | |
14806d7b HW |
1452 | ///\r |
1453 | /// [Bit 29] Supports Intel(R) Secure Hash Algorithm Extensions (Intel(R)\r | |
1454 | /// SHA Extensions) if 1.\r | |
1455 | ///\r | |
1456 | UINT32 SHA:1;\r | |
ee27f6ee ED |
1457 | ///\r |
1458 | /// [Bit 30] AVX512BW.\r | |
1459 | ///\r | |
1460 | UINT32 AVX512BW:1;\r | |
1461 | ///\r | |
1462 | /// [Bit 31] AVX512VL.\r | |
1463 | ///\r | |
1464 | UINT32 AVX512VL:1;\r | |
57d16ba1 MK |
1465 | } Bits;\r |
1466 | ///\r | |
1467 | /// All bit fields as a 32-bit value\r | |
1468 | ///\r | |
1469 | UINT32 Uint32;\r | |
1470 | } CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_EBX;\r | |
1471 | \r | |
1472 | /**\r | |
1473 | CPUID Structured Extended Feature Flags Enumeration in ECX for CPUID leaf\r | |
1474 | #CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS sub leaf\r | |
1475 | #CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_SUB_LEAF_INFO.\r | |
1476 | **/\r | |
1477 | typedef union {\r | |
1478 | ///\r | |
1479 | /// Individual bit fields\r | |
1480 | ///\r | |
1481 | struct {\r | |
1482 | ///\r | |
1483 | /// [Bit 0] If 1 indicates the processor supports the PREFETCHWT1 instruction.\r | |
ee27f6ee | 1484 | /// (Intel Xeon Phi only.)\r |
57d16ba1 MK |
1485 | ///\r |
1486 | UINT32 PREFETCHWT1:1;\r | |
ee27f6ee ED |
1487 | ///\r |
1488 | /// [Bit 1] AVX512_VBMI.\r | |
1489 | ///\r | |
1490 | UINT32 AVX512_VBMI:1;\r | |
14806d7b HW |
1491 | ///\r |
1492 | /// [Bit 2] Supports user-mode instruction prevention if 1.\r | |
1493 | ///\r | |
1494 | UINT32 UMIP:1;\r | |
57d16ba1 MK |
1495 | ///\r |
1496 | /// [Bit 3] Supports protection keys for user-mode pages if 1.\r | |
1497 | ///\r | |
1498 | UINT32 PKU:1;\r | |
1499 | ///\r | |
1500 | /// [Bit 4] If 1, OS has set CR4.PKE to enable protection keys (and the\r | |
1501 | /// RDPKRU/WRPKRU instructions).\r | |
1502 | ///\r | |
1503 | UINT32 OSPKE:1;\r | |
ee27f6ee ED |
1504 | UINT32 Reserved5:9;\r |
1505 | ///\r | |
1506 | /// [Bits 14] AVX512_VPOPCNTDQ. (Intel Xeon Phi only.).\r | |
1507 | ///\r | |
1508 | UINT32 AVX512_VPOPCNTDQ:1;\r | |
f8113e25 RN |
1509 | UINT32 Reserved7:1;\r |
1510 | ///\r | |
1511 | /// [Bits 16] Supports 5-level paging if 1.\r | |
1512 | ///\r | |
1513 | UINT32 FiveLevelPage:1;\r | |
14806d7b HW |
1514 | ///\r |
1515 | /// [Bits 21:17] The value of MAWAU used by the BNDLDX and BNDSTX instructions\r | |
1516 | /// in 64-bit mode.\r | |
1517 | ///\r | |
1518 | UINT32 MAWAU:5;\r | |
1519 | ///\r | |
ee27f6ee | 1520 | /// [Bit 22] RDPID and IA32_TSC_AUX are available if 1.\r |
14806d7b HW |
1521 | ///\r |
1522 | UINT32 RDPID:1;\r | |
1523 | UINT32 Reserved3:7;\r | |
1524 | ///\r | |
1525 | /// [Bit 30] Supports SGX Launch Configuration if 1.\r | |
1526 | ///\r | |
1527 | UINT32 SGX_LC:1;\r | |
1528 | UINT32 Reserved4:1;\r | |
57d16ba1 MK |
1529 | } Bits;\r |
1530 | ///\r | |
1531 | /// All bit fields as a 32-bit value\r | |
1532 | ///\r | |
1533 | UINT32 Uint32;\r | |
1534 | } CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_ECX;\r | |
1535 | \r | |
ee27f6ee ED |
1536 | /**\r |
1537 | CPUID Structured Extended Feature Flags Enumeration in EDX for CPUID leaf\r | |
1538 | #CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS sub leaf\r | |
1539 | #CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_SUB_LEAF_INFO.\r | |
1540 | **/\r | |
1541 | typedef union {\r | |
1542 | ///\r | |
1543 | /// Individual bit fields\r | |
1544 | ///\r | |
1545 | struct {\r | |
1546 | ///\r | |
1547 | /// [Bit 1:0] Reserved.\r | |
1548 | ///\r | |
1549 | UINT32 Reserved1:2;\r | |
1550 | ///\r | |
1551 | /// [Bit 2] AVX512_4VNNIW. (Intel Xeon Phi only.)\r | |
1552 | ///\r | |
1553 | UINT32 AVX512_4VNNIW:1;\r | |
1554 | ///\r | |
1555 | /// [Bit 3] AVX512_4FMAPS. (Intel Xeon Phi only.)\r | |
1556 | ///\r | |
1557 | UINT32 AVX512_4FMAPS:1;\r | |
1558 | ///\r | |
1559 | /// [Bit 25:4] Reserved.\r | |
1560 | ///\r | |
1561 | UINT32 Reserved2:22;\r | |
1562 | ///\r | |
1563 | /// [Bit 26] Enumerates support for indirect branch restricted speculation\r | |
1564 | /// (IBRS) and the indirect branch pre-dictor barrier (IBPB). Processors\r | |
1565 | /// that set this bit support the IA32_SPEC_CTRL MSR and the IA32_PRED_CMD\r | |
1566 | /// MSR. They allow software to set IA32_SPEC_CTRL[0] (IBRS) and\r | |
1567 | /// IA32_PRED_CMD[0] (IBPB).\r | |
1568 | ///\r | |
1569 | UINT32 EnumeratesSupportForIBRSAndIBPB:1;\r | |
1570 | ///\r | |
1571 | /// [Bit 27] Enumerates support for single thread indirect branch\r | |
1572 | /// predictors (STIBP). Processors that set this bit support the\r | |
1573 | /// IA32_SPEC_CTRL MSR. They allow software to set IA32_SPEC_CTRL[1]\r | |
1574 | /// (STIBP).\r | |
1575 | ///\r | |
1576 | UINT32 EnumeratesSupportForSTIBP:1;\r | |
1577 | ///\r | |
1578 | /// [Bit 28] Enumerates support for L1D_FLUSH. Processors that set this bit\r | |
1579 | /// support the IA32_FLUSH_CMD MSR. They allow software to set\r | |
1580 | /// IA32_FLUSH_CMD[0] (L1D_FLUSH).\r | |
1581 | ///\r | |
1582 | UINT32 EnumeratesSupportForL1D_FLUSH:1;\r | |
1583 | ///\r | |
1584 | /// [Bit 29] Enumerates support for the IA32_ARCH_CAPABILITIES MSR.\r | |
1585 | ///\r | |
1586 | UINT32 EnumeratesSupportForCapability:1;\r | |
1587 | ///\r | |
1588 | /// [Bit 30] Reserved.\r | |
1589 | ///\r | |
1590 | UINT32 Reserved3:1;\r | |
1591 | ///\r | |
1592 | /// [Bit 31] Enumerates support for Speculative Store Bypass Disable (SSBD).\r | |
1593 | /// Processors that set this bit sup-port the IA32_SPEC_CTRL MSR. They allow\r | |
1594 | /// software to set IA32_SPEC_CTRL[2] (SSBD).\r | |
1595 | ///\r | |
1596 | UINT32 EnumeratesSupportForSSBD:1;\r | |
1597 | } Bits;\r | |
1598 | ///\r | |
1599 | /// All bit fields as a 32-bit value\r | |
1600 | ///\r | |
1601 | UINT32 Uint32;\r | |
1602 | } CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_EDX;\r | |
57d16ba1 MK |
1603 | \r |
1604 | /**\r | |
1605 | CPUID Direct Cache Access Information\r | |
1606 | \r | |
1607 | @param EAX CPUID_DIRECT_CACHE_ACCESS_INFO (0x09)\r | |
1608 | \r | |
1609 | @retval EAX Value of bits [31:0] of IA32_PLATFORM_DCA_CAP MSR (address 1F8H).\r | |
1610 | @retval EBX Reserved.\r | |
1611 | @retval ECX Reserved.\r | |
1612 | @retval EDX Reserved.\r | |
1613 | \r | |
1614 | <b>Example usage</b>\r | |
1615 | @code\r | |
1616 | UINT32 Eax;\r | |
1617 | \r | |
1618 | AsmCpuid (CPUID_DIRECT_CACHE_ACCESS_INFO, &Eax, NULL, NULL, NULL);\r | |
1619 | @endcode\r | |
1620 | **/\r | |
1621 | #define CPUID_DIRECT_CACHE_ACCESS_INFO 0x09\r | |
1622 | \r | |
1623 | \r | |
1624 | /**\r | |
1625 | CPUID Architectural Performance Monitoring\r | |
1626 | \r | |
1627 | @param EAX CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING (0x0A)\r | |
1628 | \r | |
1629 | @retval EAX Architectural Performance Monitoring information described by\r | |
1630 | the type CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING_EAX.\r | |
1631 | @retval EBX Architectural Performance Monitoring information described by\r | |
1632 | the type CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING_EBX.\r | |
1633 | @retval ECX Reserved.\r | |
1634 | @retval EDX Architectural Performance Monitoring information described by\r | |
1635 | the type CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING_EDX.\r | |
1636 | \r | |
1637 | <b>Example usage</b>\r | |
1638 | @code\r | |
1639 | CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING_EAX Eax;\r | |
1640 | CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING_EBX Ebx;\r | |
1641 | CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING_EDX Edx;\r | |
1642 | \r | |
1643 | AsmCpuid (CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING, &Eax.Uint32, &Ebx.Uint32, NULL, &Edx.Uint32);\r | |
1644 | @endcode\r | |
1645 | **/\r | |
1646 | #define CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING 0x0A\r | |
1647 | \r | |
1648 | /**\r | |
1649 | CPUID Architectural Performance Monitoring EAX for CPUID leaf\r | |
1650 | #CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING.\r | |
1651 | **/\r | |
1652 | typedef union {\r | |
1653 | ///\r | |
1654 | /// Individual bit fields\r | |
1655 | ///\r | |
1656 | struct {\r | |
1657 | ///\r | |
1658 | /// [Bit 7:0] Version ID of architectural performance monitoring.\r | |
1659 | ///\r | |
1660 | UINT32 ArchPerfMonVerID:8;\r | |
1661 | ///\r | |
1662 | /// [Bits 15:8] Number of general-purpose performance monitoring counter\r | |
1663 | /// per logical processor.\r | |
1664 | ///\r | |
1665 | /// IA32_PERFEVTSELx MSRs start at address 186H and occupy a contiguous\r | |
1666 | /// block of MSR address space. Each performance event select register is\r | |
1667 | /// paired with a corresponding performance counter in the 0C1H address\r | |
1668 | /// block.\r | |
1669 | ///\r | |
1670 | UINT32 PerformanceMonitorCounters:8;\r | |
1671 | ///\r | |
1672 | /// [Bits 23:16] Bit width of general-purpose, performance monitoring counter.\r | |
1673 | ///\r | |
1674 | /// The bit width of an IA32_PMCx MSR. This the number of valid bits for\r | |
1675 | /// read operation. On write operations, the lower-order 32 bits of the MSR\r | |
1676 | /// may be written with any value, and the high-order bits are sign-extended\r | |
1677 | /// from the value of bit 31.\r | |
1678 | ///\r | |
1679 | UINT32 PerformanceMonitorCounterWidth:8;\r | |
1680 | ///\r | |
1681 | /// [Bits 31:24] Length of EBX bit vector to enumerate architectural\r | |
1682 | /// performance monitoring events.\r | |
1683 | ///\r | |
1684 | UINT32 EbxBitVectorLength:8;\r | |
1685 | } Bits;\r | |
1686 | ///\r | |
1687 | /// All bit fields as a 32-bit value\r | |
1688 | ///\r | |
1689 | UINT32 Uint32;\r | |
1690 | } CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING_EAX;\r | |
1691 | \r | |
1692 | /**\r | |
1693 | CPUID Architectural Performance Monitoring EBX for CPUID leaf\r | |
1694 | #CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING.\r | |
1695 | **/\r | |
1696 | typedef union {\r | |
1697 | ///\r | |
1698 | /// Individual bit fields\r | |
1699 | ///\r | |
1700 | struct {\r | |
1701 | ///\r | |
1702 | /// [Bit 0] Core cycle event not available if 1.\r | |
1703 | ///\r | |
1704 | UINT32 UnhaltedCoreCycles:1;\r | |
1705 | ///\r | |
1706 | /// [Bit 1] Instruction retired event not available if 1.\r | |
1707 | ///\r | |
1708 | UINT32 InstructionsRetired:1;\r | |
1709 | ///\r | |
1710 | /// [Bit 2] Reference cycles event not available if 1.\r | |
1711 | ///\r | |
1712 | UINT32 UnhaltedReferenceCycles:1;\r | |
1713 | ///\r | |
1714 | /// [Bit 3] Last-level cache reference event not available if 1.\r | |
1715 | ///\r | |
1716 | UINT32 LastLevelCacheReferences:1;\r | |
1717 | ///\r | |
1718 | /// [Bit 4] Last-level cache misses event not available if 1.\r | |
1719 | ///\r | |
1720 | UINT32 LastLevelCacheMisses:1;\r | |
1721 | ///\r | |
1722 | /// [Bit 5] Branch instruction retired event not available if 1.\r | |
1723 | ///\r | |
1724 | UINT32 BranchInstructionsRetired:1;\r | |
1725 | ///\r | |
1726 | /// [Bit 6] Branch mispredict retired event not available if 1.\r | |
1727 | ///\r | |
1728 | UINT32 AllBranchMispredictRetired:1;\r | |
1729 | UINT32 Reserved:25;\r | |
1730 | } Bits;\r | |
1731 | ///\r | |
1732 | /// All bit fields as a 32-bit value\r | |
1733 | ///\r | |
1734 | UINT32 Uint32;\r | |
1735 | } CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING_EBX;\r | |
1736 | \r | |
1737 | /**\r | |
1738 | CPUID Architectural Performance Monitoring EDX for CPUID leaf\r | |
1739 | #CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING.\r | |
1740 | **/\r | |
1741 | typedef union {\r | |
1742 | ///\r | |
1743 | /// Individual bit fields\r | |
1744 | ///\r | |
1745 | struct {\r | |
1746 | ///\r | |
1747 | /// [Bits 4:0] Number of fixed-function performance counters\r | |
1748 | /// (if Version ID > 1).\r | |
1749 | ///\r | |
1750 | UINT32 FixedFunctionPerformanceCounters:5;\r | |
1751 | ///\r | |
1752 | /// [Bits 12:5] Bit width of fixed-function performance counters\r | |
1753 | /// (if Version ID > 1).\r | |
1754 | ///\r | |
1755 | UINT32 FixedFunctionPerformanceCounterWidth:8;\r | |
ee27f6ee ED |
1756 | UINT32 Reserved1:2;\r |
1757 | ///\r | |
1758 | /// [Bits 15] AnyThread deprecation.\r | |
1759 | ///\r | |
1760 | UINT32 AnyThreadDeprecation:1;\r | |
1761 | UINT32 Reserved2:16;\r | |
57d16ba1 MK |
1762 | } Bits;\r |
1763 | ///\r | |
1764 | /// All bit fields as a 32-bit value\r | |
1765 | ///\r | |
1766 | UINT32 Uint32;\r | |
1767 | } CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING_EDX;\r | |
1768 | \r | |
1769 | \r | |
1770 | /**\r | |
1771 | CPUID Extended Topology Information\r | |
1772 | \r | |
1773 | @note\r | |
ee27f6ee ED |
1774 | CPUID leaf 1FH is a preferred superset to leaf 0BH. Intel recommends first\r |
1775 | checking for the existence of Leaf 1FH before using leaf 0BH.\r | |
57d16ba1 MK |
1776 | Most of Leaf 0BH output depends on the initial value in ECX. The EDX output\r |
1777 | of leaf 0BH is always valid and does not vary with input value in ECX. Output\r | |
ee27f6ee ED |
1778 | value in ECX[7:0] always equals input value in ECX[7:0].\r |
1779 | Sub-leaf index 0 enumerates SMT level. Each subsequent higher sub-leaf index\r | |
1780 | enumerates a higher-level topological entity in hierarchical order.\r | |
1781 | For sub-leaves that return an invalid level-type of 0 in ECX[15:8]; EAX and\r | |
1782 | EBX will return 0.\r | |
1783 | If an input value n in ECX returns the invalid level-type of 0 in ECX[15:8],\r | |
57d16ba1 MK |
1784 | other input values with ECX > n also return 0 in ECX[15:8].\r |
1785 | \r | |
1786 | @param EAX CPUID_EXTENDED_TOPOLOGY (0x0B)\r | |
1787 | @param ECX Level number\r | |
1788 | \r | |
1789 | @retval EAX Extended topology information described by the type\r | |
1790 | CPUID_EXTENDED_TOPOLOGY_EAX.\r | |
1791 | @retval EBX Extended topology information described by the type\r | |
1792 | CPUID_EXTENDED_TOPOLOGY_EBX.\r | |
1793 | @retval ECX Extended topology information described by the type\r | |
1794 | CPUID_EXTENDED_TOPOLOGY_ECX.\r | |
1795 | @retval EDX x2APIC ID the current logical processor.\r | |
1796 | \r | |
1797 | <b>Example usage</b>\r | |
1798 | @code\r | |
1799 | CPUID_EXTENDED_TOPOLOGY_EAX Eax;\r | |
1800 | CPUID_EXTENDED_TOPOLOGY_EBX Ebx;\r | |
1801 | CPUID_EXTENDED_TOPOLOGY_ECX Ecx;\r | |
1802 | UINT32 Edx;\r | |
1803 | UINT32 LevelNumber;\r | |
1804 | \r | |
1805 | LevelNumber = 0;\r | |
1806 | do {\r | |
1807 | AsmCpuidEx (\r | |
1808 | CPUID_EXTENDED_TOPOLOGY, LevelNumber,\r | |
1809 | &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx\r | |
1810 | );\r | |
1811 | LevelNumber++;\r | |
1812 | } while (Eax.Bits.ApicIdShift != 0);\r | |
1813 | @endcode\r | |
1814 | **/\r | |
1815 | #define CPUID_EXTENDED_TOPOLOGY 0x0B\r | |
1816 | \r | |
1817 | /**\r | |
1818 | CPUID Extended Topology Information EAX for CPUID leaf #CPUID_EXTENDED_TOPOLOGY.\r | |
1819 | **/\r | |
1820 | typedef union {\r | |
1821 | ///\r | |
1822 | /// Individual bit fields\r | |
1823 | ///\r | |
1824 | struct {\r | |
1825 | ///\r | |
1826 | /// [Bits 4:0] Number of bits to shift right on x2APIC ID to get a unique\r | |
1827 | /// topology ID of the next level type. All logical processors with the\r | |
1828 | /// same next level ID share current level.\r | |
1829 | ///\r | |
1830 | /// @note\r | |
1831 | /// Software should use this field (EAX[4:0]) to enumerate processor\r | |
1832 | /// topology of the system.\r | |
1833 | ///\r | |
1834 | UINT32 ApicIdShift:5;\r | |
1835 | UINT32 Reserved:27;\r | |
1836 | } Bits;\r | |
1837 | ///\r | |
1838 | /// All bit fields as a 32-bit value\r | |
1839 | ///\r | |
1840 | UINT32 Uint32;\r | |
1841 | } CPUID_EXTENDED_TOPOLOGY_EAX;\r | |
1842 | \r | |
1843 | /**\r | |
1844 | CPUID Extended Topology Information EBX for CPUID leaf #CPUID_EXTENDED_TOPOLOGY.\r | |
1845 | **/\r | |
1846 | typedef union {\r | |
1847 | ///\r | |
1848 | /// Individual bit fields\r | |
1849 | ///\r | |
1850 | struct {\r | |
1851 | ///\r | |
1852 | /// [Bits 15:0] Number of logical processors at this level type. The number\r | |
1853 | /// reflects configuration as shipped by Intel.\r | |
1854 | ///\r | |
1855 | /// @note\r | |
1856 | /// Software must not use EBX[15:0] to enumerate processor topology of the\r | |
1857 | /// system. This value in this field (EBX[15:0]) is only intended for\r | |
1858 | /// display/diagnostic purposes. The actual number of logical processors\r | |
1859 | /// available to BIOS/OS/Applications may be different from the value of\r | |
1860 | /// EBX[15:0], depending on software and platform hardware configurations.\r | |
1861 | ///\r | |
1862 | UINT32 LogicalProcessors:16;\r | |
1863 | UINT32 Reserved:16;\r | |
1864 | } Bits;\r | |
1865 | ///\r | |
1866 | /// All bit fields as a 32-bit value\r | |
1867 | ///\r | |
1868 | UINT32 Uint32;\r | |
1869 | } CPUID_EXTENDED_TOPOLOGY_EBX;\r | |
1870 | \r | |
1871 | /**\r | |
1872 | CPUID Extended Topology Information ECX for CPUID leaf #CPUID_EXTENDED_TOPOLOGY.\r | |
1873 | **/\r | |
1874 | typedef union {\r | |
1875 | ///\r | |
1876 | /// Individual bit fields\r | |
1877 | ///\r | |
1878 | struct {\r | |
1879 | ///\r | |
1880 | /// [Bits 7:0] Level number. Same value in ECX input.\r | |
1881 | ///\r | |
1882 | UINT32 LevelNumber:8;\r | |
1883 | ///\r | |
1884 | /// [Bits 15:8] Level type.\r | |
1885 | ///\r | |
1886 | /// @note\r | |
1887 | /// The value of the "level type" field is not related to level numbers in\r | |
1888 | /// any way, higher "level type" values do not mean higher levels.\r | |
1889 | ///\r | |
1890 | UINT32 LevelType:8;\r | |
1891 | UINT32 Reserved:16;\r | |
1892 | } Bits;\r | |
1893 | ///\r | |
1894 | /// All bit fields as a 32-bit value\r | |
1895 | ///\r | |
1896 | UINT32 Uint32;\r | |
1897 | } CPUID_EXTENDED_TOPOLOGY_ECX;\r | |
1898 | \r | |
1899 | ///\r | |
1900 | /// @{ Define value for CPUID_EXTENDED_TOPOLOGY_ECX.LevelType\r | |
1901 | ///\r | |
1902 | #define CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_INVALID 0x00\r | |
1903 | #define CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_SMT 0x01\r | |
1904 | #define CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_CORE 0x02\r | |
1905 | ///\r | |
1906 | /// @}\r | |
1907 | ///\r | |
1908 | \r | |
1909 | \r | |
1910 | /**\r | |
1911 | CPUID Extended State Information\r | |
1912 | \r | |
1913 | @param EAX CPUID_EXTENDED_STATE (0x0D)\r | |
1914 | @param ECX CPUID_EXTENDED_STATE_MAIN_LEAF (0x00).\r | |
1915 | CPUID_EXTENDED_STATE_SUB_LEAF (0x01).\r | |
1916 | CPUID_EXTENDED_STATE_SIZE_OFFSET (0x02).\r | |
1917 | Sub leafs 2..n based on supported bits in XCR0 or IA32_XSS_MSR.\r | |
1918 | **/\r | |
1919 | #define CPUID_EXTENDED_STATE 0x0D\r | |
1920 | \r | |
1921 | /**\r | |
1922 | CPUID Extended State Information Main Leaf\r | |
1923 | \r | |
1924 | @param EAX CPUID_EXTENDED_STATE (0x0D)\r | |
1925 | @param ECX CPUID_EXTENDED_STATE_MAIN_LEAF (0x00)\r | |
1926 | \r | |
1927 | @retval EAX Reports the supported bits of the lower 32 bits of XCR0. XCR0[n]\r | |
1928 | can be set to 1 only if EAX[n] is 1. The format of the extended\r | |
1929 | state main leaf is described by the type\r | |
1930 | CPUID_EXTENDED_STATE_MAIN_LEAF_EAX.\r | |
1931 | @retval EBX Maximum size (bytes, from the beginning of the XSAVE/XRSTOR save\r | |
1932 | area) required by enabled features in XCR0. May be different than\r | |
1933 | ECX if some features at the end of the XSAVE save area are not\r | |
1934 | enabled.\r | |
1935 | @retval ECX Maximum size (bytes, from the beginning of the XSAVE/XRSTOR save\r | |
1936 | area) of the XSAVE/XRSTOR save area required by all supported\r | |
14806d7b | 1937 | features in the processor, i.e., all the valid bit fields in XCR0.\r |
57d16ba1 MK |
1938 | @retval EDX Reports the supported bits of the upper 32 bits of XCR0.\r |
1939 | XCR0[n+32] can be set to 1 only if EDX[n] is 1.\r | |
1940 | \r | |
1941 | <b>Example usage</b>\r | |
1942 | @code\r | |
1943 | CPUID_EXTENDED_STATE_MAIN_LEAF_EAX Eax;\r | |
1944 | UINT32 Ebx;\r | |
1945 | UINT32 Ecx;\r | |
1946 | UINT32 Edx;\r | |
1947 | \r | |
1948 | AsmCpuidEx (\r | |
1949 | CPUID_EXTENDED_STATE, CPUID_EXTENDED_STATE_MAIN_LEAF,\r | |
1950 | &Eax.Uint32, &Ebx, &Ecx, &Edx\r | |
1951 | );\r | |
1952 | @endcode\r | |
1953 | **/\r | |
1954 | #define CPUID_EXTENDED_STATE_MAIN_LEAF 0x00\r | |
1955 | \r | |
1956 | /**\r | |
1957 | CPUID Extended State Information EAX for CPUID leaf #CPUID_EXTENDED_STATE,\r | |
1958 | sub-leaf #CPUID_EXTENDED_STATE_MAIN_LEAF.\r | |
1959 | **/\r | |
1960 | typedef union {\r | |
1961 | ///\r | |
1962 | /// Individual bit fields\r | |
1963 | ///\r | |
1964 | struct {\r | |
1965 | ///\r | |
1966 | /// [Bit 0] x87 state.\r | |
1967 | ///\r | |
1968 | UINT32 x87:1;\r | |
1969 | ///\r | |
1970 | /// [Bit 1] SSE state.\r | |
1971 | ///\r | |
1972 | UINT32 SSE:1;\r | |
1973 | ///\r | |
1974 | /// [Bit 2] AVX state.\r | |
1975 | ///\r | |
1976 | UINT32 AVX:1;\r | |
1977 | ///\r | |
1978 | /// [Bits 4:3] MPX state.\r | |
1979 | ///\r | |
1980 | UINT32 MPX:2;\r | |
1981 | ///\r | |
1982 | /// [Bits 7:5] AVX-512 state.\r | |
1983 | ///\r | |
1984 | UINT32 AVX_512:3;\r | |
1985 | ///\r | |
1986 | /// [Bit 8] Used for IA32_XSS.\r | |
1987 | ///\r | |
1988 | UINT32 IA32_XSS:1;\r | |
1989 | ///\r | |
1990 | /// [Bit 9] PKRU state.\r | |
1991 | ///\r | |
1992 | UINT32 PKRU:1;\r | |
ee27f6ee ED |
1993 | UINT32 Reserved1:3;\r |
1994 | ///\r | |
1995 | /// [Bit 13] Used for IA32_XSS, part 2.\r | |
1996 | ///\r | |
1997 | UINT32 IA32_XSS_2:1;\r | |
1998 | UINT32 Reserved2:18;\r | |
57d16ba1 MK |
1999 | } Bits;\r |
2000 | ///\r | |
2001 | /// All bit fields as a 32-bit value\r | |
2002 | ///\r | |
2003 | UINT32 Uint32;\r | |
2004 | } CPUID_EXTENDED_STATE_MAIN_LEAF_EAX;\r | |
2005 | \r | |
2006 | /**\r | |
2007 | CPUID Extended State Information Sub Leaf\r | |
2008 | \r | |
2009 | @param EAX CPUID_EXTENDED_STATE (0x0D)\r | |
2010 | @param ECX CPUID_EXTENDED_STATE_SUB_LEAF (0x01)\r | |
2011 | \r | |
2012 | @retval EAX The format of the extended state sub-leaf is described by the\r | |
2013 | type CPUID_EXTENDED_STATE_SUB_LEAF_EAX.\r | |
2014 | @retval EBX The size in bytes of the XSAVE area containing all states\r | |
2015 | enabled by XCRO | IA32_XSS.\r | |
2016 | @retval ECX The format of the extended state sub-leaf is described by the\r | |
2017 | type CPUID_EXTENDED_STATE_SUB_LEAF_ECX.\r | |
2018 | @retval EDX Reports the supported bits of the upper 32 bits of the\r | |
2019 | IA32_XSS MSR. IA32_XSS[n+32] can be set to 1 only if EDX[n] is 1.\r | |
2020 | \r | |
2021 | <b>Example usage</b>\r | |
2022 | @code\r | |
2023 | CPUID_EXTENDED_STATE_SUB_LEAF_EAX Eax;\r | |
2024 | UINT32 Ebx;\r | |
2025 | CPUID_EXTENDED_STATE_SUB_LEAF_ECX Ecx;\r | |
2026 | UINT32 Edx;\r | |
2027 | \r | |
2028 | AsmCpuidEx (\r | |
2029 | CPUID_EXTENDED_STATE, CPUID_EXTENDED_STATE_SUB_LEAF,\r | |
2030 | &Eax.Uint32, &Ebx, &Ecx.Uint32, &Edx\r | |
2031 | );\r | |
2032 | @endcode\r | |
2033 | **/\r | |
2034 | #define CPUID_EXTENDED_STATE_SUB_LEAF 0x01\r | |
2035 | \r | |
2036 | /**\r | |
2037 | CPUID Extended State Information EAX for CPUID leaf #CPUID_EXTENDED_STATE,\r | |
2038 | sub-leaf #CPUID_EXTENDED_STATE_SUB_LEAF.\r | |
2039 | **/\r | |
2040 | typedef union {\r | |
2041 | ///\r | |
2042 | /// Individual bit fields\r | |
2043 | ///\r | |
2044 | struct {\r | |
2045 | ///\r | |
2046 | /// [Bit 0] XSAVEOPT is available.\r | |
2047 | ///\r | |
2048 | UINT32 XSAVEOPT:1;\r | |
2049 | ///\r | |
2050 | /// [Bit 1] Supports XSAVEC and the compacted form of XRSTOR if set.\r | |
2051 | ///\r | |
2052 | UINT32 XSAVEC:1;\r | |
2053 | ///\r | |
2054 | /// [Bit 2] Supports XGETBV with ECX = 1 if set.\r | |
2055 | ///\r | |
2056 | UINT32 XGETBV:1;\r | |
2057 | ///\r | |
2058 | /// [Bit 3] Supports XSAVES/XRSTORS and IA32_XSS if set.\r | |
2059 | ///\r | |
2060 | UINT32 XSAVES:1;\r | |
2061 | UINT32 Reserved:28;\r | |
2062 | } Bits;\r | |
2063 | ///\r | |
2064 | /// All bit fields as a 32-bit value\r | |
2065 | ///\r | |
2066 | UINT32 Uint32;\r | |
2067 | } CPUID_EXTENDED_STATE_SUB_LEAF_EAX;\r | |
2068 | \r | |
2069 | /**\r | |
2070 | CPUID Extended State Information ECX for CPUID leaf #CPUID_EXTENDED_STATE,\r | |
2071 | sub-leaf #CPUID_EXTENDED_STATE_SUB_LEAF.\r | |
2072 | **/\r | |
2073 | typedef union {\r | |
2074 | ///\r | |
2075 | /// Individual bit fields\r | |
2076 | ///\r | |
2077 | struct {\r | |
2078 | ///\r | |
2079 | /// [Bits 7:0] Used for XCR0.\r | |
2080 | ///\r | |
2081 | UINT32 XCR0:1;\r | |
2082 | ///\r | |
2083 | /// [Bit 8] PT STate.\r | |
2084 | ///\r | |
2085 | UINT32 PT:1;\r | |
2086 | ///\r | |
2087 | /// [Bit 9] Used for XCR0.\r | |
2088 | ///\r | |
2089 | UINT32 XCR0_1:1;\r | |
ee27f6ee ED |
2090 | UINT32 Reserved1:3;\r |
2091 | ///\r | |
2092 | /// [Bit 13] HWP state.\r | |
2093 | ///\r | |
2094 | UINT32 HWPState:1;\r | |
2095 | UINT32 Reserved8:18;\r | |
57d16ba1 MK |
2096 | } Bits;\r |
2097 | ///\r | |
2098 | /// All bit fields as a 32-bit value\r | |
2099 | ///\r | |
2100 | UINT32 Uint32;\r | |
2101 | } CPUID_EXTENDED_STATE_SUB_LEAF_ECX;\r | |
2102 | \r | |
2103 | /**\r | |
2104 | CPUID Extended State Information Size and Offset Sub Leaf\r | |
2105 | \r | |
2106 | @note\r | |
2107 | Leaf 0DH output depends on the initial value in ECX.\r | |
2108 | Each sub-leaf index (starting at position 2) is supported if it corresponds to\r | |
2109 | a supported bit in either the XCR0 register or the IA32_XSS MSR.\r | |
2110 | If ECX contains an invalid sub-leaf index, EAX/EBX/ECX/EDX return 0. Sub-leaf\r | |
2111 | n (0 <= n <= 31) is invalid if sub-leaf 0 returns 0 in EAX[n] and sub-leaf 1\r | |
2112 | returns 0 in ECX[n]. Sub-leaf n (32 <= n <= 63) is invalid if sub-leaf 0\r | |
2113 | returns 0 in EDX[n-32] and sub-leaf 1 returns 0 in EDX[n-32].\r | |
2114 | \r | |
2115 | @param EAX CPUID_EXTENDED_STATE (0x0D)\r | |
2116 | @param ECX CPUID_EXTENDED_STATE_SIZE_OFFSET (0x02). Sub leafs 2..n based\r | |
2117 | on supported bits in XCR0 or IA32_XSS_MSR.\r | |
2118 | \r | |
2119 | @retval EAX The size in bytes (from the offset specified in EBX) of the save\r | |
2120 | area for an extended state feature associated with a valid\r | |
2121 | sub-leaf index, n.\r | |
2122 | @retval EBX The offset in bytes of this extended state component's save area\r | |
2123 | from the beginning of the XSAVE/XRSTOR area. This field reports\r | |
2124 | 0 if the sub-leaf index, n, does not map to a valid bit in the\r | |
2125 | XCR0 register.\r | |
2126 | @retval ECX The format of the extended state components's save area as\r | |
2127 | described by the type CPUID_EXTENDED_STATE_SIZE_OFFSET_ECX.\r | |
2128 | This field reports 0 if the sub-leaf index, n, is invalid.\r | |
2129 | @retval EDX This field reports 0 if the sub-leaf index, n, is invalid;\r | |
2130 | otherwise it is reserved.\r | |
2131 | \r | |
2132 | <b>Example usage</b>\r | |
2133 | @code\r | |
2134 | UINT32 Eax;\r | |
2135 | UINT32 Ebx;\r | |
2136 | CPUID_EXTENDED_STATE_SIZE_OFFSET_ECX Ecx;\r | |
2137 | UINT32 Edx;\r | |
2138 | UINTN SubLeaf;\r | |
2139 | \r | |
2140 | for (SubLeaf = CPUID_EXTENDED_STATE_SIZE_OFFSET; SubLeaf < 32; SubLeaf++) {\r | |
2141 | AsmCpuidEx (\r | |
2142 | CPUID_EXTENDED_STATE, SubLeaf,\r | |
2143 | &Eax, &Ebx, &Ecx.Uint32, &Edx\r | |
2144 | );\r | |
2145 | }\r | |
2146 | @endcode\r | |
2147 | **/\r | |
2148 | #define CPUID_EXTENDED_STATE_SIZE_OFFSET 0x02\r | |
2149 | \r | |
2150 | /**\r | |
2151 | CPUID Extended State Information ECX for CPUID leaf #CPUID_EXTENDED_STATE,\r | |
2152 | sub-leaf #CPUID_EXTENDED_STATE_SIZE_OFFSET.\r | |
2153 | **/\r | |
2154 | typedef union {\r | |
2155 | ///\r | |
2156 | /// Individual bit fields\r | |
2157 | ///\r | |
2158 | struct {\r | |
2159 | ///\r | |
2160 | /// [Bit 0] Is set if the bit n (corresponding to the sub-leaf index) is\r | |
2161 | /// supported in the IA32_XSS MSR; it is clear if bit n is instead supported\r | |
2162 | /// in XCR0.\r | |
2163 | ///\r | |
2164 | UINT32 XSS:1;\r | |
2165 | ///\r | |
2166 | /// [Bit 1] is set if, when the compacted format of an XSAVE area is used,\r | |
2167 | /// this extended state component located on the next 64-byte boundary\r | |
2168 | /// following the preceding state component (otherwise, it is located\r | |
2169 | /// immediately following the preceding state component).\r | |
2170 | ///\r | |
2171 | UINT32 Compacted:1;\r | |
2172 | UINT32 Reserved:30;\r | |
2173 | } Bits;\r | |
2174 | ///\r | |
2175 | /// All bit fields as a 32-bit value\r | |
2176 | ///\r | |
2177 | UINT32 Uint32;\r | |
2178 | } CPUID_EXTENDED_STATE_SIZE_OFFSET_ECX;\r | |
2179 | \r | |
2180 | \r | |
2181 | /**\r | |
14806d7b | 2182 | CPUID Intel Resource Director Technology (Intel RDT) Monitoring Information\r |
57d16ba1 | 2183 | \r |
14806d7b HW |
2184 | @param EAX CPUID_INTEL_RDT_MONITORING (0x0F)\r |
2185 | @param ECX CPUID_INTEL_RDT_MONITORING_ENUMERATION_SUB_LEAF (0x00).\r | |
2186 | CPUID_INTEL_RDT_MONITORING_L3_CACHE_SUB_LEAF (0x01).\r | |
57d16ba1 MK |
2187 | \r |
2188 | **/\r | |
14806d7b | 2189 | #define CPUID_INTEL_RDT_MONITORING 0x0F\r |
57d16ba1 MK |
2190 | \r |
2191 | /**\r | |
14806d7b HW |
2192 | CPUID Intel Resource Director Technology (Intel RDT) Monitoring Information\r |
2193 | Enumeration Sub-leaf\r | |
57d16ba1 | 2194 | \r |
14806d7b HW |
2195 | @param EAX CPUID_INTEL_RDT_MONITORING (0x0F)\r |
2196 | @param ECX CPUID_INTEL_RDT_MONITORING_ENUMERATION_SUB_LEAF (0x00)\r | |
57d16ba1 MK |
2197 | \r |
2198 | @retval EAX Reserved.\r | |
2199 | @retval EBX Maximum range (zero-based) of RMID within this physical\r | |
2200 | processor of all types.\r | |
2201 | @retval ECX Reserved.\r | |
14806d7b HW |
2202 | @retval EDX L3 Cache Intel RDT Monitoring Information Enumeration described by\r |
2203 | the type CPUID_INTEL_RDT_MONITORING_ENUMERATION_SUB_LEAF_EDX.\r | |
57d16ba1 MK |
2204 | \r |
2205 | <b>Example usage</b>\r | |
2206 | @code\r | |
2207 | UINT32 Ebx;\r | |
14806d7b | 2208 | CPUID_INTEL_RDT_MONITORING_ENUMERATION_SUB_LEAF_EDX Edx;\r |
57d16ba1 MK |
2209 | \r |
2210 | AsmCpuidEx (\r | |
14806d7b | 2211 | CPUID_INTEL_RDT_MONITORING, CPUID_INTEL_RDT_MONITORING_ENUMERATION_SUB_LEAF,\r |
57d16ba1 MK |
2212 | NULL, &Ebx, NULL, &Edx.Uint32\r |
2213 | );\r | |
2214 | @endcode\r | |
2215 | **/\r | |
14806d7b | 2216 | #define CPUID_INTEL_RDT_MONITORING_ENUMERATION_SUB_LEAF 0x00\r |
57d16ba1 MK |
2217 | \r |
2218 | /**\r | |
14806d7b HW |
2219 | CPUID Intel RDT Monitoring Information EDX for CPUID leaf\r |
2220 | #CPUID_INTEL_RDT_MONITORING, sub-leaf\r | |
2221 | #CPUID_INTEL_RDT_MONITORING_ENUMERATION_SUB_LEAF.\r | |
57d16ba1 MK |
2222 | **/\r |
2223 | typedef union {\r | |
2224 | ///\r | |
2225 | /// Individual bit fields\r | |
2226 | ///\r | |
2227 | struct {\r | |
2228 | UINT32 Reserved1:1;\r | |
2229 | ///\r | |
14806d7b | 2230 | /// [Bit 1] Supports L3 Cache Intel RDT Monitoring if 1.\r |
57d16ba1 | 2231 | ///\r |
14806d7b | 2232 | UINT32 L3CacheRDT_M:1;\r |
57d16ba1 MK |
2233 | UINT32 Reserved2:30;\r |
2234 | } Bits;\r | |
2235 | ///\r | |
2236 | /// All bit fields as a 32-bit value\r | |
2237 | ///\r | |
2238 | UINT32 Uint32;\r | |
14806d7b | 2239 | } CPUID_INTEL_RDT_MONITORING_ENUMERATION_SUB_LEAF_EDX;\r |
57d16ba1 MK |
2240 | \r |
2241 | /**\r | |
14806d7b | 2242 | CPUID L3 Cache Intel RDT Monitoring Capability Enumeration Sub-leaf\r |
57d16ba1 | 2243 | \r |
14806d7b HW |
2244 | @param EAX CPUID_INTEL_RDT_MONITORING (0x0F)\r |
2245 | @param ECX CPUID_INTEL_RDT_MONITORING_L3_CACHE_SUB_LEAF (0x01)\r | |
57d16ba1 MK |
2246 | \r |
2247 | @retval EAX Reserved.\r | |
2248 | @retval EBX Conversion factor from reported IA32_QM_CTR value to occupancy metric (bytes).\r | |
2249 | @retval ECX Maximum range (zero-based) of RMID of this resource type.\r | |
14806d7b HW |
2250 | @retval EDX L3 Cache Intel RDT Monitoring Capability information described by the\r |
2251 | type CPUID_INTEL_RDT_MONITORING_L3_CACHE_SUB_LEAF_EDX.\r | |
57d16ba1 MK |
2252 | \r |
2253 | <b>Example usage</b>\r | |
2254 | @code\r | |
14806d7b HW |
2255 | UINT32 Ebx;\r |
2256 | UINT32 Ecx;\r | |
2257 | CPUID_INTEL_RDT_MONITORING_L3_CACHE_SUB_LEAF_EDX Edx;\r | |
57d16ba1 MK |
2258 | \r |
2259 | AsmCpuidEx (\r | |
14806d7b | 2260 | CPUID_INTEL_RDT_MONITORING, CPUID_INTEL_RDT_MONITORING_L3_CACHE_SUB_LEAF,\r |
57d16ba1 MK |
2261 | NULL, &Ebx, &Ecx, &Edx.Uint32\r |
2262 | );\r | |
2263 | @endcode\r | |
2264 | **/\r | |
14806d7b | 2265 | #define CPUID_INTEL_RDT_MONITORING_L3_CACHE_SUB_LEAF 0x01\r |
57d16ba1 MK |
2266 | \r |
2267 | /**\r | |
14806d7b HW |
2268 | CPUID L3 Cache Intel RDT Monitoring Capability Information EDX for CPUID leaf\r |
2269 | #CPUID_INTEL_RDT_MONITORING, sub-leaf\r | |
2270 | #CPUID_INTEL_RDT_MONITORING_L3_CACHE_SUB_LEAF.\r | |
57d16ba1 MK |
2271 | **/\r |
2272 | typedef union {\r | |
2273 | ///\r | |
2274 | /// Individual bit fields\r | |
2275 | ///\r | |
2276 | struct {\r | |
2277 | ///\r | |
2278 | /// [Bit 0] Supports L3 occupancy monitoring if 1.\r | |
2279 | ///\r | |
2280 | UINT32 L3CacheOccupancyMonitoring:1;\r | |
14806d7b HW |
2281 | ///\r |
2282 | /// [Bit 1] Supports L3 Total Bandwidth monitoring if 1.\r | |
2283 | ///\r | |
2284 | UINT32 L3CacheTotalBandwidthMonitoring:1;\r | |
2285 | ///\r | |
2286 | /// [Bit 2] Supports L3 Local Bandwidth monitoring if 1.\r | |
2287 | ///\r | |
2288 | UINT32 L3CacheLocalBandwidthMonitoring:1;\r | |
2289 | UINT32 Reserved:29;\r | |
57d16ba1 MK |
2290 | } Bits;\r |
2291 | ///\r | |
2292 | /// All bit fields as a 32-bit value\r | |
2293 | ///\r | |
2294 | UINT32 Uint32;\r | |
14806d7b | 2295 | } CPUID_INTEL_RDT_MONITORING_L3_CACHE_SUB_LEAF_EDX;\r |
57d16ba1 MK |
2296 | \r |
2297 | \r | |
2298 | /**\r | |
14806d7b | 2299 | CPUID Intel Resource Director Technology (Intel RDT) Allocation Information\r |
57d16ba1 | 2300 | \r |
14806d7b HW |
2301 | @param EAX CPUID_INTEL_RDT_ALLOCATION (0x10).\r |
2302 | @param ECX CPUID_INTEL_RDT_ALLOCATION_ENUMERATION_SUB_LEAF (0x00).\r | |
2303 | CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF (0x01).\r | |
2304 | CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF (0x02).\r | |
57d16ba1 | 2305 | **/\r |
14806d7b | 2306 | #define CPUID_INTEL_RDT_ALLOCATION 0x10\r |
57d16ba1 MK |
2307 | \r |
2308 | /**\r | |
14806d7b | 2309 | Intel Resource Director Technology (Intel RDT) Allocation Enumeration Sub-leaf\r |
57d16ba1 | 2310 | \r |
14806d7b HW |
2311 | @param EAX CPUID_INTEL_RDT_ALLOCATION (0x10)\r |
2312 | @param ECX CPUID_INTEL_RDT_ALLOCATION_ENUMERATION_SUB_LEAF (0x00).\r | |
57d16ba1 MK |
2313 | \r |
2314 | @retval EAX Reserved.\r | |
14806d7b HW |
2315 | @retval EBX L3 and L2 Cache Allocation Technology information described by\r |
2316 | the type CPUID_INTEL_RDT_ALLOCATION_ENUMERATION_SUB_LEAF_EBX.\r | |
57d16ba1 MK |
2317 | @retval ECX Reserved.\r |
2318 | @retval EDX Reserved.\r | |
2319 | \r | |
2320 | <b>Example usage</b>\r | |
2321 | @code\r | |
14806d7b | 2322 | CPUID_INTEL_RDT_ALLOCATION_ENUMERATION_SUB_LEAF_EBX Ebx;\r |
57d16ba1 MK |
2323 | \r |
2324 | AsmCpuidEx (\r | |
14806d7b | 2325 | CPUID_INTEL_RDT_ALLOCATION, CPUID_INTEL_RDT_ALLOCATION_ENUMERATION_SUB_LEAF,\r |
57d16ba1 MK |
2326 | NULL, &Ebx.Uint32, NULL, NULL\r |
2327 | );\r | |
2328 | @endcode\r | |
2329 | **/\r | |
14806d7b | 2330 | #define CPUID_INTEL_RDT_ALLOCATION_ENUMERATION_SUB_LEAF 0x00\r |
57d16ba1 MK |
2331 | \r |
2332 | /**\r | |
14806d7b HW |
2333 | CPUID L3 and L2 Cache Allocation Support Information EBX for CPUID leaf\r |
2334 | #CPUID_INTEL_RDT_ALLOCATION, sub-leaf\r | |
2335 | #CPUID_INTEL_RDT_ALLOCATION_ENUMERATION_SUB_LEAF.\r | |
57d16ba1 MK |
2336 | **/\r |
2337 | typedef union {\r | |
2338 | ///\r | |
2339 | /// Individual bit fields\r | |
2340 | ///\r | |
2341 | struct {\r | |
2342 | UINT32 Reserved1:1;\r | |
2343 | ///\r | |
14806d7b | 2344 | /// [Bit 1] Supports L3 Cache Allocation Technology if 1.\r |
57d16ba1 | 2345 | ///\r |
14806d7b HW |
2346 | UINT32 L3CacheAllocation:1;\r |
2347 | ///\r | |
2348 | /// [Bit 2] Supports L2 Cache Allocation Technology if 1.\r | |
2349 | ///\r | |
2350 | UINT32 L2CacheAllocation:1;\r | |
ee27f6ee ED |
2351 | ///\r |
2352 | /// [Bit 3] Supports Memory Bandwidth Allocation if 1.\r | |
2353 | ///\r | |
2354 | UINT32 MemoryBandwidth:1;\r | |
2355 | UINT32 Reserved3:28;\r | |
57d16ba1 MK |
2356 | } Bits;\r |
2357 | ///\r | |
2358 | /// All bit fields as a 32-bit value\r | |
2359 | ///\r | |
2360 | UINT32 Uint32;\r | |
14806d7b | 2361 | } CPUID_INTEL_RDT_ALLOCATION_ENUMERATION_SUB_LEAF_EBX;\r |
57d16ba1 MK |
2362 | \r |
2363 | \r | |
2364 | /**\r | |
14806d7b | 2365 | L3 Cache Allocation Technology Enumeration Sub-leaf\r |
57d16ba1 | 2366 | \r |
14806d7b HW |
2367 | @param EAX CPUID_INTEL_RDT_ALLOCATION (0x10)\r |
2368 | @param ECX CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF (0x01)\r | |
57d16ba1 | 2369 | \r |
14806d7b HW |
2370 | @retval EAX RESID L3 Cache Allocation Technology information described by\r |
2371 | the type CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF_EAX.\r | |
57d16ba1 | 2372 | @retval EBX Bit-granular map of isolation/contention of allocation units.\r |
14806d7b HW |
2373 | @retval ECX RESID L3 Cache Allocation Technology information described by\r |
2374 | the type CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF_ECX.\r | |
2375 | @retval EDX RESID L3 Cache Allocation Technology information described by\r | |
2376 | the type CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF_EDX.\r | |
57d16ba1 MK |
2377 | \r |
2378 | <b>Example usage</b>\r | |
2379 | @code\r | |
14806d7b | 2380 | CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF_EAX Eax;\r |
57d16ba1 | 2381 | UINT32 Ebx;\r |
14806d7b HW |
2382 | CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF_ECX Ecx;\r |
2383 | CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF_EDX Edx;\r | |
57d16ba1 MK |
2384 | \r |
2385 | AsmCpuidEx (\r | |
14806d7b | 2386 | CPUID_INTEL_RDT_ALLOCATION, CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF,\r |
57d16ba1 MK |
2387 | &Eax.Uint32, &Ebx, &Ecx.Uint32, &Edx.Uint32\r |
2388 | );\r | |
2389 | @endcode\r | |
2390 | **/\r | |
14806d7b | 2391 | #define CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF 0x01\r |
57d16ba1 MK |
2392 | \r |
2393 | /**\r | |
14806d7b HW |
2394 | CPUID L3 Cache Allocation Technology Information EAX for CPUID leaf\r |
2395 | #CPUID_INTEL_RDT_ALLOCATION, sub-leaf\r | |
2396 | #CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF.\r | |
57d16ba1 MK |
2397 | **/\r |
2398 | typedef union {\r | |
2399 | ///\r | |
2400 | /// Individual bit fields\r | |
2401 | ///\r | |
2402 | struct {\r | |
2403 | ///\r | |
14806d7b HW |
2404 | /// [Bits 4:0] Length of the capacity bit mask for the corresponding ResID\r |
2405 | /// using minus-one notation.\r | |
57d16ba1 | 2406 | ///\r |
14806d7b HW |
2407 | UINT32 CapacityLength:5;\r |
2408 | UINT32 Reserved:27;\r | |
57d16ba1 MK |
2409 | } Bits;\r |
2410 | ///\r | |
2411 | /// All bit fields as a 32-bit value\r | |
2412 | ///\r | |
2413 | UINT32 Uint32;\r | |
14806d7b | 2414 | } CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF_EAX;\r |
57d16ba1 MK |
2415 | \r |
2416 | /**\r | |
14806d7b HW |
2417 | CPUID L3 Cache Allocation Technology Information ECX for CPUID leaf\r |
2418 | #CPUID_INTEL_RDT_ALLOCATION, sub-leaf\r | |
2419 | #CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF.\r | |
57d16ba1 MK |
2420 | **/\r |
2421 | typedef union {\r | |
2422 | ///\r | |
2423 | /// Individual bit fields\r | |
2424 | ///\r | |
2425 | struct {\r | |
ee27f6ee | 2426 | UINT32 Reserved3:2;\r |
57d16ba1 MK |
2427 | ///\r |
2428 | /// [Bit 2] Code and Data Prioritization Technology supported if 1.\r | |
2429 | ///\r | |
2430 | UINT32 CodeDataPrioritization:1;\r | |
2431 | UINT32 Reserved2:29;\r | |
2432 | } Bits;\r | |
2433 | ///\r | |
2434 | /// All bit fields as a 32-bit value\r | |
2435 | ///\r | |
2436 | UINT32 Uint32;\r | |
14806d7b HW |
2437 | } CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF_ECX;\r |
2438 | \r | |
2439 | /**\r | |
2440 | CPUID L3 Cache Allocation Technology Information EDX for CPUID leaf\r | |
2441 | #CPUID_INTEL_RDT_ALLOCATION, sub-leaf\r | |
2442 | #CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF.\r | |
2443 | **/\r | |
2444 | typedef union {\r | |
2445 | ///\r | |
2446 | /// Individual bit fields\r | |
2447 | ///\r | |
2448 | struct {\r | |
2449 | ///\r | |
2450 | /// [Bits 15:0] Highest COS number supported for this ResID.\r | |
2451 | ///\r | |
2452 | UINT32 HighestCosNumber:16;\r | |
2453 | UINT32 Reserved:16;\r | |
2454 | } Bits;\r | |
2455 | ///\r | |
2456 | /// All bit fields as a 32-bit value\r | |
2457 | ///\r | |
2458 | UINT32 Uint32;\r | |
2459 | } CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF_EDX;\r | |
2460 | \r | |
2461 | /**\r | |
2462 | L2 Cache Allocation Technology Enumeration Sub-leaf\r | |
2463 | \r | |
2464 | @param EAX CPUID_INTEL_RDT_ALLOCATION (0x10)\r | |
2465 | @param ECX CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF (0x02)\r | |
2466 | \r | |
2467 | @retval EAX RESID L2 Cache Allocation Technology information described by\r | |
2468 | the type CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF_EAX.\r | |
2469 | @retval EBX Bit-granular map of isolation/contention of allocation units.\r | |
2470 | @retval ECX Reserved.\r | |
2471 | @retval EDX RESID L2 Cache Allocation Technology information described by\r | |
2472 | the type CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF_EDX.\r | |
2473 | \r | |
2474 | <b>Example usage</b>\r | |
2475 | @code\r | |
2476 | CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF_EAX Eax;\r | |
2477 | UINT32 Ebx;\r | |
2478 | CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF_EDX Edx;\r | |
2479 | \r | |
2480 | AsmCpuidEx (\r | |
2481 | CPUID_INTEL_RDT_ALLOCATION, CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF,\r | |
2482 | &Eax.Uint32, &Ebx, NULL, &Edx.Uint32\r | |
2483 | );\r | |
2484 | @endcode\r | |
2485 | **/\r | |
2486 | #define CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF 0x02\r | |
57d16ba1 MK |
2487 | \r |
2488 | /**\r | |
14806d7b HW |
2489 | CPUID L2 Cache Allocation Technology Information EAX for CPUID leaf\r |
2490 | #CPUID_INTEL_RDT_ALLOCATION, sub-leaf\r | |
2491 | #CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF.\r | |
2492 | **/\r | |
2493 | typedef union {\r | |
2494 | ///\r | |
2495 | /// Individual bit fields\r | |
2496 | ///\r | |
2497 | struct {\r | |
2498 | ///\r | |
2499 | /// [Bits 4:0] Length of the capacity bit mask for the corresponding ResID\r | |
2500 | /// using minus-one notation.\r | |
2501 | ///\r | |
2502 | UINT32 CapacityLength:5;\r | |
2503 | UINT32 Reserved:27;\r | |
2504 | } Bits;\r | |
2505 | ///\r | |
2506 | /// All bit fields as a 32-bit value\r | |
2507 | ///\r | |
2508 | UINT32 Uint32;\r | |
2509 | } CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF_EAX;\r | |
2510 | \r | |
2511 | /**\r | |
2512 | CPUID L2 Cache Allocation Technology Information EDX for CPUID leaf\r | |
2513 | #CPUID_INTEL_RDT_ALLOCATION, sub-leaf\r | |
2514 | #CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF.\r | |
57d16ba1 MK |
2515 | **/\r |
2516 | typedef union {\r | |
2517 | ///\r | |
2518 | /// Individual bit fields\r | |
2519 | ///\r | |
2520 | struct {\r | |
2521 | ///\r | |
2522 | /// [Bits 15:0] Highest COS number supported for this ResID.\r | |
2523 | ///\r | |
2524 | UINT32 HighestCosNumber:16;\r | |
2525 | UINT32 Reserved:16;\r | |
2526 | } Bits;\r | |
2527 | ///\r | |
2528 | /// All bit fields as a 32-bit value\r | |
2529 | ///\r | |
2530 | UINT32 Uint32;\r | |
14806d7b | 2531 | } CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF_EDX;\r |
57d16ba1 | 2532 | \r |
ee27f6ee ED |
2533 | /**\r |
2534 | Memory Bandwidth Allocation Enumeration Sub-leaf\r | |
2535 | \r | |
2536 | @param EAX CPUID_INTEL_RDT_ALLOCATION (0x10)\r | |
2537 | @param ECX CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF (0x03)\r | |
2538 | \r | |
2539 | @retval EAX RESID memory bandwidth Allocation Technology information\r | |
2540 | described by the type\r | |
2541 | CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF_EAX.\r | |
2542 | @retval EBX Reserved.\r | |
2543 | @retval ECX RESID memory bandwidth Allocation Technology information\r | |
2544 | described by the type\r | |
2545 | CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF_ECX.\r | |
2546 | @retval EDX RESID memory bandwidth Allocation Technology information\r | |
2547 | described by the type\r | |
2548 | CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF_EDX.\r | |
2549 | \r | |
2550 | <b>Example usage</b>\r | |
2551 | @code\r | |
2552 | CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF_EAX Eax;\r | |
2553 | UINT32 Ebx;\r | |
2554 | CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF_ECX Ecx;\r | |
2555 | CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF_EDX Edx;\r | |
2556 | \r | |
2557 | \r | |
2558 | AsmCpuidEx (\r | |
2559 | CPUID_INTEL_RDT_ALLOCATION, CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF,\r | |
2560 | &Eax.Uint32, &Ebx, NULL, &Edx.Uint32\r | |
2561 | );\r | |
2562 | @endcode\r | |
2563 | **/\r | |
2564 | #define CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF 0x03\r | |
2565 | \r | |
2566 | /**\r | |
2567 | CPUID memory bandwidth Allocation Technology Information EAX for CPUID leaf\r | |
2568 | #CPUID_INTEL_RDT_ALLOCATION, sub-leaf\r | |
2569 | #CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF.\r | |
2570 | **/\r | |
2571 | typedef union {\r | |
2572 | ///\r | |
2573 | /// Individual bit fields\r | |
2574 | ///\r | |
2575 | struct {\r | |
2576 | ///\r | |
2577 | /// [Bits 11:0] Reports the maximum MBA throttling value supported for\r | |
2578 | /// the corresponding ResID using minus-one notation.\r | |
2579 | ///\r | |
2580 | UINT32 MaximumMBAThrottling:12;\r | |
2581 | UINT32 Reserved:20;\r | |
2582 | } Bits;\r | |
2583 | ///\r | |
2584 | /// All bit fields as a 32-bit value\r | |
2585 | ///\r | |
2586 | UINT32 Uint32;\r | |
2587 | } CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF_EAX;\r | |
2588 | \r | |
2589 | /**\r | |
2590 | CPUID memory bandwidth Allocation Technology Information ECX for CPUID leaf\r | |
2591 | #CPUID_INTEL_RDT_ALLOCATION, sub-leaf\r | |
2592 | #CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF.\r | |
2593 | **/\r | |
2594 | typedef union {\r | |
2595 | ///\r | |
2596 | /// Individual bit fields\r | |
2597 | ///\r | |
2598 | struct {\r | |
2599 | ///\r | |
2600 | /// [Bits 1:0] Reserved.\r | |
2601 | ///\r | |
2602 | UINT32 Reserved1:2;\r | |
2603 | ///\r | |
2604 | /// [Bits 3] Reports whether the response of the delay values is linear.\r | |
2605 | ///\r | |
2606 | UINT32 Liner:1;\r | |
2607 | UINT32 Reserved2:29;\r | |
2608 | } Bits;\r | |
2609 | ///\r | |
2610 | /// All bit fields as a 32-bit value\r | |
2611 | ///\r | |
2612 | UINT32 Uint32;\r | |
2613 | } CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF_ECX;\r | |
2614 | \r | |
2615 | /**\r | |
2616 | CPUID memory bandwidth Allocation Technology Information EDX for CPUID leaf\r | |
2617 | #CPUID_INTEL_RDT_ALLOCATION, sub-leaf\r | |
2618 | #CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF.\r | |
2619 | **/\r | |
2620 | typedef union {\r | |
2621 | ///\r | |
2622 | /// Individual bit fields\r | |
2623 | ///\r | |
2624 | struct {\r | |
2625 | ///\r | |
2626 | /// [Bits 15:0] Highest COS number supported for this ResID.\r | |
2627 | ///\r | |
2628 | UINT32 HighestCosNumber:16;\r | |
2629 | UINT32 Reserved:16;\r | |
2630 | } Bits;\r | |
2631 | ///\r | |
2632 | /// All bit fields as a 32-bit value\r | |
2633 | ///\r | |
2634 | UINT32 Uint32;\r | |
2635 | } CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF_EDX;\r | |
57d16ba1 | 2636 | \r |
c606a9a5 JF |
2637 | /**\r |
2638 | Intel SGX resource capability and configuration.\r | |
2639 | See Section 37.7.2 "Intel(R) SGX Resource Enumeration Leaves".\r | |
2640 | \r | |
2641 | If CPUID.(EAX=07H, ECX=0H):EBX.SGX = 1, the processor also supports querying\r | |
2642 | CPUID with EAX=12H on Intel SGX resource capability and configuration.\r | |
2643 | \r | |
2644 | @param EAX CPUID_INTEL_SGX (0x12)\r | |
2645 | @param ECX CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF (0x00).\r | |
2646 | CPUID_INTEL_SGX_CAPABILITIES_1_SUB_LEAF (0x01).\r | |
2647 | CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF (0x02).\r | |
2648 | Sub leafs 2..n based on the sub-leaf-type encoding (returned in EAX[3:0])\r | |
2649 | until the sub-leaf type is invalid.\r | |
2650 | \r | |
2651 | **/\r | |
2652 | #define CPUID_INTEL_SGX 0x12\r | |
2653 | \r | |
2654 | /**\r | |
2655 | Sub-Leaf 0 Enumeration of Intel SGX Capabilities.\r | |
2656 | Enumerates Intel SGX capability, including enclave instruction opcode support.\r | |
2657 | \r | |
2658 | @param EAX CPUID_INTEL_SGX (0x12)\r | |
2659 | @param ECX CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF (0x00)\r | |
2660 | \r | |
2661 | @retval EAX The format of Sub-Leaf 0 Enumeration of Intel SGX Capabilities is\r | |
2662 | described by the type CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF_EAX.\r | |
2663 | @retval EBX MISCSELECT: Reports the bit vector of supported extended features\r | |
2664 | that can be written to the MISC region of the SSA.\r | |
2665 | @retval ECX Reserved.\r | |
2666 | @retval EDX The format of Sub-Leaf 0 Enumeration of Intel SGX Capabilities is\r | |
2667 | described by the type CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF_EDX.\r | |
2668 | \r | |
2669 | <b>Example usage</b>\r | |
2670 | @code\r | |
2671 | CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF_EAX Eax;\r | |
2672 | UINT32 Ebx;\r | |
2673 | CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF_EDX Edx;\r | |
2674 | \r | |
2675 | AsmCpuidEx (\r | |
2676 | CPUID_INTEL_SGX, CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF,\r | |
2677 | &Eax.Uint32, &Ebx, NULL, &Edx.Uint32\r | |
2678 | );\r | |
2679 | @endcode\r | |
2680 | **/\r | |
2681 | #define CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF 0x00\r | |
2682 | \r | |
2683 | /**\r | |
2684 | Sub-Leaf 0 Enumeration of Intel SGX Capabilities EAX for CPUID leaf #CPUID_INTEL_SGX,\r | |
2685 | sub-leaf #CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF.\r | |
2686 | **/\r | |
2687 | typedef union {\r | |
2688 | ///\r | |
2689 | /// Individual bit fields\r | |
2690 | ///\r | |
2691 | struct {\r | |
2692 | ///\r | |
2693 | /// [Bit 0] If 1, indicates leaf functions of SGX1 instruction are supported.\r | |
2694 | ///\r | |
2695 | UINT32 SGX1:1;\r | |
2696 | ///\r | |
2697 | /// [Bit 1] If 1, indicates leaf functions of SGX2 instruction are supported.\r | |
2698 | ///\r | |
2699 | UINT32 SGX2:1;\r | |
ee27f6ee ED |
2700 | UINT32 Reserved1:3;\r |
2701 | ///\r | |
2702 | /// [Bit 5] If 1, indicates Intel SGX supports ENCLV instruction leaves\r | |
2703 | /// EINCVIRTCHILD, EDECVIRTCHILD, and ESETCONTEXT.\r | |
2704 | ///\r | |
2705 | UINT32 ENCLV:1;\r | |
2706 | ///\r | |
2707 | /// [Bit 6] If 1, indicates Intel SGX supports ENCLS instruction leaves ETRACKC,\r | |
2708 | /// ERDINFO, ELDBC, and ELDUC.\r | |
2709 | ///\r | |
2710 | UINT32 ENCLS:1;\r | |
2711 | UINT32 Reserved2:25;\r | |
c606a9a5 JF |
2712 | } Bits;\r |
2713 | ///\r | |
2714 | /// All bit fields as a 32-bit value\r | |
2715 | ///\r | |
2716 | UINT32 Uint32;\r | |
2717 | } CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF_EAX;\r | |
2718 | \r | |
2719 | /**\r | |
2720 | Sub-Leaf 0 Enumeration of Intel SGX Capabilities EDX for CPUID leaf #CPUID_INTEL_SGX,\r | |
2721 | sub-leaf #CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF.\r | |
2722 | **/\r | |
2723 | typedef union {\r | |
2724 | ///\r | |
2725 | /// Individual bit fields\r | |
2726 | ///\r | |
2727 | struct {\r | |
2728 | ///\r | |
2729 | /// [Bit 7:0] The maximum supported enclave size is 2^(EDX[7:0]) bytes\r | |
2730 | /// when not in 64-bit mode.\r | |
2731 | ///\r | |
2732 | UINT32 MaxEnclaveSize_Not64:8;\r | |
2733 | ///\r | |
2734 | /// [Bit 15:8] The maximum supported enclave size is 2^(EDX[15:8]) bytes\r | |
2735 | /// when operating in 64-bit mode.\r | |
2736 | ///\r | |
2737 | UINT32 MaxEnclaveSize_64:8;\r | |
2738 | UINT32 Reserved:16;\r | |
2739 | } Bits;\r | |
2740 | ///\r | |
2741 | /// All bit fields as a 32-bit value\r | |
2742 | ///\r | |
2743 | UINT32 Uint32;\r | |
2744 | } CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF_EDX;\r | |
2745 | \r | |
2746 | \r | |
2747 | /**\r | |
2748 | Sub-Leaf 1 Enumeration of Intel SGX Capabilities.\r | |
2749 | Enumerates Intel SGX capability of processor state configuration and enclave\r | |
2750 | configuration in the SECS structure.\r | |
2751 | \r | |
2752 | @param EAX CPUID_INTEL_SGX (0x12)\r | |
2753 | @param ECX CPUID_INTEL_SGX_CAPABILITIES_1_SUB_LEAF (0x01)\r | |
2754 | \r | |
2755 | @retval EAX Report the valid bits of SECS.ATTRIBUTES[31:0] that software can\r | |
2756 | set with ECREATE. SECS.ATTRIBUTES[n] can be set to 1 using ECREATE\r | |
2757 | only if EAX[n] is 1, where n < 32.\r | |
2758 | @retval EBX Report the valid bits of SECS.ATTRIBUTES[63:32] that software can\r | |
2759 | set with ECREATE. SECS.ATTRIBUTES[n+32] can be set to 1 using ECREATE\r | |
2760 | only if EBX[n] is 1, where n < 32.\r | |
2761 | @retval ECX Report the valid bits of SECS.ATTRIBUTES[95:64] that software can\r | |
2762 | set with ECREATE. SECS.ATTRIBUTES[n+64] can be set to 1 using ECREATE\r | |
2763 | only if ECX[n] is 1, where n < 32.\r | |
2764 | @retval EDX Report the valid bits of SECS.ATTRIBUTES[127:96] that software can\r | |
2765 | set with ECREATE. SECS.ATTRIBUTES[n+96] can be set to 1 using ECREATE\r | |
2766 | only if EDX[n] is 1, where n < 32.\r | |
2767 | \r | |
2768 | <b>Example usage</b>\r | |
2769 | @code\r | |
2770 | UINT32 Eax;\r | |
2771 | UINT32 Ebx;\r | |
2772 | UINT32 Ecx;\r | |
2773 | UINT32 Edx;\r | |
2774 | \r | |
2775 | AsmCpuidEx (\r | |
2776 | CPUID_INTEL_SGX, CPUID_INTEL_SGX_CAPABILITIES_1_SUB_LEAF,\r | |
2777 | &Eax, &Ebx, &Ecx, &Edx\r | |
2778 | );\r | |
2779 | @endcode\r | |
2780 | **/\r | |
2781 | #define CPUID_INTEL_SGX_CAPABILITIES_1_SUB_LEAF 0x01\r | |
2782 | \r | |
2783 | \r | |
2784 | /**\r | |
2785 | Sub-Leaf Index 2 or Higher Enumeration of Intel SGX Resources.\r | |
2786 | Enumerates available EPC resources.\r | |
2787 | \r | |
2788 | @param EAX CPUID_INTEL_SGX (0x12)\r | |
2789 | @param ECX CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF (0x02)\r | |
2790 | \r | |
2791 | @retval EAX The format of Sub-Leaf Index 2 or Higher Enumeration of Intel SGX\r | |
2792 | Resources is described by the type\r | |
2793 | CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_EAX.\r | |
2794 | @retval EBX The format of Sub-Leaf Index 2 or Higher Enumeration of Intel SGX\r | |
2795 | Resources is described by the type\r | |
2796 | CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_EBX.\r | |
2797 | @retval EDX The format of Sub-Leaf Index 2 or Higher Enumeration of Intel SGX\r | |
2798 | Resources is described by the type\r | |
2799 | CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_ECX.\r | |
2800 | @retval EDX The format of Sub-Leaf Index 2 or Higher Enumeration of Intel SGX\r | |
2801 | Resources is described by the type\r | |
2802 | CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_EDX.\r | |
2803 | \r | |
2804 | <b>Example usage</b>\r | |
2805 | @code\r | |
2806 | CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_EAX Eax;\r | |
2807 | CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_EBX Ebx;\r | |
2808 | CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_ECX Ecx;\r | |
2809 | CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_EDX Edx;\r | |
2810 | \r | |
2811 | AsmCpuidEx (\r | |
2812 | CPUID_INTEL_SGX, CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF,\r | |
2813 | &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32\r | |
2814 | );\r | |
2815 | @endcode\r | |
2816 | **/\r | |
2817 | #define CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF 0x02\r | |
2818 | \r | |
2819 | /**\r | |
2820 | Sub-Leaf Index 2 or Higher Enumeration of Intel SGX Resources EAX for CPUID\r | |
2821 | leaf #CPUID_INTEL_SGX, sub-leaf #CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF.\r | |
2822 | **/\r | |
2823 | typedef union {\r | |
2824 | ///\r | |
2825 | /// Individual bit fields\r | |
2826 | ///\r | |
2827 | struct {\r | |
2828 | ///\r | |
2829 | /// [Bit 3:0] Sub-leaf-type encoding.\r | |
2830 | /// 0000b: This sub-leaf is invalid, EBX:EAX and EDX:ECX report 0.\r | |
2831 | /// 0001b: This sub-leaf provides information on the Enclave Page Cache (EPC)\r | |
2832 | /// in EBX:EAX and EDX:ECX.\r | |
2833 | /// All other encoding are reserved.\r | |
2834 | ///\r | |
2835 | UINT32 SubLeafType:4;\r | |
2836 | UINT32 Reserved:8;\r | |
2837 | ///\r | |
2838 | /// [Bit 31:12] If EAX[3:0] = 0001b, these are bits 31:12 of the physical address of\r | |
2839 | /// the base of the EPC section.\r | |
2840 | ///\r | |
2841 | UINT32 LowAddressOfEpcSection:20;\r | |
2842 | } Bits;\r | |
2843 | ///\r | |
2844 | /// All bit fields as a 32-bit value\r | |
2845 | ///\r | |
2846 | UINT32 Uint32;\r | |
2847 | } CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_EAX;\r | |
2848 | \r | |
2849 | /**\r | |
2850 | Sub-Leaf Index 2 or Higher Enumeration of Intel SGX Resources EBX for CPUID\r | |
2851 | leaf #CPUID_INTEL_SGX, sub-leaf #CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF.\r | |
2852 | **/\r | |
2853 | typedef union {\r | |
2854 | ///\r | |
2855 | /// Individual bit fields\r | |
2856 | ///\r | |
2857 | struct {\r | |
2858 | ///\r | |
2859 | /// [Bit 19:0] If EAX[3:0] = 0001b, these are bits 51:32 of the physical address of\r | |
2860 | /// the base of the EPC section.\r | |
2861 | ///\r | |
2862 | UINT32 HighAddressOfEpcSection:20;\r | |
2863 | UINT32 Reserved:12;\r | |
2864 | } Bits;\r | |
2865 | ///\r | |
2866 | /// All bit fields as a 32-bit value\r | |
2867 | ///\r | |
2868 | UINT32 Uint32;\r | |
2869 | } CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_EBX;\r | |
2870 | \r | |
2871 | /**\r | |
2872 | Sub-Leaf Index 2 or Higher Enumeration of Intel SGX Resources ECX for CPUID\r | |
2873 | leaf #CPUID_INTEL_SGX, sub-leaf #CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF.\r | |
2874 | **/\r | |
2875 | typedef union {\r | |
2876 | ///\r | |
2877 | /// Individual bit fields\r | |
2878 | ///\r | |
2879 | struct {\r | |
2880 | ///\r | |
2881 | /// [Bit 3:0] The EPC section encoding.\r | |
2882 | /// 0000b: Not valid.\r | |
2883 | /// 0001b: The EPC section is confidentiality, integrity and replay protected.\r | |
2884 | /// All other encoding are reserved.\r | |
2885 | ///\r | |
2886 | UINT32 EpcSection:4;\r | |
2887 | UINT32 Reserved:8;\r | |
2888 | ///\r | |
2889 | /// [Bit 31:12] If EAX[3:0] = 0001b, these are bits 31:12 of the size of the\r | |
2890 | /// corresponding EPC section within the Processor Reserved Memory.\r | |
2891 | ///\r | |
2892 | UINT32 LowSizeOfEpcSection:20;\r | |
2893 | } Bits;\r | |
2894 | ///\r | |
2895 | /// All bit fields as a 32-bit value\r | |
2896 | ///\r | |
2897 | UINT32 Uint32;\r | |
2898 | } CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_ECX;\r | |
2899 | \r | |
2900 | /**\r | |
2901 | Sub-Leaf Index 2 or Higher Enumeration of Intel SGX Resources EDX for CPUID\r | |
2902 | leaf #CPUID_INTEL_SGX, sub-leaf #CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF.\r | |
2903 | **/\r | |
2904 | typedef union {\r | |
2905 | ///\r | |
2906 | /// Individual bit fields\r | |
2907 | ///\r | |
2908 | struct {\r | |
2909 | ///\r | |
2910 | /// [Bit 19:0] If EAX[3:0] = 0001b, these are bits 51:32 of the size of the\r | |
2911 | /// corresponding EPC section within the Processor Reserved Memory.\r | |
2912 | ///\r | |
2913 | UINT32 HighSizeOfEpcSection:20;\r | |
2914 | UINT32 Reserved:12;\r | |
2915 | } Bits;\r | |
2916 | ///\r | |
2917 | /// All bit fields as a 32-bit value\r | |
2918 | ///\r | |
2919 | UINT32 Uint32;\r | |
2920 | } CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_EDX;\r | |
2921 | \r | |
2922 | \r | |
57d16ba1 MK |
2923 | /**\r |
2924 | CPUID Intel Processor Trace Information\r | |
2925 | \r | |
2926 | @param EAX CPUID_INTEL_PROCESSOR_TRACE (0x14)\r | |
2927 | @param ECX CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF (0x00).\r | |
2928 | CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF (0x01).\r | |
2929 | \r | |
2930 | **/\r | |
2931 | #define CPUID_INTEL_PROCESSOR_TRACE 0x14\r | |
2932 | \r | |
2933 | /**\r | |
2934 | CPUID Intel Processor Trace Information Main Leaf\r | |
2935 | \r | |
2936 | @param EAX CPUID_INTEL_PROCEDSSOR_TRACE (0x14)\r | |
2937 | @param ECX CPUID_INTEL_PROCEDSSOR_TRACE_MAIN_LEAF (0x00)\r | |
2938 | \r | |
2939 | @retval EAX Reports the maximum sub-leaf supported in leaf 14H.\r | |
2940 | @retval EBX Returns Intel processor trace information described by the\r | |
2941 | type CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF_EBX.\r | |
2942 | @retval ECX Returns Intel processor trace information described by the\r | |
2943 | type CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF_ECX.\r | |
2944 | @retval EDX Reserved.\r | |
2945 | \r | |
2946 | <b>Example usage</b>\r | |
2947 | @code\r | |
2948 | UINT32 Eax;\r | |
2949 | CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF_EBX Ebx;\r | |
2950 | CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF_ECX Ecx;\r | |
2951 | \r | |
2952 | AsmCpuidEx (\r | |
2953 | CPUID_INTEL_PROCESSOR_TRACE, CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF,\r | |
2954 | &Eax, &Ebx.Uint32, &Ecx.Uint32, NULL\r | |
2955 | );\r | |
2956 | @endcode\r | |
2957 | **/\r | |
2958 | #define CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF 0x00\r | |
2959 | \r | |
2960 | /**\r | |
2961 | CPUID Intel Processor Trace EBX for CPUID leaf #CPUID_INTEL_PROCESSOR_TRACE,\r | |
2962 | sub-leaf #CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF.\r | |
2963 | **/\r | |
2964 | typedef union {\r | |
2965 | ///\r | |
2966 | /// Individual bit fields\r | |
2967 | ///\r | |
2968 | struct {\r | |
2969 | ///\r | |
14806d7b | 2970 | /// [Bit 0] If 1, indicates that IA32_RTIT_CTL.CR3Filter can be set to 1,\r |
57d16ba1 MK |
2971 | /// and that IA32_RTIT_CR3_MATCH MSR can be accessed.\r |
2972 | ///\r | |
2973 | UINT32 Cr3Filter:1;\r | |
2974 | ///\r | |
14806d7b | 2975 | /// [Bit 1] If 1, indicates support of Configurable PSB and Cycle-Accurate\r |
57d16ba1 MK |
2976 | /// Mode.\r |
2977 | ///\r | |
2978 | UINT32 ConfigurablePsb:1;\r | |
2979 | ///\r | |
14806d7b | 2980 | /// [Bit 2] If 1, indicates support of IP Filtering, TraceStop filtering,\r |
57d16ba1 MK |
2981 | /// and preservation of Intel PT MSRs across warm reset.\r |
2982 | ///\r | |
2983 | UINT32 IpTraceStopFiltering:1;\r | |
2984 | ///\r | |
14806d7b | 2985 | /// [Bit 3] If 1, indicates support of MTC timing packet and suppression of\r |
57d16ba1 MK |
2986 | /// COFI-based packets.\r |
2987 | ///\r | |
2988 | UINT32 Mtc:1;\r | |
14806d7b HW |
2989 | ///\r |
2990 | /// [Bit 4] If 1, indicates support of PTWRITE. Writes can set\r | |
2991 | /// IA32_RTIT_CTL[12] (PTWEn) and IA32_RTIT_CTL[5] (FUPonPTW), and PTWRITE\r | |
2992 | /// can generate packets.\r | |
2993 | ///\r | |
2994 | UINT32 PTWrite:1;\r | |
2995 | ///\r | |
2996 | /// [Bit 5] If 1, indicates support of Power Event Trace. Writes can set\r | |
2997 | /// IA32_RTIT_CTL[4] (PwrEvtEn), enabling Power Event Trace packet\r | |
2998 | /// generation.\r | |
2999 | ///\r | |
3000 | UINT32 PowerEventTrace:1;\r | |
3001 | UINT32 Reserved:26;\r | |
57d16ba1 MK |
3002 | } Bits;\r |
3003 | ///\r | |
3004 | /// All bit fields as a 32-bit value\r | |
3005 | ///\r | |
3006 | UINT32 Uint32;\r | |
3007 | } CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF_EBX;\r | |
3008 | \r | |
3009 | /**\r | |
3010 | CPUID Intel Processor Trace ECX for CPUID leaf #CPUID_INTEL_PROCESSOR_TRACE,\r | |
3011 | sub-leaf #CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF.\r | |
3012 | **/\r | |
3013 | typedef union {\r | |
3014 | ///\r | |
3015 | /// Individual bit fields\r | |
3016 | ///\r | |
3017 | struct {\r | |
3018 | ///\r | |
3019 | /// [Bit 0] If 1, Tracing can be enabled with IA32_RTIT_CTL.ToPA = 1, hence\r | |
3020 | /// utilizing the ToPA output scheme; IA32_RTIT_OUTPUT_BASE and\r | |
3021 | /// IA32_RTIT_OUTPUT_MASK_PTRS MSRs can be accessed.\r | |
3022 | ///\r | |
3023 | UINT32 RTIT:1;\r | |
3024 | ///\r | |
3025 | /// [Bit 1] If 1, ToPA tables can hold any number of output entries, up to\r | |
3026 | /// the maximum allowed by the MaskOrTableOffset field of\r | |
3027 | /// IA32_RTIT_OUTPUT_MASK_PTRS.\r | |
3028 | ///\r | |
3029 | UINT32 ToPA:1;\r | |
3030 | ///\r | |
14806d7b | 3031 | /// [Bit 2] If 1, indicates support of Single-Range Output scheme.\r |
57d16ba1 MK |
3032 | ///\r |
3033 | UINT32 SingleRangeOutput:1;\r | |
3034 | ///\r | |
14806d7b | 3035 | /// [Bit 3] If 1, indicates support of output to Trace Transport subsystem.\r |
57d16ba1 MK |
3036 | ///\r |
3037 | UINT32 TraceTransportSubsystem:1;\r | |
3038 | UINT32 Reserved:27;\r | |
3039 | ///\r | |
14806d7b | 3040 | /// [Bit 31] If 1, generated packets which contain IP payloads have LIP\r |
57d16ba1 MK |
3041 | /// values, which include the CS base component.\r |
3042 | ///\r | |
3043 | UINT32 LIP:1;\r | |
3044 | } Bits;\r | |
3045 | ///\r | |
3046 | /// All bit fields as a 32-bit value\r | |
3047 | ///\r | |
3048 | UINT32 Uint32;\r | |
3049 | } CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF_ECX;\r | |
3050 | \r | |
3051 | \r | |
3052 | /**\r | |
3053 | CPUID Intel Processor Trace Information Sub-leaf\r | |
3054 | \r | |
3055 | @param EAX CPUID_INTEL_PROCEDSSOR_TRACE (0x14)\r | |
3056 | @param ECX CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF (0x01)\r | |
3057 | \r | |
3058 | @retval EAX Returns Intel processor trace information described by the\r | |
3059 | type CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF_EAX.\r | |
3060 | @retval EBX Returns Intel processor trace information described by the\r | |
3061 | type CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF_EBX.\r | |
3062 | @retval ECX Reserved.\r | |
3063 | @retval EDX Reserved.\r | |
3064 | \r | |
3065 | <b>Example usage</b>\r | |
3066 | @code\r | |
3067 | UINT32 MaximumSubLeaf;\r | |
3068 | UINT32 SubLeaf;\r | |
3069 | CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF_EAX Eax;\r | |
3070 | CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF_EBX Ebx;\r | |
3071 | \r | |
3072 | AsmCpuidEx (\r | |
3073 | CPUID_INTEL_PROCESSOR_TRACE, CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF,\r | |
3074 | &MaximumSubLeaf, NULL, NULL, NULL\r | |
3075 | );\r | |
3076 | \r | |
3077 | for (SubLeaf = CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF; SubLeaf <= MaximumSubLeaf; SubLeaf++) {\r | |
3078 | AsmCpuidEx (\r | |
3079 | CPUID_INTEL_PROCESSOR_TRACE, SubLeaf,\r | |
3080 | &Eax.Uint32, &Ebx.Uint32, NULL, NULL\r | |
3081 | );\r | |
3082 | }\r | |
3083 | @endcode\r | |
3084 | **/\r | |
3085 | #define CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF 0x01\r | |
3086 | \r | |
3087 | /**\r | |
3088 | CPUID Intel Processor Trace EAX for CPUID leaf #CPUID_INTEL_PROCESSOR_TRACE,\r | |
3089 | sub-leaf #CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF.\r | |
3090 | **/\r | |
3091 | typedef union {\r | |
3092 | ///\r | |
3093 | /// Individual bit fields\r | |
3094 | ///\r | |
3095 | struct {\r | |
3096 | ///\r | |
3097 | /// [Bits 2:0] Number of configurable Address Ranges for filtering.\r | |
3098 | ///\r | |
3099 | UINT32 ConfigurableAddressRanges:3;\r | |
3100 | UINT32 Reserved:13;\r | |
3101 | ///\r | |
3102 | /// [Bits 31:16] Bitmap of supported MTC period encodings\r | |
3103 | ///\r | |
3104 | UINT32 MtcPeriodEncodings:16;\r | |
3105 | \r | |
3106 | } Bits;\r | |
3107 | ///\r | |
3108 | /// All bit fields as a 32-bit value\r | |
3109 | ///\r | |
3110 | UINT32 Uint32;\r | |
3111 | } CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF_EAX;\r | |
3112 | \r | |
3113 | /**\r | |
3114 | CPUID Intel Processor Trace EBX for CPUID leaf #CPUID_INTEL_PROCESSOR_TRACE,\r | |
3115 | sub-leaf #CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF.\r | |
3116 | **/\r | |
3117 | typedef union {\r | |
3118 | ///\r | |
3119 | /// Individual bit fields\r | |
3120 | ///\r | |
3121 | struct {\r | |
3122 | ///\r | |
3123 | /// [Bits 15:0] Bitmap of supported Cycle Threshold value encodings.\r | |
3124 | ///\r | |
3125 | UINT32 CycleThresholdEncodings:16;\r | |
3126 | ///\r | |
3127 | /// [Bits 31:16] Bitmap of supported Configurable PSB frequency encodings.\r | |
3128 | ///\r | |
3129 | UINT32 PsbFrequencyEncodings:16;\r | |
3130 | \r | |
3131 | } Bits;\r | |
3132 | ///\r | |
3133 | /// All bit fields as a 32-bit value\r | |
3134 | ///\r | |
3135 | UINT32 Uint32;\r | |
3136 | } CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF_EBX;\r | |
3137 | \r | |
3138 | \r | |
3139 | /**\r | |
14806d7b | 3140 | CPUID Time Stamp Counter and Nominal Core Crystal Clock Information\r |
57d16ba1 MK |
3141 | \r |
3142 | @note\r | |
3143 | If EBX[31:0] is 0, the TSC/"core crystal clock" ratio is not enumerated.\r | |
3144 | EBX[31:0]/EAX[31:0] indicates the ratio of the TSC frequency and the core\r | |
3145 | crystal clock frequency.\r | |
14806d7b HW |
3146 | If ECX is 0, the nominal core crystal clock frequency is not enumerated.\r |
3147 | "TSC frequency" = "core crystal clock frequency" * EBX/EAX.\r | |
57d16ba1 MK |
3148 | The core crystal clock may differ from the reference clock, bus clock, or core\r |
3149 | clock frequencies.\r | |
3150 | \r | |
3151 | @param EAX CPUID_TIME_STAMP_COUNTER (0x15)\r | |
3152 | \r | |
3153 | @retval EAX An unsigned integer which is the denominator of the\r | |
3154 | TSC/"core crystal clock" ratio\r | |
3155 | @retval EBX An unsigned integer which is the numerator of the\r | |
3156 | TSC/"core crystal clock" ratio.\r | |
14806d7b HW |
3157 | @retval ECX An unsigned integer which is the nominal frequency\r |
3158 | of the core crystal clock in Hz.\r | |
57d16ba1 MK |
3159 | @retval EDX Reserved.\r |
3160 | \r | |
3161 | <b>Example usage</b>\r | |
3162 | @code\r | |
3163 | UINT32 Eax;\r | |
3164 | UINT32 Ebx;\r | |
14806d7b | 3165 | UINT32 Ecx;\r |
57d16ba1 | 3166 | \r |
14806d7b | 3167 | AsmCpuid (CPUID_TIME_STAMP_COUNTER, &Eax, &Ebx, &Ecx, NULL);\r |
57d16ba1 MK |
3168 | @endcode\r |
3169 | **/\r | |
3170 | #define CPUID_TIME_STAMP_COUNTER 0x15\r | |
3171 | \r | |
3172 | \r | |
3173 | /**\r | |
3174 | CPUID Processor Frequency Information\r | |
3175 | \r | |
3176 | @note\r | |
3177 | Data is returned from this interface in accordance with the processor's\r | |
3178 | specification and does not reflect actual values. Suitable use of this data\r | |
3179 | includes the display of processor information in like manner to the processor\r | |
3180 | brand string and for determining the appropriate range to use when displaying\r | |
3181 | processor information e.g. frequency history graphs. The returned information\r | |
3182 | should not be used for any other purpose as the returned information does not\r | |
3183 | accurately correlate to information / counters returned by other processor\r | |
3184 | interfaces. While a processor may support the Processor Frequency Information\r | |
3185 | leaf, fields that return a value of zero are not supported.\r | |
3186 | \r | |
3187 | @param EAX CPUID_TIME_STAMP_COUNTER (0x16)\r | |
3188 | \r | |
3189 | @retval EAX Returns processor base frequency information described by the\r | |
3190 | type CPUID_PROCESSOR_FREQUENCY_EAX.\r | |
3191 | @retval EBX Returns maximum frequency information described by the type\r | |
3192 | CPUID_PROCESSOR_FREQUENCY_EBX.\r | |
3193 | @retval ECX Returns bus frequency information described by the type\r | |
3194 | CPUID_PROCESSOR_FREQUENCY_ECX.\r | |
3195 | @retval EDX Reserved.\r | |
3196 | \r | |
3197 | <b>Example usage</b>\r | |
3198 | @code\r | |
3199 | CPUID_PROCESSOR_FREQUENCY_EAX Eax;\r | |
3200 | CPUID_PROCESSOR_FREQUENCY_EBX Ebx;\r | |
3201 | CPUID_PROCESSOR_FREQUENCY_ECX Ecx;\r | |
3202 | \r | |
3203 | AsmCpuid (CPUID_PROCESSOR_FREQUENCY, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, NULL);\r | |
3204 | @endcode\r | |
3205 | **/\r | |
3206 | #define CPUID_PROCESSOR_FREQUENCY 0x16\r | |
3207 | \r | |
3208 | /**\r | |
3209 | CPUID Processor Frequency Information EAX for CPUID leaf\r | |
3210 | #CPUID_PROCESSOR_FREQUENCY.\r | |
3211 | **/\r | |
3212 | typedef union {\r | |
3213 | ///\r | |
3214 | /// Individual bit fields\r | |
3215 | ///\r | |
3216 | struct {\r | |
3217 | ///\r | |
3218 | /// [Bits 15:0] Processor Base Frequency (in MHz).\r | |
3219 | ///\r | |
3220 | UINT32 ProcessorBaseFrequency:16;\r | |
3221 | UINT32 Reserved:16;\r | |
3222 | } Bits;\r | |
3223 | ///\r | |
3224 | /// All bit fields as a 32-bit value\r | |
3225 | ///\r | |
3226 | UINT32 Uint32;\r | |
3227 | } CPUID_PROCESSOR_FREQUENCY_EAX;\r | |
3228 | \r | |
3229 | /**\r | |
3230 | CPUID Processor Frequency Information EBX for CPUID leaf\r | |
3231 | #CPUID_PROCESSOR_FREQUENCY.\r | |
3232 | **/\r | |
3233 | typedef union {\r | |
3234 | ///\r | |
3235 | /// Individual bit fields\r | |
3236 | ///\r | |
3237 | struct {\r | |
3238 | ///\r | |
3239 | /// [Bits 15:0] Maximum Frequency (in MHz).\r | |
3240 | ///\r | |
3241 | UINT32 MaximumFrequency:16;\r | |
3242 | UINT32 Reserved:16;\r | |
3243 | } Bits;\r | |
3244 | ///\r | |
3245 | /// All bit fields as a 32-bit value\r | |
3246 | ///\r | |
3247 | UINT32 Uint32;\r | |
3248 | } CPUID_PROCESSOR_FREQUENCY_EBX;\r | |
3249 | \r | |
3250 | /**\r | |
3251 | CPUID Processor Frequency Information ECX for CPUID leaf\r | |
3252 | #CPUID_PROCESSOR_FREQUENCY.\r | |
3253 | **/\r | |
3254 | typedef union {\r | |
3255 | ///\r | |
3256 | /// Individual bit fields\r | |
3257 | ///\r | |
3258 | struct {\r | |
3259 | ///\r | |
3260 | /// [Bits 15:0] Bus (Reference) Frequency (in MHz).\r | |
3261 | ///\r | |
3262 | UINT32 BusFrequency:16;\r | |
3263 | UINT32 Reserved:16;\r | |
3264 | } Bits;\r | |
3265 | ///\r | |
3266 | /// All bit fields as a 32-bit value\r | |
3267 | ///\r | |
3268 | UINT32 Uint32;\r | |
3269 | } CPUID_PROCESSOR_FREQUENCY_ECX;\r | |
3270 | \r | |
28a7ddf0 | 3271 | \r |
57d16ba1 MK |
3272 | /**\r |
3273 | CPUID SoC Vendor Information\r | |
28a7ddf0 | 3274 | \r |
57d16ba1 MK |
3275 | @param EAX CPUID_SOC_VENDOR (0x17)\r |
3276 | @param ECX CPUID_SOC_VENDOR_MAIN_LEAF (0x00)\r | |
3277 | CPUID_SOC_VENDOR_BRAND_STRING1 (0x01)\r | |
3278 | CPUID_SOC_VENDOR_BRAND_STRING1 (0x02)\r | |
3279 | CPUID_SOC_VENDOR_BRAND_STRING1 (0x03)\r | |
28a7ddf0 | 3280 | \r |
57d16ba1 MK |
3281 | @note\r |
3282 | Leaf 17H output depends on the initial value in ECX. SOC Vendor Brand String\r | |
3283 | is a UTF-8 encoded string padded with trailing bytes of 00H. The complete SOC\r | |
3284 | Vendor Brand String is constructed by concatenating in ascending order of\r | |
3285 | EAX:EBX:ECX:EDX and from the sub-leaf 1 fragment towards sub-leaf 3.\r | |
28a7ddf0 | 3286 | \r |
57d16ba1 MK |
3287 | **/\r |
3288 | #define CPUID_SOC_VENDOR 0x17\r | |
3289 | \r | |
3290 | /**\r | |
3291 | CPUID SoC Vendor Information\r | |
3292 | \r | |
3293 | @param EAX CPUID_SOC_VENDOR (0x17)\r | |
3294 | @param ECX CPUID_SOC_VENDOR_MAIN_LEAF (0x00)\r | |
3295 | \r | |
3296 | @retval EAX MaxSOCID_Index. Reports the maximum input value of supported\r | |
3297 | sub-leaf in leaf 17H.\r | |
3298 | @retval EBX Returns SoC Vendor information described by the type\r | |
3299 | CPUID_SOC_VENDOR_MAIN_LEAF_EBX.\r | |
3300 | @retval ECX Project ID. A unique number an SOC vendor assigns to its SOC\r | |
3301 | projects.\r | |
3302 | @retval EDX Stepping ID. A unique number within an SOC project that an SOC\r | |
3303 | vendor assigns.\r | |
3304 | \r | |
3305 | <b>Example usage</b>\r | |
3306 | @code\r | |
3307 | UINT32 Eax;\r | |
3308 | CPUID_SOC_VENDOR_MAIN_LEAF_EBX Ebx;\r | |
3309 | UINT32 Ecx;\r | |
3310 | UINT32 Edx;\r | |
3311 | \r | |
3312 | AsmCpuidEx (\r | |
3313 | CPUID_SOC_VENDOR, CPUID_SOC_VENDOR_MAIN_LEAF,\r | |
3314 | &Eax, &Ebx.Uint32, &Ecx, &Edx\r | |
3315 | );\r | |
3316 | @endcode\r | |
3317 | **/\r | |
3318 | #define CPUID_SOC_VENDOR_MAIN_LEAF 0x00\r | |
3319 | \r | |
3320 | /**\r | |
3321 | CPUID SoC Vendor Information EBX for CPUID leaf #CPUID_SOC_VENDOR sub-leaf\r | |
3322 | #CPUID_SOC_VENDOR_MAIN_LEAF.\r | |
3323 | **/\r | |
3324 | typedef union {\r | |
3325 | ///\r | |
3326 | /// Individual bit fields\r | |
3327 | ///\r | |
3328 | struct {\r | |
3329 | ///\r | |
3330 | /// [Bits 15:0] SOC Vendor ID.\r | |
3331 | ///\r | |
3332 | UINT32 SocVendorId:16;\r | |
3333 | ///\r | |
3334 | /// [Bit 16] If 1, the SOC Vendor ID field is assigned via an industry\r | |
3335 | /// standard enumeration scheme. Otherwise, the SOC Vendor ID field is\r | |
3336 | /// assigned by Intel.\r | |
3337 | ///\r | |
3338 | UINT32 IsVendorScheme:1;\r | |
3339 | UINT32 Reserved:15;\r | |
3340 | } Bits;\r | |
3341 | ///\r | |
3342 | /// All bit fields as a 32-bit value\r | |
3343 | ///\r | |
3344 | UINT32 Uint32;\r | |
3345 | } CPUID_SOC_VENDOR_MAIN_LEAF_EBX;\r | |
3346 | \r | |
3347 | /**\r | |
3348 | CPUID SoC Vendor Information\r | |
3349 | \r | |
3350 | @param EAX CPUID_SOC_VENDOR (0x17)\r | |
3351 | @param ECX CPUID_SOC_VENDOR_BRAND_STRING1 (0x01)\r | |
3352 | \r | |
3353 | @retval EAX SOC Vendor Brand String. UTF-8 encoded string of type\r | |
3354 | CPUID_SOC_VENDOR_BRAND_STRING_DATA.\r | |
3355 | @retval EBX SOC Vendor Brand String. UTF-8 encoded string of type\r | |
3356 | CPUID_SOC_VENDOR_BRAND_STRING_DATA.\r | |
3357 | @retval ECX SOC Vendor Brand String. UTF-8 encoded string of type\r | |
3358 | CPUID_SOC_VENDOR_BRAND_STRING_DATA.\r | |
3359 | @retval EDX SOC Vendor Brand String. UTF-8 encoded string of type\r | |
3360 | CPUID_SOC_VENDOR_BRAND_STRING_DATA.\r | |
3361 | \r | |
3362 | <b>Example usage</b>\r | |
3363 | @code\r | |
3364 | CPUID_SOC_VENDOR_BRAND_STRING_DATA Eax;\r | |
3365 | CPUID_SOC_VENDOR_BRAND_STRING_DATA Ebx;\r | |
3366 | CPUID_SOC_VENDOR_BRAND_STRING_DATA Ecx;\r | |
3367 | CPUID_SOC_VENDOR_BRAND_STRING_DATA Edx;\r | |
3368 | \r | |
3369 | AsmCpuidEx (\r | |
3370 | CPUID_SOC_VENDOR, CPUID_SOC_VENDOR_BRAND_STRING1,\r | |
3371 | &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32\r | |
3372 | );\r | |
3373 | @endcode\r | |
3374 | **/\r | |
3375 | #define CPUID_SOC_VENDOR_BRAND_STRING1 0x01\r | |
3376 | \r | |
3377 | /**\r | |
3378 | CPUID SoC Vendor Brand String for CPUID leafs #CPUID_SOC_VENDOR_BRAND_STRING1,\r | |
3379 | #CPUID_SOC_VENDOR_BRAND_STRING2, and #CPUID_SOC_VENDOR_BRAND_STRING3.\r | |
3380 | **/\r | |
3381 | typedef union {\r | |
3382 | ///\r | |
3383 | /// 4 UTF-8 characters of Soc Vendor Brand String\r | |
3384 | ///\r | |
3385 | CHAR8 BrandString[4];\r | |
3386 | ///\r | |
3387 | /// All fields as a 32-bit value\r | |
3388 | ///\r | |
3389 | UINT32 Uint32;\r | |
3390 | } CPUID_SOC_VENDOR_BRAND_STRING_DATA;\r | |
3391 | \r | |
3392 | /**\r | |
3393 | CPUID SoC Vendor Information\r | |
3394 | \r | |
3395 | @param EAX CPUID_SOC_VENDOR (0x17)\r | |
3396 | @param ECX CPUID_SOC_VENDOR_BRAND_STRING2 (0x02)\r | |
3397 | \r | |
3398 | @retval EAX SOC Vendor Brand String. UTF-8 encoded string of type\r | |
3399 | CPUID_SOC_VENDOR_BRAND_STRING_DATA.\r | |
3400 | @retval EBX SOC Vendor Brand String. UTF-8 encoded string of type\r | |
3401 | CPUID_SOC_VENDOR_BRAND_STRING_DATA.\r | |
3402 | @retval ECX SOC Vendor Brand String. UTF-8 encoded string of type\r | |
3403 | CPUID_SOC_VENDOR_BRAND_STRING_DATA.\r | |
3404 | @retval EDX SOC Vendor Brand String. UTF-8 encoded string of type\r | |
3405 | CPUID_SOC_VENDOR_BRAND_STRING_DATA.\r | |
3406 | \r | |
3407 | <b>Example usage</b>\r | |
3408 | @code\r | |
3409 | CPUID_SOC_VENDOR_BRAND_STRING_DATA Eax;\r | |
3410 | CPUID_SOC_VENDOR_BRAND_STRING_DATA Ebx;\r | |
3411 | CPUID_SOC_VENDOR_BRAND_STRING_DATA Ecx;\r | |
3412 | CPUID_SOC_VENDOR_BRAND_STRING_DATA Edx;\r | |
3413 | \r | |
3414 | AsmCpuidEx (\r | |
3415 | CPUID_SOC_VENDOR, CPUID_SOC_VENDOR_BRAND_STRING2,\r | |
3416 | &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32\r | |
3417 | );\r | |
3418 | @endcode\r | |
3419 | **/\r | |
3420 | #define CPUID_SOC_VENDOR_BRAND_STRING2 0x02\r | |
3421 | \r | |
3422 | /**\r | |
3423 | CPUID SoC Vendor Information\r | |
3424 | \r | |
3425 | @param EAX CPUID_SOC_VENDOR (0x17)\r | |
3426 | @param ECX CPUID_SOC_VENDOR_BRAND_STRING3 (0x03)\r | |
28a7ddf0 | 3427 | \r |
57d16ba1 MK |
3428 | @retval EAX SOC Vendor Brand String. UTF-8 encoded string of type\r |
3429 | CPUID_SOC_VENDOR_BRAND_STRING_DATA.\r | |
3430 | @retval EBX SOC Vendor Brand String. UTF-8 encoded string of type\r | |
3431 | CPUID_SOC_VENDOR_BRAND_STRING_DATA.\r | |
3432 | @retval ECX SOC Vendor Brand String. UTF-8 encoded string of type\r | |
3433 | CPUID_SOC_VENDOR_BRAND_STRING_DATA.\r | |
3434 | @retval EDX SOC Vendor Brand String. UTF-8 encoded string of type\r | |
3435 | CPUID_SOC_VENDOR_BRAND_STRING_DATA.\r | |
3436 | \r | |
3437 | <b>Example usage</b>\r | |
3438 | @code\r | |
3439 | CPUID_SOC_VENDOR_BRAND_STRING_DATA Eax;\r | |
3440 | CPUID_SOC_VENDOR_BRAND_STRING_DATA Ebx;\r | |
3441 | CPUID_SOC_VENDOR_BRAND_STRING_DATA Ecx;\r | |
3442 | CPUID_SOC_VENDOR_BRAND_STRING_DATA Edx;\r | |
3443 | \r | |
3444 | AsmCpuidEx (\r | |
3445 | CPUID_SOC_VENDOR, CPUID_SOC_VENDOR_BRAND_STRING3,\r | |
3446 | &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32\r | |
3447 | );\r | |
3448 | @endcode\r | |
3449 | **/\r | |
3450 | #define CPUID_SOC_VENDOR_BRAND_STRING3 0x03\r | |
4de216c0 | 3451 | \r |
ee27f6ee ED |
3452 | /**\r |
3453 | CPUID Deterministic Address Translation Parameters\r | |
3454 | \r | |
3455 | @note\r | |
3456 | Each sub-leaf enumerates a different address translation structure.\r | |
3457 | If ECX contains an invalid sub-leaf index, EAX/EBX/ECX/EDX return 0. Sub-leaf\r | |
3458 | index n is invalid if n exceeds the value that sub-leaf 0 returns in EAX. A\r | |
3459 | sub-leaf index is also invalid if EDX[4:0] returns 0.\r | |
3460 | Valid sub-leaves do not need to be contiguous or in any particular order. A\r | |
3461 | valid sub-leaf may be in a higher input ECX value than an invalid sub-leaf or\r | |
3462 | than a valid sub-leaf of a higher or lower-level structure.\r | |
3463 | * Some unified TLBs will allow a single TLB entry to satisfy data read/write\r | |
3464 | and instruction fetches. Others will require separate entries (e.g., one\r | |
3465 | loaded on data read/write and another loaded on an instruction fetch).\r | |
3466 | Please see the Intel 64 and IA-32 Architectures Optimization Reference Manual\r | |
3467 | for details of a particular product.\r | |
3468 | ** Add one to the return value to get the result.\r | |
3469 | \r | |
3470 | @param EAX CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS (0x18)\r | |
3471 | @param ECX CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_MAIN_LEAF (0x00)\r | |
3472 | CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_SUB_LEAF (0x*)\r | |
3473 | \r | |
3474 | **/\r | |
3475 | #define CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS 0x18\r | |
3476 | \r | |
3477 | /**\r | |
3478 | CPUID Deterministic Address Translation Parameters\r | |
3479 | \r | |
3480 | @param EAX CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS (0x18)\r | |
3481 | @param ECX CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_MAIN_LEAF (0x00)\r | |
3482 | \r | |
3483 | @retval EAX Reports the maximum input value of supported sub-leaf in leaf 18H.\r | |
3484 | @retval EBX Returns Deterministic Address Translation Parameters described by\r | |
3485 | the type CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_EBX.\r | |
3486 | @retval ECX Number of Sets.\r | |
3487 | @retval EDX Returns Deterministic Address Translation Parameters described by\r | |
3488 | the type CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_EDX.\r | |
3489 | \r | |
3490 | <b>Example usage</b>\r | |
3491 | @code\r | |
3492 | UINT32 Eax;\r | |
3493 | CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_EBX Ebx;\r | |
3494 | UINT32 Ecx;\r | |
3495 | CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_EDX Edx;\r | |
3496 | \r | |
3497 | AsmCpuidEx (\r | |
3498 | CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS,\r | |
3499 | CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_MAIN_LEAF,\r | |
3500 | &Eax, &Ebx.Uint32, &Ecx, &Edx.Uint32\r | |
3501 | );\r | |
3502 | @endcode\r | |
3503 | **/\r | |
3504 | #define CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_MAIN_LEAF 0x00\r | |
3505 | \r | |
3506 | /**\r | |
3507 | CPUID Deterministic Address Translation Parameters EBX for CPUID leafs.\r | |
3508 | **/\r | |
3509 | typedef union {\r | |
3510 | ///\r | |
3511 | /// Individual bit fields\r | |
3512 | ///\r | |
3513 | struct {\r | |
3514 | ///\r | |
3515 | /// [Bits 0] 4K page size entries supported by this structure.\r | |
3516 | ///\r | |
3517 | UINT32 Page4K:1;\r | |
3518 | ///\r | |
3519 | /// [Bits 1] 2MB page size entries supported by this structure.\r | |
3520 | ///\r | |
3521 | UINT32 Page2M:1;\r | |
3522 | ///\r | |
3523 | /// [Bits 2] 4MB page size entries supported by this structure.\r | |
3524 | ///\r | |
3525 | UINT32 Page4M:1;\r | |
3526 | ///\r | |
3527 | /// [Bits 3] 1 GB page size entries supported by this structure.\r | |
3528 | ///\r | |
3529 | UINT32 Page1G:1;\r | |
3530 | ///\r | |
3531 | /// [Bits 7:4] Reserved.\r | |
3532 | ///\r | |
3533 | UINT32 Reserved1:4;\r | |
3534 | ///\r | |
3535 | /// [Bits 10:8] Partitioning (0: Soft partitioning between the logical\r | |
3536 | /// processors sharing this structure)\r | |
3537 | ///\r | |
3538 | UINT32 Partitioning:3;\r | |
3539 | ///\r | |
3540 | /// [Bits 15:11] Reserved.\r | |
3541 | ///\r | |
3542 | UINT32 Reserved2:5;\r | |
3543 | ///\r | |
3544 | /// [Bits 31:16] W = Ways of associativity.\r | |
3545 | ///\r | |
3546 | UINT32 Way:16;\r | |
3547 | } Bits;\r | |
3548 | ///\r | |
3549 | /// All bit fields as a 32-bit value\r | |
3550 | ///\r | |
3551 | UINT32 Uint32;\r | |
3552 | } CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_EBX;\r | |
3553 | \r | |
3554 | /**\r | |
3555 | CPUID Deterministic Address Translation Parameters EDX for CPUID leafs.\r | |
3556 | **/\r | |
3557 | typedef union {\r | |
3558 | ///\r | |
3559 | /// Individual bit fields\r | |
3560 | ///\r | |
3561 | struct {\r | |
3562 | ///\r | |
3563 | /// [Bits 4:0] Translation cache type field.\r | |
3564 | ///\r | |
3565 | UINT32 TranslationCacheType:5;\r | |
3566 | ///\r | |
3567 | /// [Bits 7:5] Translation cache level (starts at 1).\r | |
3568 | ///\r | |
3569 | UINT32 TranslationCacheLevel:3;\r | |
3570 | ///\r | |
3571 | /// [Bits 8] Fully associative structure.\r | |
3572 | ///\r | |
3573 | UINT32 FullyAssociative:1;\r | |
3574 | ///\r | |
3575 | /// [Bits 13:9] Reserved.\r | |
3576 | ///\r | |
3577 | UINT32 Reserved1:5;\r | |
3578 | ///\r | |
3579 | /// [Bits 25:14] Maximum number of addressable IDs for logical\r | |
3580 | /// processors sharing this translation cache.\r | |
3581 | ///\r | |
3582 | UINT32 MaximumNum:12;\r | |
3583 | ///\r | |
3584 | /// [Bits 31:26] Reserved.\r | |
3585 | ///\r | |
3586 | UINT32 Reserved2:6;\r | |
3587 | } Bits;\r | |
3588 | ///\r | |
3589 | /// All bit fields as a 32-bit value\r | |
3590 | ///\r | |
3591 | UINT32 Uint32;\r | |
3592 | } CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_EDX;\r | |
3593 | \r | |
3594 | ///\r | |
3595 | /// @{ Define value for CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_EDX.TranslationCacheType\r | |
3596 | ///\r | |
3597 | #define CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_TRANSLATION_CACHE_TYPE_INVALID 0x00\r | |
3598 | #define CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_TRANSLATION_CACHE_TYPE_DATA_TLB 0x01\r | |
3599 | #define CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_TRANSLATION_CACHE_TYPE_INSTRUCTION_TLB 0x02\r | |
3600 | #define CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_TRANSLATION_CACHE_TYPE_UNIFIED_TLB 0x03\r | |
3601 | ///\r | |
3602 | /// @}\r | |
3603 | ///\r | |
3604 | \r | |
3605 | \r | |
3606 | /**\r | |
3607 | CPUID V2 Extended Topology Enumeration Leaf\r | |
3608 | \r | |
3609 | @note\r | |
3610 | CPUID leaf 1FH is a preferred superset to leaf 0BH. Intel recommends first checking\r | |
3611 | for the existence of Leaf 1FH and using this if available.\r | |
3612 | Most of Leaf 1FH output depends on the initial value in ECX. The EDX output of leaf\r | |
3613 | 1FH is always valid and does not vary with input value in ECX. Output value in ECX[7:0]\r | |
3614 | always equals input value in ECX[7:0]. Sub-leaf index 0 enumerates SMT level. Each\r | |
3615 | subsequent higher sub-leaf index enumerates a higher-level topological entity in\r | |
3616 | hierarchical order. For sub-leaves that return an invalid level-type of 0 in ECX[15:8];\r | |
3617 | EAX and EBX will return 0. If an input value n in ECX returns the invalid level-type of\r | |
3618 | 0 in ECX[15:8], other input values with ECX > n also return 0 in ECX[15:8].\r | |
3619 | \r | |
3620 | Software should use this field (EAX[4:0]) to enumerate processor topology of the system.\r | |
3621 | Software must not use EBX[15:0] to enumerate processor topology of the system. This value\r | |
3622 | in this field (EBX[15:0]) is only intended for display/diagnostic purposes. The actual\r | |
3623 | number of logical processors available to BIOS/OS/Applications may be different from the\r | |
3624 | value of EBX[15:0], depending on software and platform hardware configurations.\r | |
3625 | \r | |
516e3397 RN |
3626 | @param EAX CPUID_V2_EXTENDED_TOPOLOGY (0x1F)\r |
3627 | @param ECX Level number\r | |
ee27f6ee | 3628 | \r |
ee27f6ee | 3629 | **/\r |
516e3397 | 3630 | #define CPUID_V2_EXTENDED_TOPOLOGY 0x1F\r |
ee27f6ee ED |
3631 | \r |
3632 | ///\r | |
516e3397 | 3633 | /// @{ Define value for CPUID_EXTENDED_TOPOLOGY_ECX.LevelType\r |
ee27f6ee ED |
3634 | /// The value of the "level type" field is not related to level numbers in\r |
3635 | /// any way, higher "level type" values do not mean higher levels.\r | |
3636 | ///\r | |
516e3397 RN |
3637 | #define CPUID_V2_EXTENDED_TOPOLOGY_LEVEL_TYPE_MODULE 0x03\r |
3638 | #define CPUID_V2_EXTENDED_TOPOLOGY_LEVEL_TYPE_TILE 0x04\r | |
3639 | #define CPUID_V2_EXTENDED_TOPOLOGY_LEVEL_TYPE_DIE 0x05\r | |
ee27f6ee ED |
3640 | ///\r |
3641 | /// @}\r | |
3642 | ///\r | |
28a7ddf0 | 3643 | \r |
57d16ba1 MK |
3644 | /**\r |
3645 | CPUID Extended Function\r | |
3646 | \r | |
3647 | @param EAX CPUID_EXTENDED_FUNCTION (0x80000000)\r | |
3648 | \r | |
3649 | @retval EAX Maximum Input Value for Extended Function CPUID Information.\r | |
3650 | @retval EBX Reserved.\r | |
3651 | @retval ECX Reserved.\r | |
3652 | @retval EDX Reserved.\r | |
3653 | \r | |
3654 | <b>Example usage</b>\r | |
3655 | @code\r | |
3656 | UINT32 Eax;\r | |
3657 | \r | |
3658 | AsmCpuid (CPUID_EXTENDED_FUNCTION, &Eax, NULL, NULL, NULL);\r | |
3659 | @endcode\r | |
3660 | **/\r | |
28a7ddf0 MK |
3661 | #define CPUID_EXTENDED_FUNCTION 0x80000000\r |
3662 | \r | |
57d16ba1 MK |
3663 | \r |
3664 | /**\r | |
3665 | CPUID Extended Processor Signature and Feature Bits\r | |
3666 | \r | |
3667 | @param EAX CPUID_EXTENDED_CPU_SIG (0x80000001)\r | |
3668 | \r | |
3669 | @retval EAX CPUID_EXTENDED_CPU_SIG.\r | |
3670 | @retval EBX Reserved.\r | |
3671 | @retval ECX Extended Processor Signature and Feature Bits information\r | |
3672 | described by the type CPUID_EXTENDED_CPU_SIG_ECX.\r | |
3673 | @retval EDX Extended Processor Signature and Feature Bits information\r | |
3674 | described by the type CPUID_EXTENDED_CPU_SIG_EDX.\r | |
3675 | \r | |
3676 | <b>Example usage</b>\r | |
3677 | @code\r | |
3678 | UINT32 Eax;\r | |
3679 | CPUID_EXTENDED_CPU_SIG_ECX Ecx;\r | |
3680 | CPUID_EXTENDED_CPU_SIG_EDX Edx;\r | |
3681 | \r | |
3682 | AsmCpuid (CPUID_EXTENDED_CPU_SIG, &Eax, NULL, &Ecx.Uint32, &Edx.Uint32);\r | |
3683 | @endcode\r | |
3684 | **/\r | |
28a7ddf0 MK |
3685 | #define CPUID_EXTENDED_CPU_SIG 0x80000001\r |
3686 | \r | |
57d16ba1 MK |
3687 | /**\r |
3688 | CPUID Extended Processor Signature and Feature Bits ECX for CPUID leaf\r | |
3689 | #CPUID_EXTENDED_CPU_SIG.\r | |
3690 | **/\r | |
3691 | typedef union {\r | |
3692 | ///\r | |
3693 | /// Individual bit fields\r | |
3694 | ///\r | |
3695 | struct {\r | |
3696 | ///\r | |
3697 | /// [Bit 0] LAHF/SAHF available in 64-bit mode.\r | |
3698 | ///\r | |
3699 | UINT32 LAHF_SAHF:1;\r | |
3700 | UINT32 Reserved1:4;\r | |
3701 | ///\r | |
3702 | /// [Bit 5] LZCNT.\r | |
3703 | ///\r | |
3704 | UINT32 LZCNT:1;\r | |
3705 | UINT32 Reserved2:2;\r | |
3706 | ///\r | |
3707 | /// [Bit 8] PREFETCHW.\r | |
3708 | ///\r | |
3709 | UINT32 PREFETCHW:1;\r | |
3710 | UINT32 Reserved3:23;\r | |
3711 | } Bits;\r | |
3712 | ///\r | |
3713 | /// All bit fields as a 32-bit value\r | |
3714 | ///\r | |
3715 | UINT32 Uint32;\r | |
3716 | } CPUID_EXTENDED_CPU_SIG_ECX;\r | |
3717 | \r | |
3718 | /**\r | |
3719 | CPUID Extended Processor Signature and Feature Bits EDX for CPUID leaf\r | |
3720 | #CPUID_EXTENDED_CPU_SIG.\r | |
3721 | **/\r | |
3722 | typedef union {\r | |
3723 | ///\r | |
3724 | /// Individual bit fields\r | |
3725 | ///\r | |
3726 | struct {\r | |
3727 | UINT32 Reserved1:11;\r | |
3728 | ///\r | |
3729 | /// [Bit 11] SYSCALL/SYSRET available in 64-bit mode.\r | |
3730 | ///\r | |
3731 | UINT32 SYSCALL_SYSRET:1;\r | |
3732 | UINT32 Reserved2:8;\r | |
3733 | ///\r | |
3734 | /// [Bit 20] Execute Disable Bit available.\r | |
3735 | ///\r | |
3736 | UINT32 NX:1;\r | |
3737 | UINT32 Reserved3:5;\r | |
3738 | ///\r | |
3739 | /// [Bit 26] 1-GByte pages are available if 1.\r | |
3740 | ///\r | |
3741 | UINT32 Page1GB:1;\r | |
3742 | ///\r | |
3743 | /// [Bit 27] RDTSCP and IA32_TSC_AUX are available if 1.\r | |
3744 | ///\r | |
3745 | UINT32 RDTSCP:1;\r | |
3746 | UINT32 Reserved4:1;\r | |
3747 | ///\r | |
3748 | /// [Bit 29] Intel(R) 64 Architecture available if 1.\r | |
3749 | ///\r | |
3750 | UINT32 LM:1;\r | |
3751 | UINT32 Reserved5:2;\r | |
3752 | } Bits;\r | |
3753 | ///\r | |
3754 | /// All bit fields as a 32-bit value\r | |
3755 | ///\r | |
3756 | UINT32 Uint32;\r | |
3757 | } CPUID_EXTENDED_CPU_SIG_EDX;\r | |
3758 | \r | |
3759 | \r | |
3760 | /**\r | |
3761 | CPUID Processor Brand String\r | |
3762 | \r | |
3763 | @param EAX CPUID_BRAND_STRING1 (0x80000002)\r | |
3764 | \r | |
3765 | @retval EAX Processor Brand String in type CPUID_BRAND_STRING_DATA.\r | |
3766 | @retval EBX Processor Brand String Continued in type CPUID_BRAND_STRING_DATA.\r | |
3767 | @retval ECX Processor Brand String Continued in type CPUID_BRAND_STRING_DATA.\r | |
3768 | @retval EDX Processor Brand String Continued in type CPUID_BRAND_STRING_DATA.\r | |
3769 | \r | |
3770 | <b>Example usage</b>\r | |
3771 | @code\r | |
3772 | CPUID_BRAND_STRING_DATA Eax;\r | |
3773 | CPUID_BRAND_STRING_DATA Ebx;\r | |
3774 | CPUID_BRAND_STRING_DATA Ecx;\r | |
3775 | CPUID_BRAND_STRING_DATA Edx;\r | |
3776 | \r | |
3777 | AsmCpuid (CPUID_BRAND_STRING1, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32);\r | |
3778 | @endcode\r | |
3779 | **/\r | |
28a7ddf0 MK |
3780 | #define CPUID_BRAND_STRING1 0x80000002\r |
3781 | \r | |
57d16ba1 MK |
3782 | /**\r |
3783 | CPUID Processor Brand String for CPUID leafs #CPUID_BRAND_STRING1,\r | |
3784 | #CPUID_BRAND_STRING2, and #CPUID_BRAND_STRING3.\r | |
3785 | **/\r | |
3786 | typedef union {\r | |
3787 | ///\r | |
3788 | /// 4 ASCII characters of Processor Brand String\r | |
3789 | ///\r | |
3790 | CHAR8 BrandString[4];\r | |
3791 | ///\r | |
3792 | /// All fields as a 32-bit value\r | |
3793 | ///\r | |
3794 | UINT32 Uint32;\r | |
3795 | } CPUID_BRAND_STRING_DATA;\r | |
3796 | \r | |
3797 | /**\r | |
3798 | CPUID Processor Brand String\r | |
3799 | \r | |
3800 | @param EAX CPUID_BRAND_STRING2 (0x80000003)\r | |
3801 | \r | |
3802 | @retval EAX Processor Brand String Continued in type CPUID_BRAND_STRING_DATA.\r | |
3803 | @retval EBX Processor Brand String Continued in type CPUID_BRAND_STRING_DATA.\r | |
3804 | @retval ECX Processor Brand String Continued in type CPUID_BRAND_STRING_DATA.\r | |
3805 | @retval EDX Processor Brand String Continued in type CPUID_BRAND_STRING_DATA.\r | |
3806 | \r | |
3807 | <b>Example usage</b>\r | |
3808 | @code\r | |
3809 | CPUID_BRAND_STRING_DATA Eax;\r | |
3810 | CPUID_BRAND_STRING_DATA Ebx;\r | |
3811 | CPUID_BRAND_STRING_DATA Ecx;\r | |
3812 | CPUID_BRAND_STRING_DATA Edx;\r | |
3813 | \r | |
3814 | AsmCpuid (CPUID_BRAND_STRING2, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32);\r | |
3815 | @endcode\r | |
3816 | **/\r | |
28a7ddf0 MK |
3817 | #define CPUID_BRAND_STRING2 0x80000003\r |
3818 | \r | |
57d16ba1 MK |
3819 | /**\r |
3820 | CPUID Processor Brand String\r | |
3821 | \r | |
3822 | @param EAX CPUID_BRAND_STRING3 (0x80000004)\r | |
3823 | \r | |
3824 | @retval EAX Processor Brand String Continued in type CPUID_BRAND_STRING_DATA.\r | |
3825 | @retval EBX Processor Brand String Continued in type CPUID_BRAND_STRING_DATA.\r | |
3826 | @retval ECX Processor Brand String Continued in type CPUID_BRAND_STRING_DATA.\r | |
3827 | @retval EDX Processor Brand String Continued in type CPUID_BRAND_STRING_DATA.\r | |
3828 | \r | |
3829 | <b>Example usage</b>\r | |
3830 | @code\r | |
3831 | CPUID_BRAND_STRING_DATA Eax;\r | |
3832 | CPUID_BRAND_STRING_DATA Ebx;\r | |
3833 | CPUID_BRAND_STRING_DATA Ecx;\r | |
3834 | CPUID_BRAND_STRING_DATA Edx;\r | |
3835 | \r | |
3836 | AsmCpuid (CPUID_BRAND_STRING3, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32);\r | |
3837 | @endcode\r | |
3838 | **/\r | |
28a7ddf0 MK |
3839 | #define CPUID_BRAND_STRING3 0x80000004\r |
3840 | \r | |
57d16ba1 MK |
3841 | \r |
3842 | /**\r | |
3843 | CPUID Extended Cache information\r | |
3844 | \r | |
3845 | @param EAX CPUID_EXTENDED_CACHE_INFO (0x80000006)\r | |
3846 | \r | |
3847 | @retval EAX Reserved.\r | |
3848 | @retval EBX Reserved.\r | |
3849 | @retval ECX Extended cache information described by the type\r | |
3850 | CPUID_EXTENDED_CACHE_INFO_ECX.\r | |
3851 | @retval EDX Reserved.\r | |
3852 | \r | |
3853 | <b>Example usage</b>\r | |
3854 | @code\r | |
3855 | CPUID_EXTENDED_CACHE_INFO_ECX Ecx;\r | |
3856 | \r | |
3857 | AsmCpuid (CPUID_EXTENDED_CACHE_INFO, NULL, NULL, &Ecx.Uint32, NULL);\r | |
3858 | @endcode\r | |
3859 | **/\r | |
3860 | #define CPUID_EXTENDED_CACHE_INFO 0x80000006\r | |
3861 | \r | |
3862 | /**\r | |
3863 | CPUID Extended Cache information ECX for CPUID leaf #CPUID_EXTENDED_CACHE_INFO.\r | |
3864 | **/\r | |
3865 | typedef union {\r | |
3866 | ///\r | |
3867 | /// Individual bit fields\r | |
3868 | ///\r | |
3869 | struct {\r | |
3870 | ///\r | |
3871 | /// [Bits 7:0] Cache line size in bytes.\r | |
3872 | ///\r | |
3873 | UINT32 CacheLineSize:8;\r | |
3874 | UINT32 Reserved:4;\r | |
3875 | ///\r | |
3876 | /// [Bits 15:12] L2 Associativity field. Supported values are in the range\r | |
3877 | /// #CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_DISABLED to\r | |
3878 | /// #CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_FULL\r | |
3879 | ///\r | |
3880 | UINT32 L2Associativity:4;\r | |
3881 | ///\r | |
3882 | /// [Bits 31:16] Cache size in 1K units.\r | |
3883 | ///\r | |
3884 | UINT32 CacheSize:16;\r | |
3885 | } Bits;\r | |
3886 | ///\r | |
3887 | /// All bit fields as a 32-bit value\r | |
3888 | ///\r | |
3889 | UINT32 Uint32;\r | |
3890 | } CPUID_EXTENDED_CACHE_INFO_ECX;\r | |
3891 | \r | |
3892 | ///\r | |
3893 | /// @{ Define value for bit field CPUID_EXTENDED_CACHE_INFO_ECX.L2Associativity\r | |
3894 | ///\r | |
3895 | #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_DISABLED 0x00\r | |
3896 | #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_DIRECT_MAPPED 0x01\r | |
3897 | #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_2_WAY 0x02\r | |
3898 | #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_4_WAY 0x04\r | |
3899 | #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_8_WAY 0x06\r | |
3900 | #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_16_WAY 0x08\r | |
ee27f6ee ED |
3901 | #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_32_WAY 0x0A\r |
3902 | #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_48_WAY 0x0B\r | |
3903 | #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_64_WAY 0x0C\r | |
3904 | #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_96_WAY 0x0D\r | |
3905 | #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_128_WAY 0x0E\r | |
57d16ba1 MK |
3906 | #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_FULL 0x0F\r |
3907 | ///\r | |
3908 | /// @}\r | |
3909 | ///\r | |
3910 | \r | |
3911 | /**\r | |
3912 | CPUID Extended Time Stamp Counter information\r | |
3913 | \r | |
3914 | @param EAX CPUID_EXTENDED_TIME_STAMP_COUNTER (0x80000007)\r | |
3915 | \r | |
3916 | @retval EAX Reserved.\r | |
3917 | @retval EBX Reserved.\r | |
3918 | @retval ECX Reserved.\r | |
3919 | @retval EDX Extended time stamp counter (TSC) information described by the\r | |
3920 | type CPUID_EXTENDED_TIME_STAMP_COUNTER_EDX.\r | |
3921 | \r | |
3922 | <b>Example usage</b>\r | |
3923 | @code\r | |
3924 | CPUID_EXTENDED_TIME_STAMP_COUNTER_EDX Edx;\r | |
3925 | \r | |
3926 | AsmCpuid (CPUID_EXTENDED_TIME_STAMP_COUNTER, NULL, NULL, NULL, &Edx.Uint32);\r | |
3927 | @endcode\r | |
3928 | **/\r | |
3929 | #define CPUID_EXTENDED_TIME_STAMP_COUNTER 0x80000007\r | |
3930 | \r | |
3931 | /**\r | |
3932 | CPUID Extended Time Stamp Counter information EDX for CPUID leaf\r | |
3933 | #CPUID_EXTENDED_TIME_STAMP_COUNTER.\r | |
3934 | **/\r | |
3935 | typedef union {\r | |
3936 | ///\r | |
3937 | /// Individual bit fields\r | |
3938 | ///\r | |
3939 | struct {\r | |
3940 | UINT32 Reserved1:8;\r | |
3941 | ///\r | |
3942 | /// [Bit 8] Invariant TSC available if 1.\r | |
3943 | ///\r | |
3944 | UINT32 InvariantTsc:1;\r | |
3945 | UINT32 Reserved2:23;\r | |
3946 | } Bits;\r | |
3947 | ///\r | |
3948 | /// All bit fields as a 32-bit value\r | |
3949 | ///\r | |
3950 | UINT32 Uint32;\r | |
3951 | } CPUID_EXTENDED_TIME_STAMP_COUNTER_EDX;\r | |
3952 | \r | |
3953 | \r | |
3954 | /**\r | |
3955 | CPUID Linear Physical Address Size\r | |
3956 | \r | |
3957 | @param EAX CPUID_VIR_PHY_ADDRESS_SIZE (0x80000008)\r | |
3958 | \r | |
3959 | @retval EAX Linear/Physical Address Size described by the type\r | |
3960 | CPUID_VIR_PHY_ADDRESS_SIZE_EAX.\r | |
3961 | @retval EBX Reserved.\r | |
3962 | @retval ECX Reserved.\r | |
3963 | @retval EDX Reserved.\r | |
3964 | \r | |
3965 | <b>Example usage</b>\r | |
3966 | @code\r | |
3967 | CPUID_VIR_PHY_ADDRESS_SIZE_EAX Eax;\r | |
3968 | \r | |
3969 | AsmCpuid (CPUID_VIR_PHY_ADDRESS_SIZE, &Eax.Uint32, NULL, NULL, NULL);\r | |
3970 | @endcode\r | |
3971 | **/\r | |
28a7ddf0 MK |
3972 | #define CPUID_VIR_PHY_ADDRESS_SIZE 0x80000008\r |
3973 | \r | |
57d16ba1 MK |
3974 | /**\r |
3975 | CPUID Linear Physical Address Size EAX for CPUID leaf\r | |
3976 | #CPUID_VIR_PHY_ADDRESS_SIZE.\r | |
3977 | **/\r | |
3978 | typedef union {\r | |
3979 | ///\r | |
3980 | /// Individual bit fields\r | |
3981 | ///\r | |
3982 | struct {\r | |
3983 | ///\r | |
3984 | /// [Bits 7:0] Number of physical address bits.\r | |
3985 | ///\r | |
3986 | /// @note\r | |
3987 | /// If CPUID.80000008H:EAX[7:0] is supported, the maximum physical address\r | |
3988 | /// number supported should come from this field.\r | |
3989 | ///\r | |
3990 | UINT32 PhysicalAddressBits:8;\r | |
3991 | ///\r | |
3992 | /// [Bits 15:8] Number of linear address bits.\r | |
3993 | ///\r | |
3994 | UINT32 LinearAddressBits:8;\r | |
3995 | UINT32 Reserved:16;\r | |
3996 | } Bits;\r | |
3997 | ///\r | |
3998 | /// All bit fields as a 32-bit value\r | |
3999 | ///\r | |
4000 | UINT32 Uint32;\r | |
4001 | } CPUID_VIR_PHY_ADDRESS_SIZE_EAX;\r | |
4002 | \r | |
28a7ddf0 | 4003 | #endif\r |