2 CPUID leaf definitions.
4 Provides defines for CPUID leaf indexes. Data structures are provided for
5 registers returned by a CPUID leaf that contain one or more bit fields.
6 If a register returned is a single 32-bit value, then a data structure is
7 not provided for that register.
9 Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.<BR>
10 This program and the accompanying materials are licensed and made available under
11 the terms and conditions of the BSD License which accompanies this distribution.
12 The full text of the license may be found at
13 http://opensource.org/licenses/bsd-license.php
15 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
16 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 @par Specification Reference:
19 Intel(R) 64 and IA-32 Architectures Software Developer's Manual, Volume 2A,
20 November 2018, CPUID instruction.
28 CPUID Signature Information
30 @param EAX CPUID_SIGNATURE (0x00)
32 @retval EAX Returns the highest value the CPUID instruction recognizes for
33 returning basic processor information. The value is returned is
35 @retval EBX First 4 characters of a vendor identification string.
36 @retval ECX Last 4 characters of a vendor identification string.
37 @retval EDX Middle 4 characters of a vendor identification string.
46 AsmCpuid (CPUID_SIGNATURE, &Eax, &Ebx, &Ecx, &Edx);
49 #define CPUID_SIGNATURE 0x00
52 /// @{ CPUID signature values returned by Intel processors
54 #define CPUID_SIGNATURE_GENUINE_INTEL_EBX SIGNATURE_32 ('G', 'e', 'n', 'u')
55 #define CPUID_SIGNATURE_GENUINE_INTEL_EDX SIGNATURE_32 ('i', 'n', 'e', 'I')
56 #define CPUID_SIGNATURE_GENUINE_INTEL_ECX SIGNATURE_32 ('n', 't', 'e', 'l')
63 CPUID Version Information
65 @param EAX CPUID_VERSION_INFO (0x01)
67 @retval EAX Returns Model, Family, Stepping Information described by the
68 type CPUID_VERSION_INFO_EAX.
69 @retval EBX Returns Brand, Cache Line Size, and Initial APIC ID described by
70 the type CPUID_VERSION_INFO_EBX.
71 @retval ECX CPU Feature Information described by the type
72 CPUID_VERSION_INFO_ECX.
73 @retval EDX CPU Feature Information described by the type
74 CPUID_VERSION_INFO_EDX.
78 CPUID_VERSION_INFO_EAX Eax;
79 CPUID_VERSION_INFO_EBX Ebx;
80 CPUID_VERSION_INFO_ECX Ecx;
81 CPUID_VERSION_INFO_EDX Edx;
83 AsmCpuid (CPUID_VERSION_INFO, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32);
86 #define CPUID_VERSION_INFO 0x01
89 CPUID Version Information returned in EAX for CPUID leaf
94 /// Individual bit fields
97 UINT32 SteppingId
:4; ///< [Bits 3:0] Stepping ID
98 UINT32 Model
:4; ///< [Bits 7:4] Model
99 UINT32 FamilyId
:4; ///< [Bits 11:8] Family
100 UINT32 ProcessorType
:2; ///< [Bits 13:12] Processor Type
101 UINT32 Reserved1
:2; ///< [Bits 15:14] Reserved
102 UINT32 ExtendedModelId
:4; ///< [Bits 19:16] Extended Model ID
103 UINT32 ExtendedFamilyId
:8; ///< [Bits 27:20] Extended Family ID
104 UINT32 Reserved2
:4; ///< Reserved
107 /// All bit fields as a 32-bit value
110 } CPUID_VERSION_INFO_EAX
;
113 /// @{ Define value for bit field CPUID_VERSION_INFO_EAX.ProcessorType
115 #define CPUID_VERSION_INFO_EAX_PROCESSOR_TYPE_ORIGINAL_OEM_PROCESSOR 0x00
116 #define CPUID_VERSION_INFO_EAX_PROCESSOR_TYPE_INTEL_OVERDRIVE_PROCESSOR 0x01
117 #define CPUID_VERSION_INFO_EAX_PROCESSOR_TYPE_DUAL_PROCESSOR 0x02
123 CPUID Version Information returned in EBX for CPUID leaf
128 /// Individual bit fields
132 /// [Bits 7:0] Provides an entry into a brand string table that contains
133 /// brand strings for IA-32 processors.
137 /// [Bits 15:8] Indicates the size of the cache line flushed by the CLFLUSH
138 /// and CLFLUSHOPT instructions in 8-byte increments. This field was
139 /// introduced in the Pentium 4 processor.
141 UINT32 CacheLineSize
:8;
143 /// [Bits 23:16] Maximum number of addressable IDs for logical processors
144 /// in this physical package.
147 /// The nearest power-of-2 integer that is not smaller than EBX[23:16] is
148 /// the number of unique initial APICIDs reserved for addressing different
149 /// logical processors in a physical package. This field is only valid if
150 /// CPUID.1.EDX.HTT[bit 28]= 1.
152 UINT32 MaximumAddressableIdsForLogicalProcessors
:8;
154 /// [Bits 31:24] The 8-bit ID that is assigned to the local APIC on the
155 /// processor during power up. This field was introduced in the Pentium 4
158 UINT32 InitialLocalApicId
:8;
161 /// All bit fields as a 32-bit value
164 } CPUID_VERSION_INFO_EBX
;
167 CPUID Version Information returned in ECX for CPUID leaf
172 /// Individual bit fields
176 /// [Bit 0] Streaming SIMD Extensions 3 (SSE3). A value of 1 indicates the
177 /// processor supports this technology
181 /// [Bit 1] A value of 1 indicates the processor supports the PCLMULQDQ
182 /// instruction. Carryless Multiplication
186 /// [Bit 2] 64-bit DS Area. A value of 1 indicates the processor supports
187 /// DS area using 64-bit layout.
191 /// [Bit 3] MONITOR/MWAIT. A value of 1 indicates the processor supports
196 /// [Bit 4] CPL Qualified Debug Store. A value of 1 indicates the processor
197 /// supports the extensions to the Debug Store feature to allow for branch
198 /// message storage qualified by CPL
202 /// [Bit 5] Virtual Machine Extensions. A value of 1 indicates that the
203 /// processor supports this technology.
207 /// [Bit 6] Safer Mode Extensions. A value of 1 indicates that the processor
208 /// supports this technology
212 /// [Bit 7] Enhanced Intel SpeedStep(R) technology. A value of 1 indicates
213 /// that the processor supports this technology
217 /// [Bit 8] Thermal Monitor 2. A value of 1 indicates whether the processor
218 /// supports this technology
222 /// [Bit 9] A value of 1 indicates the presence of the Supplemental Streaming
223 /// SIMD Extensions 3 (SSSE3). A value of 0 indicates the instruction
224 /// extensions are not present in the processor.
228 /// [Bit 10] L1 Context ID. A value of 1 indicates the L1 data cache mode
229 /// can be set to either adaptive mode or shared mode. A value of 0 indicates
230 /// this feature is not supported. See definition of the IA32_MISC_ENABLE MSR
231 /// Bit 24 (L1 Data Cache Context Mode) for details
235 /// [Bit 11] A value of 1 indicates the processor supports IA32_DEBUG_INTERFACE
236 /// MSR for silicon debug
240 /// [Bit 12] A value of 1 indicates the processor supports FMA (Fused Multiple
241 /// Add) extensions using YMM state.
245 /// [Bit 13] CMPXCHG16B Available. A value of 1 indicates that the feature
250 /// [Bit 14] xTPR Update Control. A value of 1 indicates that the processor
251 /// supports changing IA32_MISC_ENABLE[Bit 23].
253 UINT32 xTPR_Update_Control
:1;
255 /// [Bit 15] Perfmon and Debug Capability: A value of 1 indicates the
256 /// processor supports the performance and debug feature indication MSR
257 /// IA32_PERF_CAPABILITIES.
262 /// [Bit 17] Process-context identifiers. A value of 1 indicates that the
263 /// processor supports PCIDs and that software may set CR4.PCIDE to 1.
267 /// [Bit 18] A value of 1 indicates the processor supports the ability to
268 /// prefetch data from a memory mapped device. Direct Cache Access.
272 /// [Bit 19] A value of 1 indicates that the processor supports SSE4.1.
276 /// [Bit 20] A value of 1 indicates that the processor supports SSE4.2.
280 /// [Bit 21] A value of 1 indicates that the processor supports x2APIC
285 /// [Bit 22] A value of 1 indicates that the processor supports MOVBE
290 /// [Bit 23] A value of 1 indicates that the processor supports the POPCNT
295 /// [Bit 24] A value of 1 indicates that the processor's local APIC timer
296 /// supports one-shot operation using a TSC deadline value.
298 UINT32 TSC_Deadline
:1;
300 /// [Bit 25] A value of 1 indicates that the processor supports the AESNI
301 /// instruction extensions.
305 /// [Bit 26] A value of 1 indicates that the processor supports the
306 /// XSAVE/XRSTOR processor extended states feature, the XSETBV/XGETBV
307 /// instructions, and XCR0.
311 /// [Bit 27] A value of 1 indicates that the OS has set CR4.OSXSAVE[Bit 18]
312 /// to enable XSETBV/XGETBV instructions to access XCR0 and to support
313 /// processor extended state management using XSAVE/XRSTOR.
317 /// [Bit 28] A value of 1 indicates the processor supports the AVX instruction
322 /// [Bit 29] A value of 1 indicates that processor supports 16-bit
323 /// floating-point conversion instructions.
327 /// [Bit 30] A value of 1 indicates that processor supports RDRAND instruction.
331 /// [Bit 31] Always returns 0.
336 /// All bit fields as a 32-bit value
339 } CPUID_VERSION_INFO_ECX
;
342 CPUID Version Information returned in EDX for CPUID leaf
347 /// Individual bit fields
351 /// [Bit 0] Floating Point Unit On-Chip. The processor contains an x87 FPU.
355 /// [Bit 1] Virtual 8086 Mode Enhancements. Virtual 8086 mode enhancements,
356 /// including CR4.VME for controlling the feature, CR4.PVI for protected
357 /// mode virtual interrupts, software interrupt indirection, expansion of
358 /// the TSS with the software indirection bitmap, and EFLAGS.VIF and
359 /// EFLAGS.VIP flags.
363 /// [Bit 2] Debugging Extensions. Support for I/O breakpoints, including
364 /// CR4.DE for controlling the feature, and optional trapping of accesses to
369 /// [Bit 3] Page Size Extension. Large pages of size 4 MByte are supported,
370 /// including CR4.PSE for controlling the feature, the defined dirty bit in
371 /// PDE (Page Directory Entries), optional reserved bit trapping in CR3,
376 /// [Bit 4] Time Stamp Counter. The RDTSC instruction is supported,
377 /// including CR4.TSD for controlling privilege.
381 /// [Bit 5] Model Specific Registers RDMSR and WRMSR Instructions. The
382 /// RDMSR and WRMSR instructions are supported. Some of the MSRs are
383 /// implementation dependent.
387 /// [Bit 6] Physical Address Extension. Physical addresses greater than 32
388 /// bits are supported: extended page table entry formats, an extra level in
389 /// the page translation tables is defined, 2-MByte pages are supported
390 /// instead of 4 Mbyte pages if PAE bit is 1.
394 /// [Bit 7] Machine Check Exception. Exception 18 is defined for Machine
395 /// Checks, including CR4.MCE for controlling the feature. This feature does
396 /// not define the model-specific implementations of machine-check error
397 /// logging, reporting, and processor shutdowns. Machine Check exception
398 /// handlers may have to depend on processor version to do model specific
399 /// processing of the exception, or test for the presence of the Machine
404 /// [Bit 8] CMPXCHG8B Instruction. The compare-and-exchange 8 bytes(64 bits)
405 /// instruction is supported (implicitly locked and atomic).
409 /// [Bit 9] APIC On-Chip. The processor contains an Advanced Programmable
410 /// Interrupt Controller (APIC), responding to memory mapped commands in the
411 /// physical address range FFFE0000H to FFFE0FFFH (by default - some
412 /// processors permit the APIC to be relocated).
417 /// [Bit 11] SYSENTER and SYSEXIT Instructions. The SYSENTER and SYSEXIT
418 /// and associated MSRs are supported.
422 /// [Bit 12] Memory Type Range Registers. MTRRs are supported. The MTRRcap
423 /// MSR contains feature bits that describe what memory types are supported,
424 /// how many variable MTRRs are supported, and whether fixed MTRRs are
429 /// [Bit 13] Page Global Bit. The global bit is supported in paging-structure
430 /// entries that map a page, indicating TLB entries that are common to
431 /// different processes and need not be flushed. The CR4.PGE bit controls
436 /// [Bit 14] Machine Check Architecture. A value of 1 indicates the Machine
437 /// Check Architecture of reporting machine errors is supported. The MCG_CAP
438 /// MSR contains feature bits describing how many banks of error reporting
439 /// MSRs are supported.
443 /// [Bit 15] Conditional Move Instructions. The conditional move instruction
444 /// CMOV is supported. In addition, if x87 FPU is present as indicated by the
445 /// CPUID.FPU feature bit, then the FCOMI and FCMOV instructions are supported.
449 /// [Bit 16] Page Attribute Table. Page Attribute Table is supported. This
450 /// feature augments the Memory Type Range Registers (MTRRs), allowing an
451 /// operating system to specify attributes of memory accessed through a
452 /// linear address on a 4KB granularity.
456 /// [Bit 17] 36-Bit Page Size Extension. 4-MByte pages addressing physical
457 /// memory beyond 4 GBytes are supported with 32-bit paging. This feature
458 /// indicates that upper bits of the physical address of a 4-MByte page are
459 /// encoded in bits 20:13 of the page-directory entry. Such physical
460 /// addresses are limited by MAXPHYADDR and may be up to 40 bits in size.
464 /// [Bit 18] Processor Serial Number. The processor supports the 96-bit
465 /// processor identification number feature and the feature is enabled.
469 /// [Bit 19] CLFLUSH Instruction. CLFLUSH Instruction is supported.
474 /// [Bit 21] Debug Store. The processor supports the ability to write debug
475 /// information into a memory resident buffer. This feature is used by the
476 /// branch trace store (BTS) and precise event-based sampling (PEBS)
481 /// [Bit 22] Thermal Monitor and Software Controlled Clock Facilities. The
482 /// processor implements internal MSRs that allow processor temperature to
483 /// be monitored and processor performance to be modulated in predefined
484 /// duty cycles under software control.
488 /// [Bit 23] Intel MMX Technology. The processor supports the Intel MMX
493 /// [Bit 24] FXSAVE and FXRSTOR Instructions. The FXSAVE and FXRSTOR
494 /// instructions are supported for fast save and restore of the floating
495 /// point context. Presence of this bit also indicates that CR4.OSFXSR is
496 /// available for an operating system to indicate that it supports the
497 /// FXSAVE and FXRSTOR instructions.
501 /// [Bit 25] SSE. The processor supports the SSE extensions.
505 /// [Bit 26] SSE2. The processor supports the SSE2 extensions.
509 /// [Bit 27] Self Snoop. The processor supports the management of
510 /// conflicting memory types by performing a snoop of its own cache
511 /// structure for transactions issued to the bus.
515 /// [Bit 28] Max APIC IDs reserved field is Valid. A value of 0 for HTT
516 /// indicates there is only a single logical processor in the package and
517 /// software should assume only a single APIC ID is reserved. A value of 1
518 /// for HTT indicates the value in CPUID.1.EBX[23:16] (the Maximum number of
519 /// addressable IDs for logical processors in this package) is valid for the
524 /// [Bit 29] Thermal Monitor. The processor implements the thermal monitor
525 /// automatic thermal control circuitry (TCC).
530 /// [Bit 31] Pending Break Enable. The processor supports the use of the
531 /// FERR#/PBE# pin when the processor is in the stop-clock state (STPCLK# is
532 /// asserted) to signal the processor that an interrupt is pending and that
533 /// the processor should return to normal operation to handle the interrupt.
534 /// Bit 10 (PBE enable) in the IA32_MISC_ENABLE MSR enables this capability.
539 /// All bit fields as a 32-bit value
542 } CPUID_VERSION_INFO_EDX
;
546 CPUID Cache and TLB Information
548 @param EAX CPUID_CACHE_INFO (0x02)
550 @retval EAX Cache and TLB Information described by the type
551 CPUID_CACHE_INFO_CACHE_TLB.
552 CPUID_CACHE_INFO_CACHE_TLB.CacheDescriptor[0] always returns
553 0x01 and must be ignored. Only valid if
554 CPUID_CACHE_INFO_CACHE_TLB.Bits.NotValid is clear.
555 @retval EBX Cache and TLB Information described by the type
556 CPUID_CACHE_INFO_CACHE_TLB. Only valid if
557 CPUID_CACHE_INFO_CACHE_TLB.Bits.NotValid is clear.
558 @retval ECX Cache and TLB Information described by the type
559 CPUID_CACHE_INFO_CACHE_TLB. Only valid if
560 CPUID_CACHE_INFO_CACHE_TLB.Bits.NotValid is clear.
561 @retval EDX Cache and TLB Information described by the type
562 CPUID_CACHE_INFO_CACHE_TLB. Only valid if
563 CPUID_CACHE_INFO_CACHE_TLB.Bits.NotValid is clear.
567 CPUID_CACHE_INFO_CACHE_TLB Eax;
568 CPUID_CACHE_INFO_CACHE_TLB Ebx;
569 CPUID_CACHE_INFO_CACHE_TLB Ecx;
570 CPUID_CACHE_INFO_CACHE_TLB Edx;
572 AsmCpuid (CPUID_CACHE_INFO, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32);
575 <b>Cache Descriptor values</b>
577 <tr><th>Value </th><th> Type </th><th> Description </th></tr>
578 <tr><td> 0x00 </td><td> General </td><td> Null descriptor, this byte contains no information</td></tr>
579 <tr><td> 0x01 </td><td> TLB </td><td> Instruction TLB: 4 KByte pages, 4-way set associative, 32 entries</td></tr>
580 <tr><td> 0x02 </td><td> TLB </td><td> Instruction TLB: 4 MByte pages, fully associative, 2 entries</td></tr>
581 <tr><td> 0x03 </td><td> TLB </td><td> Data TLB: 4 KByte pages, 4-way set associative, 64 entries</td></tr>
582 <tr><td> 0x04 </td><td> TLB </td><td> Data TLB: 4 MByte pages, 4-way set associative, 8 entries</td></tr>
583 <tr><td> 0x05 </td><td> TLB </td><td> Data TLB1: 4 MByte pages, 4-way set associative, 32 entries</td></tr>
584 <tr><td> 0x06 </td><td> Cache </td><td> 1st-level instruction cache: 8 KBytes, 4-way set associative,
585 32 byte line size</td></tr>
586 <tr><td> 0x08 </td><td> Cache </td><td> 1st-level instruction cache: 16 KBytes, 4-way set associative,
587 32 byte line size</td></tr>
588 <tr><td> 0x09 </td><td> Cache </td><td> 1st-level instruction cache: 32KBytes, 4-way set associative,
589 64 byte line size</td></tr>
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>
591 <tr><td> 0x0B </td><td> TLB </td><td> Instruction TLB: 4 MByte pages, 4-way set associative, 4 entries</td></tr>
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>
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>
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>
595 <tr><td> 0x1D </td><td> Cache </td><td> 2nd-level cache: 128 KBytes, 2-way set associative, 64 byte line size</td></tr>
596 <tr><td> 0x21 </td><td> Cache </td><td> 2nd-level cache: 256 KBytes, 8-way set associative, 64 byte line size</td></tr>
597 <tr><td> 0x22 </td><td> Cache </td><td> 3rd-level cache: 512 KBytes, 4-way set associative, 64 byte line size,
598 2 lines per sector</td></tr>
599 <tr><td> 0x23 </td><td> Cache </td><td> 3rd-level cache: 1 MBytes, 8-way set associative, 64 byte line size,
600 2 lines per sector</td></tr>
601 <tr><td> 0x24 </td><td> Cache </td><td> 2nd-level cache: 1 MBytes, 16-way set associative, 64 byte line size</td></tr>
602 <tr><td> 0x25 </td><td> Cache </td><td> 3rd-level cache: 2 MBytes, 8-way set associative, 64 byte line size,
603 2 lines per sector</td></tr>
604 <tr><td> 0x29 </td><td> Cache </td><td> 3rd-level cache: 4 MBytes, 8-way set associative, 64 byte line size,
605 2 lines per sector</td></tr>
606 <tr><td> 0x2C </td><td> Cache </td><td> 1st-level data cache: 32 KBytes, 8-way set associative,
607 64 byte line size</td></tr>
608 <tr><td> 0x30 </td><td> Cache </td><td> 1st-level instruction cache: 32 KBytes, 8-way set associative,
609 64 byte line size</td></tr>
610 <tr><td> 0x40 </td><td> Cache </td><td> No 2nd-level cache or, if processor contains a valid 2nd-level cache,
611 no 3rd-level cache</td></tr>
612 <tr><td> 0x41 </td><td> Cache </td><td> 2nd-level cache: 128 KBytes, 4-way set associative, 32 byte line size</td></tr>
613 <tr><td> 0x42 </td><td> Cache </td><td> 2nd-level cache: 256 KBytes, 4-way set associative, 32 byte line size</td></tr>
614 <tr><td> 0x43 </td><td> Cache </td><td> 2nd-level cache: 512 KBytes, 4-way set associative, 32 byte line size</td></tr>
615 <tr><td> 0x44 </td><td> Cache </td><td> 2nd-level cache: 1 MByte, 4-way set associative, 32 byte line size</td></tr>
616 <tr><td> 0x45 </td><td> Cache </td><td> 2nd-level cache: 2 MByte, 4-way set associative, 32 byte line size</td></tr>
617 <tr><td> 0x46 </td><td> Cache </td><td> 3rd-level cache: 4 MByte, 4-way set associative, 64 byte line size</td></tr>
618 <tr><td> 0x47 </td><td> Cache </td><td> 3rd-level cache: 8 MByte, 8-way set associative, 64 byte line size</td></tr>
619 <tr><td> 0x48 </td><td> Cache </td><td> 2nd-level cache: 3MByte, 12-way set associative, 64 byte line size</td></tr>
620 <tr><td> 0x49 </td><td> Cache </td><td> 3rd-level cache: 4MB, 16-way set associative, 64-byte line size
621 (Intel Xeon processor MP, Family 0FH, Model 06H)<BR>
622 2nd-level cache: 4 MByte, 16-way set associative, 64 byte line size</td></tr>
623 <tr><td> 0x4A </td><td> Cache </td><td> 3rd-level cache: 6MByte, 12-way set associative, 64 byte line size</td></tr>
624 <tr><td> 0x4B </td><td> Cache </td><td> 3rd-level cache: 8MByte, 16-way set associative, 64 byte line size</td></tr>
625 <tr><td> 0x4C </td><td> Cache </td><td> 3rd-level cache: 12MByte, 12-way set associative, 64 byte line size</td></tr>
626 <tr><td> 0x4D </td><td> Cache </td><td> 3rd-level cache: 16MByte, 16-way set associative, 64 byte line size</td></tr>
627 <tr><td> 0x4E </td><td> Cache </td><td> 2nd-level cache: 6MByte, 24-way set associative, 64 byte line size</td></tr>
628 <tr><td> 0x4F </td><td> TLB </td><td> Instruction TLB: 4 KByte pages, 32 entries</td></tr>
629 <tr><td> 0x50 </td><td> TLB </td><td> Instruction TLB: 4 KByte and 2-MByte or 4-MByte pages, 64 entries</td></tr>
630 <tr><td> 0x51 </td><td> TLB </td><td> Instruction TLB: 4 KByte and 2-MByte or 4-MByte pages, 128 entries</td></tr>
631 <tr><td> 0x52 </td><td> TLB </td><td> Instruction TLB: 4 KByte and 2-MByte or 4-MByte pages, 256 entries</td></tr>
632 <tr><td> 0x55 </td><td> TLB </td><td> Instruction TLB: 2-MByte or 4-MByte pages, fully associative, 7 entries</td></tr>
633 <tr><td> 0x56 </td><td> TLB </td><td> Data TLB0: 4 MByte pages, 4-way set associative, 16 entries</td></tr>
634 <tr><td> 0x57 </td><td> TLB </td><td> Data TLB0: 4 KByte pages, 4-way associative, 16 entries</td></tr>
635 <tr><td> 0x59 </td><td> TLB </td><td> Data TLB0: 4 KByte pages, fully associative, 16 entries</td></tr>
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>
637 <tr><td> 0x5B </td><td> TLB </td><td> Data TLB: 4 KByte and 4 MByte pages, 64 entries</td></tr>
638 <tr><td> 0x5C </td><td> TLB </td><td> Data TLB: 4 KByte and 4 MByte pages,128 entries</td></tr>
639 <tr><td> 0x5D </td><td> TLB </td><td> Data TLB: 4 KByte and 4 MByte pages,256 entries</td></tr>
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>
641 <tr><td> 0x61 </td><td> TLB </td><td> Instruction TLB: 4 KByte pages, fully associative, 48 entries</td></tr>
642 <tr><td> 0x63 </td><td> TLB </td><td> Data TLB: 2 MByte or 4 MByte pages, 4-way set associative,
643 32 entries and a separate array with 1 GByte pages, 4-way set associative,
645 <tr><td> 0x64 </td><td> TLB </td><td> Data TLB: 4 KByte pages, 4-way set associative, 512 entries</td></tr>
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>
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>
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>
649 <tr><td> 0x6A </td><td> Cache </td><td> uTLB: 4 KByte pages, 8-way set associative, 64 entries</td></tr>
650 <tr><td> 0x6B </td><td> Cache </td><td> DTLB: 4 KByte pages, 8-way set associative, 256 entries</td></tr>
651 <tr><td> 0x6C </td><td> Cache </td><td> DTLB: 2M/4M pages, 8-way set associative, 128 entries</td></tr>
652 <tr><td> 0x6D </td><td> Cache </td><td> DTLB: 1 GByte pages, fully associative, 16 entries</td></tr>
653 <tr><td> 0x70 </td><td> Cache </td><td> Trace cache: 12 K-uop, 8-way set associative</td></tr>
654 <tr><td> 0x71 </td><td> Cache </td><td> Trace cache: 16 K-uop, 8-way set associative</td></tr>
655 <tr><td> 0x72 </td><td> Cache </td><td> Trace cache: 32 K-uop, 8-way set associative</td></tr>
656 <tr><td> 0x76 </td><td> TLB </td><td> Instruction TLB: 2M/4M pages, fully associative, 8 entries</td></tr>
657 <tr><td> 0x78 </td><td> Cache </td><td> 2nd-level cache: 1 MByte, 4-way set associative, 64byte line size</td></tr>
658 <tr><td> 0x79 </td><td> Cache </td><td> 2nd-level cache: 128 KByte, 8-way set associative, 64 byte line size,
659 2 lines per sector</td></tr>
660 <tr><td> 0x7A </td><td> Cache </td><td> 2nd-level cache: 256 KByte, 8-way set associative, 64 byte line size,
661 2 lines per sector</td></tr>
662 <tr><td> 0x7B </td><td> Cache </td><td> 2nd-level cache: 512 KByte, 8-way set associative, 64 byte line size,
663 2 lines per sector</td></tr>
664 <tr><td> 0x7C </td><td> Cache </td><td> 2nd-level cache: 1 MByte, 8-way set associative, 64 byte line size,
665 2 lines per sector</td></tr>
666 <tr><td> 0x7D </td><td> Cache </td><td> 2nd-level cache: 2 MByte, 8-way set associative, 64byte line size</td></tr>
667 <tr><td> 0x7F </td><td> Cache </td><td> 2nd-level cache: 512 KByte, 2-way set associative, 64-byte line size</td></tr>
668 <tr><td> 0x80 </td><td> Cache </td><td> 2nd-level cache: 512 KByte, 8-way set associative, 64-byte line size</td></tr>
669 <tr><td> 0x82 </td><td> Cache </td><td> 2nd-level cache: 256 KByte, 8-way set associative, 32 byte line size</td></tr>
670 <tr><td> 0x83 </td><td> Cache </td><td> 2nd-level cache: 512 KByte, 8-way set associative, 32 byte line size</td></tr>
671 <tr><td> 0x84 </td><td> Cache </td><td> 2nd-level cache: 1 MByte, 8-way set associative, 32 byte line size</td></tr>
672 <tr><td> 0x85 </td><td> Cache </td><td> 2nd-level cache: 2 MByte, 8-way set associative, 32 byte line size</td></tr>
673 <tr><td> 0x86 </td><td> Cache </td><td> 2nd-level cache: 512 KByte, 4-way set associative, 64 byte line size</td></tr>
674 <tr><td> 0x87 </td><td> Cache </td><td> 2nd-level cache: 1 MByte, 8-way set associative, 64 byte line size</td></tr>
675 <tr><td> 0xA0 </td><td> DTLB </td><td> DTLB: 4k pages, fully associative, 32 entries</td></tr>
676 <tr><td> 0xB0 </td><td> TLB </td><td> Instruction TLB: 4 KByte pages, 4-way set associative, 128 entries</td></tr>
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>
678 <tr><td> 0xB2 </td><td> TLB </td><td> Instruction TLB: 4KByte pages, 4-way set associative, 64 entries</td></tr>
679 <tr><td> 0xB3 </td><td> TLB </td><td> Data TLB: 4 KByte pages, 4-way set associative, 128 entries</td></tr>
680 <tr><td> 0xB4 </td><td> TLB </td><td> Data TLB1: 4 KByte pages, 4-way associative, 256 entries</td></tr>
681 <tr><td> 0xB5 </td><td> TLB </td><td> Instruction TLB: 4KByte pages, 8-way set associative, 64 entries</td></tr>
682 <tr><td> 0xB6 </td><td> TLB </td><td> Instruction TLB: 4KByte pages, 8-way set associative,
683 128 entries</td></tr>
684 <tr><td> 0xBA </td><td> TLB </td><td> Data TLB1: 4 KByte pages, 4-way associative, 64 entries</td></tr>
685 <tr><td> 0xC0 </td><td> TLB </td><td> Data TLB: 4 KByte and 4 MByte pages, 4-way associative, 8 entries</td></tr>
686 <tr><td> 0xC1 </td><td> STLB </td><td> Shared 2nd-Level TLB: 4 KByte/2MByte pages, 8-way associative,
687 1024 entries</td></tr>
688 <tr><td> 0xC2 </td><td> DTLB </td><td> DTLB: 4 KByte/2 MByte pages, 4-way associative, 16 entries</td></tr>
689 <tr><td> 0xC3 </td><td> STLB </td><td> Shared 2nd-Level TLB: 4 KByte /2 MByte pages, 6-way associative,
690 1536 entries. Also 1GBbyte pages, 4-way, 16 entries.</td></tr>
691 <tr><td> 0xC4 </td><td> DTLB </td><td> DTLB: 2M/4M Byte pages, 4-way associative, 32 entries</td></tr>
692 <tr><td> 0xCA </td><td> STLB </td><td> Shared 2nd-Level TLB: 4 KByte pages, 4-way associative, 512 entries</td></tr>
693 <tr><td> 0xD0 </td><td> Cache </td><td> 3rd-level cache: 512 KByte, 4-way set associative, 64 byte line size</td></tr>
694 <tr><td> 0xD1 </td><td> Cache </td><td> 3rd-level cache: 1 MByte, 4-way set associative, 64 byte line size</td></tr>
695 <tr><td> 0xD2 </td><td> Cache </td><td> 3rd-level cache: 2 MByte, 4-way set associative, 64 byte line size</td></tr>
696 <tr><td> 0xD6 </td><td> Cache </td><td> 3rd-level cache: 1 MByte, 8-way set associative, 64 byte line size</td></tr>
697 <tr><td> 0xD7 </td><td> Cache </td><td> 3rd-level cache: 2 MByte, 8-way set associative, 64 byte line size</td></tr>
698 <tr><td> 0xD8 </td><td> Cache </td><td> 3rd-level cache: 4 MByte, 8-way set associative, 64 byte line size</td></tr>
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>
700 <tr><td> 0xDD </td><td> Cache </td><td> 3rd-level cache: 3 MByte, 12-way set associative, 64 byte line size</td></tr>
701 <tr><td> 0xDE </td><td> Cache </td><td> 3rd-level cache: 6 MByte, 12-way set associative, 64 byte line size</td></tr>
702 <tr><td> 0xE2 </td><td> Cache </td><td> 3rd-level cache: 2 MByte, 16-way set associative, 64 byte line size</td></tr>
703 <tr><td> 0xE3 </td><td> Cache </td><td> 3rd-level cache: 4 MByte, 16-way set associative, 64 byte line size</td></tr>
704 <tr><td> 0xE4 </td><td> Cache </td><td> 3rd-level cache: 8 MByte, 16-way set associative, 64 byte line size</td></tr>
705 <tr><td> 0xEA </td><td> Cache </td><td> 3rd-level cache: 12MByte, 24-way set associative, 64 byte line size</td></tr>
706 <tr><td> 0xEB </td><td> Cache </td><td> 3rd-level cache: 18MByte, 24-way set associative, 64 byte line size</td></tr>
707 <tr><td> 0xEC </td><td> Cache </td><td> 3rd-level cache: 24MByte, 24-way set associative, 64 byte line size</td></tr>
708 <tr><td> 0xF0 </td><td> Prefetch</td><td> 64-Byte prefetching</td></tr>
709 <tr><td> 0xF1 </td><td> Prefetch</td><td> 128-Byte prefetching</td></tr>
710 <tr><td> 0xFE </td><td> General </td><td> CPUID leaf 2 does not report TLB descriptor information; use CPUID
711 leaf 18H to query TLB and other address translation parameters.</td></tr>
712 <tr><td> 0xFF </td><td> General </td><td> CPUID leaf 2 does not report cache descriptor information,
713 use CPUID leaf 4 to query cache parameters</td></tr>
716 #define CPUID_CACHE_INFO 0x02
719 CPUID Cache and TLB Information returned in EAX, EBX, ECX, and EDX for CPUID
720 leaf #CPUID_CACHE_INFO.
724 /// Individual bit fields
729 /// [Bit 31] If 0, then the cache descriptor bytes in the register are valid.
730 /// if 1, then none of the cache descriptor bytes in the register are valid.
735 /// Array of Cache and TLB descriptor bytes
737 UINT8 CacheDescriptor
[4];
739 /// All bit fields as a 32-bit value
742 } CPUID_CACHE_INFO_CACHE_TLB
;
746 CPUID Processor Serial Number
748 Processor serial number (PSN) is not supported in the Pentium 4 processor
749 or later. On all models, use the PSN flag (returned using CPUID) to check
750 for PSN support before accessing the feature.
752 @param EAX CPUID_SERIAL_NUMBER (0x03)
754 @retval EAX Reserved.
755 @retval EBX Reserved.
756 @retval ECX Bits 31:0 of 96 bit processor serial number. (Available in
757 Pentium III processor only; otherwise, the value in this
758 register is reserved.)
759 @retval EDX Bits 63:32 of 96 bit processor serial number. (Available in
760 Pentium III processor only; otherwise, the value in this
761 register is reserved.)
768 AsmCpuid (CPUID_SERIAL_NUMBER, NULL, NULL, &Ecx, &Edx);
771 #define CPUID_SERIAL_NUMBER 0x03
775 CPUID Cache Parameters
777 @param EAX CPUID_CACHE_PARAMS (0x04)
778 @param ECX Cache Level. Valid values start at 0. Software can enumerate
779 the deterministic cache parameters for each level of the cache
780 hierarchy starting with an index value of 0, until the
781 parameters report the value associated with the CacheType
782 field in CPUID_CACHE_PARAMS_EAX is 0.
784 @retval EAX Returns cache type information described by the type
785 CPUID_CACHE_PARAMS_EAX.
786 @retval EBX Returns cache line and associativity information described by
787 the type CPUID_CACHE_PARAMS_EBX.
788 @retval ECX Returns the number of sets in the cache.
789 @retval EDX Returns cache WINVD/INVD behavior described by the type
790 CPUID_CACHE_PARAMS_EDX.
795 CPUID_CACHE_PARAMS_EAX Eax;
796 CPUID_CACHE_PARAMS_EBX Ebx;
798 CPUID_CACHE_PARAMS_EDX Edx;
803 CPUID_CACHE_PARAMS, CacheLevel,
804 &Eax.Uint32, &Ebx.Uint32, &Ecx, &Edx.Uint32
807 } while (Eax.Bits.CacheType != CPUID_CACHE_PARAMS_CACHE_TYPE_NULL);
810 #define CPUID_CACHE_PARAMS 0x04
813 CPUID Cache Parameters Information returned in EAX for CPUID leaf
818 /// Individual bit fields
822 /// [Bits 4:0] Cache type field. If #CPUID_CACHE_PARAMS_CACHE_TYPE_NULL,
823 /// then there is no information for the requested cache level.
827 /// [Bits 7:5] Cache level (Starts at 1).
831 /// [Bit 8] Self Initializing cache level (does not need SW initialization).
833 UINT32 SelfInitializingCache
:1;
835 /// [Bit 9] Fully Associative cache.
837 UINT32 FullyAssociativeCache
:1;
839 /// [Bits 13:10] Reserved.
843 /// [Bits 25:14] Maximum number of addressable IDs for logical processors
844 /// sharing this cache.
846 /// Add one to the return value to get the result.
847 /// The nearest power-of-2 integer that is not smaller than (1 + EAX[25:14])
848 /// is the number of unique initial APIC IDs reserved for addressing
849 /// different logical processors sharing this cache.
851 UINT32 MaximumAddressableIdsForLogicalProcessors
:12;
853 /// [Bits 31:26] Maximum number of addressable IDs for processor cores in
854 /// the physical package.
856 /// The nearest power-of-2 integer that is not smaller than (1 + EAX[31:26])
857 /// is the number of unique Core_IDs reserved for addressing different
858 /// processor cores in a physical package. Core ID is a subset of bits of
859 /// the initial APIC ID.
860 /// The returned value is constant for valid initial values in ECX. Valid
861 /// ECX values start from 0.
863 UINT32 MaximumAddressableIdsForProcessorCores
:6;
866 /// All bit fields as a 32-bit value
869 } CPUID_CACHE_PARAMS_EAX
;
872 /// @{ Define value for bit field CPUID_CACHE_PARAMS_EAX.CacheType
874 #define CPUID_CACHE_PARAMS_CACHE_TYPE_NULL 0x00
875 #define CPUID_CACHE_PARAMS_CACHE_TYPE_DATA 0x01
876 #define CPUID_CACHE_PARAMS_CACHE_TYPE_INSTRUCTION 0x02
877 #define CPUID_CACHE_PARAMS_CACHE_TYPE_UNIFIED 0x03
883 CPUID Cache Parameters Information returned in EBX for CPUID leaf
888 /// Individual bit fields
892 /// [Bits 11:0] System Coherency Line Size. Add one to the return value to
897 /// [Bits 21:12] Physical Line Partitions. Add one to the return value to
900 UINT32 LinePartitions
:10;
902 /// [Bits 31:22] Ways of associativity. Add one to the return value to get
908 /// All bit fields as a 32-bit value
911 } CPUID_CACHE_PARAMS_EBX
;
914 CPUID Cache Parameters Information returned in EDX for CPUID leaf
919 /// Individual bit fields
923 /// [Bit 0] Write-Back Invalidate/Invalidate.
924 /// 0 = WBINVD/INVD from threads sharing this cache acts upon lower level
925 /// caches for threads sharing this cache.
926 /// 1 = WBINVD/INVD is not guaranteed to act upon lower level caches of
927 /// non-originating threads sharing this cache.
931 /// [Bit 1] Cache Inclusiveness.
932 /// 0 = Cache is not inclusive of lower cache levels.
933 /// 1 = Cache is inclusive of lower cache levels.
935 UINT32 CacheInclusiveness
:1;
937 /// [Bit 2] Complex Cache Indexing.
938 /// 0 = Direct mapped cache.
939 /// 1 = A complex function is used to index the cache, potentially using all
942 UINT32 ComplexCacheIndexing
:1;
946 /// All bit fields as a 32-bit value
949 } CPUID_CACHE_PARAMS_EDX
;
953 CPUID MONITOR/MWAIT Information
955 @param EAX CPUID_MONITOR_MWAIT (0x05)
957 @retval EAX Smallest monitor-line size in bytes described by the type
958 CPUID_MONITOR_MWAIT_EAX.
959 @retval EBX Largest monitor-line size in bytes described by the type
960 CPUID_MONITOR_MWAIT_EBX.
961 @retval ECX Enumeration of Monitor-Mwait extensions support described by
962 the type CPUID_MONITOR_MWAIT_ECX.
963 @retval EDX Sub C-states supported described by the type
964 CPUID_MONITOR_MWAIT_EDX.
968 CPUID_MONITOR_MWAIT_EAX Eax;
969 CPUID_MONITOR_MWAIT_EBX Ebx;
970 CPUID_MONITOR_MWAIT_ECX Ecx;
971 CPUID_MONITOR_MWAIT_EDX Edx;
973 AsmCpuid (CPUID_MONITOR_MWAIT, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32);
976 #define CPUID_MONITOR_MWAIT 0x05
979 CPUID MONITOR/MWAIT Information returned in EAX for CPUID leaf
980 #CPUID_MONITOR_MWAIT.
984 /// Individual bit fields
988 /// [Bits 15:0] Smallest monitor-line size in bytes (default is processor's
989 /// monitor granularity).
991 UINT32 SmallestMonitorLineSize
:16;
995 /// All bit fields as a 32-bit value
998 } CPUID_MONITOR_MWAIT_EAX
;
1001 CPUID MONITOR/MWAIT Information returned in EBX for CPUID leaf
1002 #CPUID_MONITOR_MWAIT.
1006 /// Individual bit fields
1010 /// [Bits 15:0] Largest monitor-line size in bytes (default is processor's
1011 /// monitor granularity).
1013 UINT32 LargestMonitorLineSize
:16;
1017 /// All bit fields as a 32-bit value
1020 } CPUID_MONITOR_MWAIT_EBX
;
1023 CPUID MONITOR/MWAIT Information returned in ECX for CPUID leaf
1024 #CPUID_MONITOR_MWAIT.
1028 /// Individual bit fields
1032 /// [Bit 0] If 0, then only EAX and EBX are valid. If 1, then EAX, EBX, ECX,
1033 /// and EDX are valid.
1035 UINT32 ExtensionsSupported
:1;
1037 /// [Bit 1] Supports treating interrupts as break-event for MWAIT, even when
1038 /// interrupts disabled.
1040 UINT32 InterruptAsBreak
:1;
1044 /// All bit fields as a 32-bit value
1047 } CPUID_MONITOR_MWAIT_ECX
;
1050 CPUID MONITOR/MWAIT Information returned in EDX for CPUID leaf
1051 #CPUID_MONITOR_MWAIT.
1054 The definition of C0 through C7 states for MWAIT extension are
1055 processor-specific C-states, not ACPI C-states.
1059 /// Individual bit fields
1063 /// [Bits 3:0] Number of C0 sub C-states supported using MWAIT.
1067 /// [Bits 7:4] Number of C1 sub C-states supported using MWAIT.
1071 /// [Bits 11:8] Number of C2 sub C-states supported using MWAIT.
1075 /// [Bits 15:12] Number of C3 sub C-states supported using MWAIT.
1079 /// [Bits 19:16] Number of C4 sub C-states supported using MWAIT.
1083 /// [Bits 23:20] Number of C5 sub C-states supported using MWAIT.
1087 /// [Bits 27:24] Number of C6 sub C-states supported using MWAIT.
1091 /// [Bits 31:28] Number of C7 sub C-states supported using MWAIT.
1096 /// All bit fields as a 32-bit value
1099 } CPUID_MONITOR_MWAIT_EDX
;
1103 CPUID Thermal and Power Management
1105 @param EAX CPUID_THERMAL_POWER_MANAGEMENT (0x06)
1107 @retval EAX Thermal and power management features described by the type
1108 CPUID_THERMAL_POWER_MANAGEMENT_EAX.
1109 @retval EBX Number of Interrupt Thresholds in Digital Thermal Sensor
1110 described by the type CPUID_THERMAL_POWER_MANAGEMENT_EBX.
1111 @retval ECX Performance features described by the type
1112 CPUID_THERMAL_POWER_MANAGEMENT_ECX.
1113 @retval EDX Reserved.
1115 <b>Example usage</b>
1117 CPUID_THERMAL_POWER_MANAGEMENT_EAX Eax;
1118 CPUID_THERMAL_POWER_MANAGEMENT_EBX Ebx;
1119 CPUID_THERMAL_POWER_MANAGEMENT_ECX Ecx;
1121 AsmCpuid (CPUID_THERMAL_POWER_MANAGEMENT, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, NULL);
1124 #define CPUID_THERMAL_POWER_MANAGEMENT 0x06
1127 CPUID Thermal and Power Management Information returned in EAX for CPUID leaf
1128 #CPUID_THERMAL_POWER_MANAGEMENT.
1132 /// Individual bit fields
1136 /// [Bit 0] Digital temperature sensor is supported if set.
1138 UINT32 DigitalTemperatureSensor
:1;
1140 /// [Bit 1] Intel Turbo Boost Technology Available (see IA32_MISC_ENABLE[38]).
1142 UINT32 TurboBoostTechnology
:1;
1144 /// [Bit 2] APIC-Timer-always-running feature is supported if set.
1149 /// [Bit 4] Power limit notification controls are supported if set.
1153 /// [Bit 5] Clock modulation duty cycle extension is supported if set.
1157 /// [Bit 6] Package thermal management is supported if set.
1161 /// [Bit 7] HWP base registers (IA32_PM_ENABLE[Bit 0], IA32_HWP_CAPABILITIES,
1162 /// IA32_HWP_REQUEST, IA32_HWP_STATUS) are supported if set.
1166 /// [Bit 8] IA32_HWP_INTERRUPT MSR is supported if set.
1168 UINT32 HWP_Notification
:1;
1170 /// [Bit 9] IA32_HWP_REQUEST[Bits 41:32] is supported if set.
1172 UINT32 HWP_Activity_Window
:1;
1174 /// [Bit 10] IA32_HWP_REQUEST[Bits 31:24] is supported if set.
1176 UINT32 HWP_Energy_Performance_Preference
:1;
1178 /// [Bit 11] IA32_HWP_REQUEST_PKG MSR is supported if set.
1180 UINT32 HWP_Package_Level_Request
:1;
1183 /// [Bit 13] HDC base registers IA32_PKG_HDC_CTL, IA32_PM_CTL1,
1184 /// IA32_THREAD_STALL MSRs are supported if set.
1188 /// [Bit 14] Intel Turbo Boost Max Technology 3.0 available.
1190 UINT32 TurboBoostMaxTechnology30
:1;
1192 /// [Bit 15] HWP Capabilities.
1193 /// Highest Performance change is supported if set.
1195 UINT32 HWPCapabilities
:1;
1197 /// [Bit 16] HWP PECI override is supported if set.
1199 UINT32 HWPPECIOverride
:1;
1201 /// [Bit 17] Flexible HWP is supported if set.
1203 UINT32 FlexibleHWP
:1;
1205 /// [Bit 18] Fast access mode for the IA32_HWP_REQUEST MSR is supported if set.
1207 UINT32 FastAccessMode
:1;
1210 /// [Bit 20] Ignoring Idle Logical Processor HWP request is supported if set.
1212 UINT32 IgnoringIdleLogicalProcessorHWPRequest
:1;
1213 UINT32 Reserved5
:11;
1216 /// All bit fields as a 32-bit value
1219 } CPUID_THERMAL_POWER_MANAGEMENT_EAX
;
1222 CPUID Thermal and Power Management Information returned in EBX for CPUID leaf
1223 #CPUID_THERMAL_POWER_MANAGEMENT.
1227 /// Individual bit fields
1231 /// {Bits 3:0] Number of Interrupt Thresholds in Digital Thermal Sensor.
1233 UINT32 InterruptThresholds
:4;
1237 /// All bit fields as a 32-bit value
1240 } CPUID_THERMAL_POWER_MANAGEMENT_EBX
;
1243 CPUID Thermal and Power Management Information returned in ECX for CPUID leaf
1244 #CPUID_THERMAL_POWER_MANAGEMENT.
1248 /// Individual bit fields
1252 /// [Bit 0] Hardware Coordination Feedback Capability (Presence of IA32_MPERF
1253 /// and IA32_APERF). The capability to provide a measure of delivered
1254 /// processor performance (since last reset of the counters), as a percentage
1255 /// of the expected processor performance when running at the TSC frequency.
1257 UINT32 HardwareCoordinationFeedback
:1;
1260 /// [Bit 3] If this bit is set, then the processor supports performance-energy
1261 /// bias preference and the architectural MSR called IA32_ENERGY_PERF_BIAS
1264 UINT32 PerformanceEnergyBias
:1;
1265 UINT32 Reserved2
:28;
1268 /// All bit fields as a 32-bit value
1271 } CPUID_THERMAL_POWER_MANAGEMENT_ECX
;
1275 CPUID Structured Extended Feature Flags Enumeration
1277 @param EAX CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS (0x07)
1278 @param ECX CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_SUB_LEAF_INFO (0x00).
1281 If ECX contains an invalid sub-leaf index, EAX/EBX/ECX/EDX return 0. Sub-leaf
1282 index n is invalid if n exceeds the value that sub-leaf 0 returns in EAX.
1284 @retval EAX The maximum input value for ECX to retrieve sub-leaf information.
1285 @retval EBX Structured Extended Feature Flags described by the type
1286 CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_EBX.
1287 @retval EBX Structured Extended Feature Flags described by the type
1288 CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_ECX.
1289 @retval EDX Reserved.
1291 <b>Example usage</b>
1294 CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_EBX Ebx;
1295 CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_ECX Ecx;
1299 CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS,
1300 CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_SUB_LEAF_INFO,
1301 &Eax, NULL, NULL, NULL
1303 for (SubLeaf = 0; SubLeaf <= Eax; SubLeaf++) {
1305 CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS,
1307 NULL, &Ebx.Uint32, &Ecx.Uint32, NULL
1312 #define CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS 0x07
1315 /// CPUID Structured Extended Feature Flags Enumeration sub-leaf
1317 #define CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_SUB_LEAF_INFO 0x00
1320 CPUID Structured Extended Feature Flags Enumeration in EBX for CPUID leaf
1321 #CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS sub leaf
1322 #CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_SUB_LEAF_INFO.
1326 /// Individual bit fields
1330 /// [Bit 0] Supports RDFSBASE/RDGSBASE/WRFSBASE/WRGSBASE if 1.
1334 /// [Bit 1] IA32_TSC_ADJUST MSR is supported if 1.
1336 UINT32 IA32_TSC_ADJUST
:1;
1338 /// [Bit 2] Intel SGX is supported if 1. See section 37.7 "DISCOVERING SUPPORT
1339 /// FOR INTEL(R) SGX AND ENABLING ENCLAVE INSTRUCTIONS".
1343 /// [Bit 3] If 1 indicates the processor supports the first group of advanced
1344 /// bit manipulation extensions (ANDN, BEXTR, BLSI, BLSMSK, BLSR, TZCNT)
1348 /// [Bit 4] Hardware Lock Elision
1352 /// [Bit 5] If 1 indicates the processor supports AVX2 instruction extensions.
1356 /// [Bit 6] x87 FPU Data Pointer updated only on x87 exceptions if 1.
1358 UINT32 FDP_EXCPTN_ONLY
:1;
1360 /// [Bit 7] Supports Supervisor-Mode Execution Prevention if 1.
1364 /// [Bit 8] If 1 indicates the processor supports the second group of
1365 /// advanced bit manipulation extensions (BZHI, MULX, PDEP, PEXT, RORX,
1366 /// SARX, SHLX, SHRX)
1370 /// [Bit 9] Supports Enhanced REP MOVSB/STOSB if 1.
1372 UINT32 EnhancedRepMovsbStosb
:1;
1374 /// [Bit 10] If 1, supports INVPCID instruction for system software that
1375 /// manages process-context identifiers.
1379 /// [Bit 11] Restricted Transactional Memory
1383 /// [Bit 12] Supports Intel(R) Resource Director Technology (Intel(R) RDT)
1384 /// Monitoring capability if 1.
1388 /// [Bit 13] Deprecates FPU CS and FPU DS values if 1.
1390 UINT32 DeprecateFpuCsDs
:1;
1392 /// [Bit 14] Supports Intel(R) Memory Protection Extensions if 1.
1396 /// [Bit 15] Supports Intel(R) Resource Director Technology (Intel(R) RDT)
1397 /// Allocation capability if 1.
1401 /// [Bit 16] AVX512F.
1405 /// [Bit 17] AVX512DQ.
1409 /// [Bit 18] If 1 indicates the processor supports the RDSEED instruction.
1413 /// [Bit 19] If 1 indicates the processor supports the ADCX and ADOX
1418 /// [Bit 20] Supports Supervisor-Mode Access Prevention (and the CLAC/STAC
1419 /// instructions) if 1.
1423 /// [Bit 21] AVX512_IFMA.
1425 UINT32 AVX512_IFMA
:1;
1428 /// [Bit 23] If 1 indicates the processor supports the CLFLUSHOPT instruction.
1430 UINT32 CLFLUSHOPT
:1;
1432 /// [Bit 24] If 1 indicates the processor supports the CLWB instruction.
1436 /// [Bit 25] If 1 indicates the processor supports the Intel Processor Trace
1439 UINT32 IntelProcessorTrace
:1;
1441 /// [Bit 26] AVX512PF. (Intel Xeon Phi only.).
1445 /// [Bit 27] AVX512ER. (Intel Xeon Phi only.).
1449 /// [Bit 28] AVX512CD.
1453 /// [Bit 29] Supports Intel(R) Secure Hash Algorithm Extensions (Intel(R)
1454 /// SHA Extensions) if 1.
1458 /// [Bit 30] AVX512BW.
1462 /// [Bit 31] AVX512VL.
1467 /// All bit fields as a 32-bit value
1470 } CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_EBX
;
1473 CPUID Structured Extended Feature Flags Enumeration in ECX for CPUID leaf
1474 #CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS sub leaf
1475 #CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_SUB_LEAF_INFO.
1479 /// Individual bit fields
1483 /// [Bit 0] If 1 indicates the processor supports the PREFETCHWT1 instruction.
1484 /// (Intel Xeon Phi only.)
1486 UINT32 PREFETCHWT1
:1;
1488 /// [Bit 1] AVX512_VBMI.
1490 UINT32 AVX512_VBMI
:1;
1492 /// [Bit 2] Supports user-mode instruction prevention if 1.
1496 /// [Bit 3] Supports protection keys for user-mode pages if 1.
1500 /// [Bit 4] If 1, OS has set CR4.PKE to enable protection keys (and the
1501 /// RDPKRU/WRPKRU instructions).
1506 /// [Bits 14] AVX512_VPOPCNTDQ. (Intel Xeon Phi only.).
1508 UINT32 AVX512_VPOPCNTDQ
:1;
1512 /// [Bits 21:17] The value of MAWAU used by the BNDLDX and BNDSTX instructions
1517 /// [Bit 22] RDPID and IA32_TSC_AUX are available if 1.
1522 /// [Bit 30] Supports SGX Launch Configuration if 1.
1528 /// All bit fields as a 32-bit value
1531 } CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_ECX
;
1534 CPUID Structured Extended Feature Flags Enumeration in EDX for CPUID leaf
1535 #CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS sub leaf
1536 #CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_SUB_LEAF_INFO.
1540 /// Individual bit fields
1544 /// [Bit 1:0] Reserved.
1548 /// [Bit 2] AVX512_4VNNIW. (Intel Xeon Phi only.)
1550 UINT32 AVX512_4VNNIW
:1;
1552 /// [Bit 3] AVX512_4FMAPS. (Intel Xeon Phi only.)
1554 UINT32 AVX512_4FMAPS
:1;
1556 /// [Bit 25:4] Reserved.
1558 UINT32 Reserved2
:22;
1560 /// [Bit 26] Enumerates support for indirect branch restricted speculation
1561 /// (IBRS) and the indirect branch pre-dictor barrier (IBPB). Processors
1562 /// that set this bit support the IA32_SPEC_CTRL MSR and the IA32_PRED_CMD
1563 /// MSR. They allow software to set IA32_SPEC_CTRL[0] (IBRS) and
1564 /// IA32_PRED_CMD[0] (IBPB).
1566 UINT32 EnumeratesSupportForIBRSAndIBPB
:1;
1568 /// [Bit 27] Enumerates support for single thread indirect branch
1569 /// predictors (STIBP). Processors that set this bit support the
1570 /// IA32_SPEC_CTRL MSR. They allow software to set IA32_SPEC_CTRL[1]
1573 UINT32 EnumeratesSupportForSTIBP
:1;
1575 /// [Bit 28] Enumerates support for L1D_FLUSH. Processors that set this bit
1576 /// support the IA32_FLUSH_CMD MSR. They allow software to set
1577 /// IA32_FLUSH_CMD[0] (L1D_FLUSH).
1579 UINT32 EnumeratesSupportForL1D_FLUSH
:1;
1581 /// [Bit 29] Enumerates support for the IA32_ARCH_CAPABILITIES MSR.
1583 UINT32 EnumeratesSupportForCapability
:1;
1585 /// [Bit 30] Reserved.
1589 /// [Bit 31] Enumerates support for Speculative Store Bypass Disable (SSBD).
1590 /// Processors that set this bit sup-port the IA32_SPEC_CTRL MSR. They allow
1591 /// software to set IA32_SPEC_CTRL[2] (SSBD).
1593 UINT32 EnumeratesSupportForSSBD
:1;
1596 /// All bit fields as a 32-bit value
1599 } CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_EDX
;
1602 CPUID Direct Cache Access Information
1604 @param EAX CPUID_DIRECT_CACHE_ACCESS_INFO (0x09)
1606 @retval EAX Value of bits [31:0] of IA32_PLATFORM_DCA_CAP MSR (address 1F8H).
1607 @retval EBX Reserved.
1608 @retval ECX Reserved.
1609 @retval EDX Reserved.
1611 <b>Example usage</b>
1615 AsmCpuid (CPUID_DIRECT_CACHE_ACCESS_INFO, &Eax, NULL, NULL, NULL);
1618 #define CPUID_DIRECT_CACHE_ACCESS_INFO 0x09
1622 CPUID Architectural Performance Monitoring
1624 @param EAX CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING (0x0A)
1626 @retval EAX Architectural Performance Monitoring information described by
1627 the type CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING_EAX.
1628 @retval EBX Architectural Performance Monitoring information described by
1629 the type CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING_EBX.
1630 @retval ECX Reserved.
1631 @retval EDX Architectural Performance Monitoring information described by
1632 the type CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING_EDX.
1634 <b>Example usage</b>
1636 CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING_EAX Eax;
1637 CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING_EBX Ebx;
1638 CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING_EDX Edx;
1640 AsmCpuid (CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING, &Eax.Uint32, &Ebx.Uint32, NULL, &Edx.Uint32);
1643 #define CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING 0x0A
1646 CPUID Architectural Performance Monitoring EAX for CPUID leaf
1647 #CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING.
1651 /// Individual bit fields
1655 /// [Bit 7:0] Version ID of architectural performance monitoring.
1657 UINT32 ArchPerfMonVerID
:8;
1659 /// [Bits 15:8] Number of general-purpose performance monitoring counter
1660 /// per logical processor.
1662 /// IA32_PERFEVTSELx MSRs start at address 186H and occupy a contiguous
1663 /// block of MSR address space. Each performance event select register is
1664 /// paired with a corresponding performance counter in the 0C1H address
1667 UINT32 PerformanceMonitorCounters
:8;
1669 /// [Bits 23:16] Bit width of general-purpose, performance monitoring counter.
1671 /// The bit width of an IA32_PMCx MSR. This the number of valid bits for
1672 /// read operation. On write operations, the lower-order 32 bits of the MSR
1673 /// may be written with any value, and the high-order bits are sign-extended
1674 /// from the value of bit 31.
1676 UINT32 PerformanceMonitorCounterWidth
:8;
1678 /// [Bits 31:24] Length of EBX bit vector to enumerate architectural
1679 /// performance monitoring events.
1681 UINT32 EbxBitVectorLength
:8;
1684 /// All bit fields as a 32-bit value
1687 } CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING_EAX
;
1690 CPUID Architectural Performance Monitoring EBX for CPUID leaf
1691 #CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING.
1695 /// Individual bit fields
1699 /// [Bit 0] Core cycle event not available if 1.
1701 UINT32 UnhaltedCoreCycles
:1;
1703 /// [Bit 1] Instruction retired event not available if 1.
1705 UINT32 InstructionsRetired
:1;
1707 /// [Bit 2] Reference cycles event not available if 1.
1709 UINT32 UnhaltedReferenceCycles
:1;
1711 /// [Bit 3] Last-level cache reference event not available if 1.
1713 UINT32 LastLevelCacheReferences
:1;
1715 /// [Bit 4] Last-level cache misses event not available if 1.
1717 UINT32 LastLevelCacheMisses
:1;
1719 /// [Bit 5] Branch instruction retired event not available if 1.
1721 UINT32 BranchInstructionsRetired
:1;
1723 /// [Bit 6] Branch mispredict retired event not available if 1.
1725 UINT32 AllBranchMispredictRetired
:1;
1729 /// All bit fields as a 32-bit value
1732 } CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING_EBX
;
1735 CPUID Architectural Performance Monitoring EDX for CPUID leaf
1736 #CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING.
1740 /// Individual bit fields
1744 /// [Bits 4:0] Number of fixed-function performance counters
1745 /// (if Version ID > 1).
1747 UINT32 FixedFunctionPerformanceCounters
:5;
1749 /// [Bits 12:5] Bit width of fixed-function performance counters
1750 /// (if Version ID > 1).
1752 UINT32 FixedFunctionPerformanceCounterWidth
:8;
1755 /// [Bits 15] AnyThread deprecation.
1757 UINT32 AnyThreadDeprecation
:1;
1758 UINT32 Reserved2
:16;
1761 /// All bit fields as a 32-bit value
1764 } CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING_EDX
;
1768 CPUID Extended Topology Information
1771 CPUID leaf 1FH is a preferred superset to leaf 0BH. Intel recommends first
1772 checking for the existence of Leaf 1FH before using leaf 0BH.
1773 Most of Leaf 0BH output depends on the initial value in ECX. The EDX output
1774 of leaf 0BH is always valid and does not vary with input value in ECX. Output
1775 value in ECX[7:0] always equals input value in ECX[7:0].
1776 Sub-leaf index 0 enumerates SMT level. Each subsequent higher sub-leaf index
1777 enumerates a higher-level topological entity in hierarchical order.
1778 For sub-leaves that return an invalid level-type of 0 in ECX[15:8]; EAX and
1780 If an input value n in ECX returns the invalid level-type of 0 in ECX[15:8],
1781 other input values with ECX > n also return 0 in ECX[15:8].
1783 @param EAX CPUID_EXTENDED_TOPOLOGY (0x0B)
1784 @param ECX Level number
1786 @retval EAX Extended topology information described by the type
1787 CPUID_EXTENDED_TOPOLOGY_EAX.
1788 @retval EBX Extended topology information described by the type
1789 CPUID_EXTENDED_TOPOLOGY_EBX.
1790 @retval ECX Extended topology information described by the type
1791 CPUID_EXTENDED_TOPOLOGY_ECX.
1792 @retval EDX x2APIC ID the current logical processor.
1794 <b>Example usage</b>
1796 CPUID_EXTENDED_TOPOLOGY_EAX Eax;
1797 CPUID_EXTENDED_TOPOLOGY_EBX Ebx;
1798 CPUID_EXTENDED_TOPOLOGY_ECX Ecx;
1805 CPUID_EXTENDED_TOPOLOGY, LevelNumber,
1806 &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx
1809 } while (Eax.Bits.ApicIdShift != 0);
1812 #define CPUID_EXTENDED_TOPOLOGY 0x0B
1815 CPUID Extended Topology Information EAX for CPUID leaf #CPUID_EXTENDED_TOPOLOGY.
1819 /// Individual bit fields
1823 /// [Bits 4:0] Number of bits to shift right on x2APIC ID to get a unique
1824 /// topology ID of the next level type. All logical processors with the
1825 /// same next level ID share current level.
1828 /// Software should use this field (EAX[4:0]) to enumerate processor
1829 /// topology of the system.
1831 UINT32 ApicIdShift
:5;
1835 /// All bit fields as a 32-bit value
1838 } CPUID_EXTENDED_TOPOLOGY_EAX
;
1841 CPUID Extended Topology Information EBX for CPUID leaf #CPUID_EXTENDED_TOPOLOGY.
1845 /// Individual bit fields
1849 /// [Bits 15:0] Number of logical processors at this level type. The number
1850 /// reflects configuration as shipped by Intel.
1853 /// Software must not use EBX[15:0] to enumerate processor topology of the
1854 /// system. This value in this field (EBX[15:0]) is only intended for
1855 /// display/diagnostic purposes. The actual number of logical processors
1856 /// available to BIOS/OS/Applications may be different from the value of
1857 /// EBX[15:0], depending on software and platform hardware configurations.
1859 UINT32 LogicalProcessors
:16;
1863 /// All bit fields as a 32-bit value
1866 } CPUID_EXTENDED_TOPOLOGY_EBX
;
1869 CPUID Extended Topology Information ECX for CPUID leaf #CPUID_EXTENDED_TOPOLOGY.
1873 /// Individual bit fields
1877 /// [Bits 7:0] Level number. Same value in ECX input.
1879 UINT32 LevelNumber
:8;
1881 /// [Bits 15:8] Level type.
1884 /// The value of the "level type" field is not related to level numbers in
1885 /// any way, higher "level type" values do not mean higher levels.
1891 /// All bit fields as a 32-bit value
1894 } CPUID_EXTENDED_TOPOLOGY_ECX
;
1897 /// @{ Define value for CPUID_EXTENDED_TOPOLOGY_ECX.LevelType
1899 #define CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_INVALID 0x00
1900 #define CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_SMT 0x01
1901 #define CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_CORE 0x02
1908 CPUID Extended State Information
1910 @param EAX CPUID_EXTENDED_STATE (0x0D)
1911 @param ECX CPUID_EXTENDED_STATE_MAIN_LEAF (0x00).
1912 CPUID_EXTENDED_STATE_SUB_LEAF (0x01).
1913 CPUID_EXTENDED_STATE_SIZE_OFFSET (0x02).
1914 Sub leafs 2..n based on supported bits in XCR0 or IA32_XSS_MSR.
1916 #define CPUID_EXTENDED_STATE 0x0D
1919 CPUID Extended State Information Main Leaf
1921 @param EAX CPUID_EXTENDED_STATE (0x0D)
1922 @param ECX CPUID_EXTENDED_STATE_MAIN_LEAF (0x00)
1924 @retval EAX Reports the supported bits of the lower 32 bits of XCR0. XCR0[n]
1925 can be set to 1 only if EAX[n] is 1. The format of the extended
1926 state main leaf is described by the type
1927 CPUID_EXTENDED_STATE_MAIN_LEAF_EAX.
1928 @retval EBX Maximum size (bytes, from the beginning of the XSAVE/XRSTOR save
1929 area) required by enabled features in XCR0. May be different than
1930 ECX if some features at the end of the XSAVE save area are not
1932 @retval ECX Maximum size (bytes, from the beginning of the XSAVE/XRSTOR save
1933 area) of the XSAVE/XRSTOR save area required by all supported
1934 features in the processor, i.e., all the valid bit fields in XCR0.
1935 @retval EDX Reports the supported bits of the upper 32 bits of XCR0.
1936 XCR0[n+32] can be set to 1 only if EDX[n] is 1.
1938 <b>Example usage</b>
1940 CPUID_EXTENDED_STATE_MAIN_LEAF_EAX Eax;
1946 CPUID_EXTENDED_STATE, CPUID_EXTENDED_STATE_MAIN_LEAF,
1947 &Eax.Uint32, &Ebx, &Ecx, &Edx
1951 #define CPUID_EXTENDED_STATE_MAIN_LEAF 0x00
1954 CPUID Extended State Information EAX for CPUID leaf #CPUID_EXTENDED_STATE,
1955 sub-leaf #CPUID_EXTENDED_STATE_MAIN_LEAF.
1959 /// Individual bit fields
1963 /// [Bit 0] x87 state.
1967 /// [Bit 1] SSE state.
1971 /// [Bit 2] AVX state.
1975 /// [Bits 4:3] MPX state.
1979 /// [Bits 7:5] AVX-512 state.
1983 /// [Bit 8] Used for IA32_XSS.
1987 /// [Bit 9] PKRU state.
1992 /// [Bit 13] Used for IA32_XSS, part 2.
1994 UINT32 IA32_XSS_2
:1;
1995 UINT32 Reserved2
:18;
1998 /// All bit fields as a 32-bit value
2001 } CPUID_EXTENDED_STATE_MAIN_LEAF_EAX
;
2004 CPUID Extended State Information Sub Leaf
2006 @param EAX CPUID_EXTENDED_STATE (0x0D)
2007 @param ECX CPUID_EXTENDED_STATE_SUB_LEAF (0x01)
2009 @retval EAX The format of the extended state sub-leaf is described by the
2010 type CPUID_EXTENDED_STATE_SUB_LEAF_EAX.
2011 @retval EBX The size in bytes of the XSAVE area containing all states
2012 enabled by XCRO | IA32_XSS.
2013 @retval ECX The format of the extended state sub-leaf is described by the
2014 type CPUID_EXTENDED_STATE_SUB_LEAF_ECX.
2015 @retval EDX Reports the supported bits of the upper 32 bits of the
2016 IA32_XSS MSR. IA32_XSS[n+32] can be set to 1 only if EDX[n] is 1.
2018 <b>Example usage</b>
2020 CPUID_EXTENDED_STATE_SUB_LEAF_EAX Eax;
2022 CPUID_EXTENDED_STATE_SUB_LEAF_ECX Ecx;
2026 CPUID_EXTENDED_STATE, CPUID_EXTENDED_STATE_SUB_LEAF,
2027 &Eax.Uint32, &Ebx, &Ecx.Uint32, &Edx
2031 #define CPUID_EXTENDED_STATE_SUB_LEAF 0x01
2034 CPUID Extended State Information EAX for CPUID leaf #CPUID_EXTENDED_STATE,
2035 sub-leaf #CPUID_EXTENDED_STATE_SUB_LEAF.
2039 /// Individual bit fields
2043 /// [Bit 0] XSAVEOPT is available.
2047 /// [Bit 1] Supports XSAVEC and the compacted form of XRSTOR if set.
2051 /// [Bit 2] Supports XGETBV with ECX = 1 if set.
2055 /// [Bit 3] Supports XSAVES/XRSTORS and IA32_XSS if set.
2061 /// All bit fields as a 32-bit value
2064 } CPUID_EXTENDED_STATE_SUB_LEAF_EAX
;
2067 CPUID Extended State Information ECX for CPUID leaf #CPUID_EXTENDED_STATE,
2068 sub-leaf #CPUID_EXTENDED_STATE_SUB_LEAF.
2072 /// Individual bit fields
2076 /// [Bits 7:0] Used for XCR0.
2080 /// [Bit 8] PT STate.
2084 /// [Bit 9] Used for XCR0.
2089 /// [Bit 13] HWP state.
2092 UINT32 Reserved8
:18;
2095 /// All bit fields as a 32-bit value
2098 } CPUID_EXTENDED_STATE_SUB_LEAF_ECX
;
2101 CPUID Extended State Information Size and Offset Sub Leaf
2104 Leaf 0DH output depends on the initial value in ECX.
2105 Each sub-leaf index (starting at position 2) is supported if it corresponds to
2106 a supported bit in either the XCR0 register or the IA32_XSS MSR.
2107 If ECX contains an invalid sub-leaf index, EAX/EBX/ECX/EDX return 0. Sub-leaf
2108 n (0 <= n <= 31) is invalid if sub-leaf 0 returns 0 in EAX[n] and sub-leaf 1
2109 returns 0 in ECX[n]. Sub-leaf n (32 <= n <= 63) is invalid if sub-leaf 0
2110 returns 0 in EDX[n-32] and sub-leaf 1 returns 0 in EDX[n-32].
2112 @param EAX CPUID_EXTENDED_STATE (0x0D)
2113 @param ECX CPUID_EXTENDED_STATE_SIZE_OFFSET (0x02). Sub leafs 2..n based
2114 on supported bits in XCR0 or IA32_XSS_MSR.
2116 @retval EAX The size in bytes (from the offset specified in EBX) of the save
2117 area for an extended state feature associated with a valid
2119 @retval EBX The offset in bytes of this extended state component's save area
2120 from the beginning of the XSAVE/XRSTOR area. This field reports
2121 0 if the sub-leaf index, n, does not map to a valid bit in the
2123 @retval ECX The format of the extended state components's save area as
2124 described by the type CPUID_EXTENDED_STATE_SIZE_OFFSET_ECX.
2125 This field reports 0 if the sub-leaf index, n, is invalid.
2126 @retval EDX This field reports 0 if the sub-leaf index, n, is invalid;
2127 otherwise it is reserved.
2129 <b>Example usage</b>
2133 CPUID_EXTENDED_STATE_SIZE_OFFSET_ECX Ecx;
2137 for (SubLeaf = CPUID_EXTENDED_STATE_SIZE_OFFSET; SubLeaf < 32; SubLeaf++) {
2139 CPUID_EXTENDED_STATE, SubLeaf,
2140 &Eax, &Ebx, &Ecx.Uint32, &Edx
2145 #define CPUID_EXTENDED_STATE_SIZE_OFFSET 0x02
2148 CPUID Extended State Information ECX for CPUID leaf #CPUID_EXTENDED_STATE,
2149 sub-leaf #CPUID_EXTENDED_STATE_SIZE_OFFSET.
2153 /// Individual bit fields
2157 /// [Bit 0] Is set if the bit n (corresponding to the sub-leaf index) is
2158 /// supported in the IA32_XSS MSR; it is clear if bit n is instead supported
2163 /// [Bit 1] is set if, when the compacted format of an XSAVE area is used,
2164 /// this extended state component located on the next 64-byte boundary
2165 /// following the preceding state component (otherwise, it is located
2166 /// immediately following the preceding state component).
2172 /// All bit fields as a 32-bit value
2175 } CPUID_EXTENDED_STATE_SIZE_OFFSET_ECX
;
2179 CPUID Intel Resource Director Technology (Intel RDT) Monitoring Information
2181 @param EAX CPUID_INTEL_RDT_MONITORING (0x0F)
2182 @param ECX CPUID_INTEL_RDT_MONITORING_ENUMERATION_SUB_LEAF (0x00).
2183 CPUID_INTEL_RDT_MONITORING_L3_CACHE_SUB_LEAF (0x01).
2186 #define CPUID_INTEL_RDT_MONITORING 0x0F
2189 CPUID Intel Resource Director Technology (Intel RDT) Monitoring Information
2190 Enumeration Sub-leaf
2192 @param EAX CPUID_INTEL_RDT_MONITORING (0x0F)
2193 @param ECX CPUID_INTEL_RDT_MONITORING_ENUMERATION_SUB_LEAF (0x00)
2195 @retval EAX Reserved.
2196 @retval EBX Maximum range (zero-based) of RMID within this physical
2197 processor of all types.
2198 @retval ECX Reserved.
2199 @retval EDX L3 Cache Intel RDT Monitoring Information Enumeration described by
2200 the type CPUID_INTEL_RDT_MONITORING_ENUMERATION_SUB_LEAF_EDX.
2202 <b>Example usage</b>
2205 CPUID_INTEL_RDT_MONITORING_ENUMERATION_SUB_LEAF_EDX Edx;
2208 CPUID_INTEL_RDT_MONITORING, CPUID_INTEL_RDT_MONITORING_ENUMERATION_SUB_LEAF,
2209 NULL, &Ebx, NULL, &Edx.Uint32
2213 #define CPUID_INTEL_RDT_MONITORING_ENUMERATION_SUB_LEAF 0x00
2216 CPUID Intel RDT Monitoring Information EDX for CPUID leaf
2217 #CPUID_INTEL_RDT_MONITORING, sub-leaf
2218 #CPUID_INTEL_RDT_MONITORING_ENUMERATION_SUB_LEAF.
2222 /// Individual bit fields
2227 /// [Bit 1] Supports L3 Cache Intel RDT Monitoring if 1.
2229 UINT32 L3CacheRDT_M
:1;
2230 UINT32 Reserved2
:30;
2233 /// All bit fields as a 32-bit value
2236 } CPUID_INTEL_RDT_MONITORING_ENUMERATION_SUB_LEAF_EDX
;
2239 CPUID L3 Cache Intel RDT Monitoring Capability Enumeration Sub-leaf
2241 @param EAX CPUID_INTEL_RDT_MONITORING (0x0F)
2242 @param ECX CPUID_INTEL_RDT_MONITORING_L3_CACHE_SUB_LEAF (0x01)
2244 @retval EAX Reserved.
2245 @retval EBX Conversion factor from reported IA32_QM_CTR value to occupancy metric (bytes).
2246 @retval ECX Maximum range (zero-based) of RMID of this resource type.
2247 @retval EDX L3 Cache Intel RDT Monitoring Capability information described by the
2248 type CPUID_INTEL_RDT_MONITORING_L3_CACHE_SUB_LEAF_EDX.
2250 <b>Example usage</b>
2254 CPUID_INTEL_RDT_MONITORING_L3_CACHE_SUB_LEAF_EDX Edx;
2257 CPUID_INTEL_RDT_MONITORING, CPUID_INTEL_RDT_MONITORING_L3_CACHE_SUB_LEAF,
2258 NULL, &Ebx, &Ecx, &Edx.Uint32
2262 #define CPUID_INTEL_RDT_MONITORING_L3_CACHE_SUB_LEAF 0x01
2265 CPUID L3 Cache Intel RDT Monitoring Capability Information EDX for CPUID leaf
2266 #CPUID_INTEL_RDT_MONITORING, sub-leaf
2267 #CPUID_INTEL_RDT_MONITORING_L3_CACHE_SUB_LEAF.
2271 /// Individual bit fields
2275 /// [Bit 0] Supports L3 occupancy monitoring if 1.
2277 UINT32 L3CacheOccupancyMonitoring
:1;
2279 /// [Bit 1] Supports L3 Total Bandwidth monitoring if 1.
2281 UINT32 L3CacheTotalBandwidthMonitoring
:1;
2283 /// [Bit 2] Supports L3 Local Bandwidth monitoring if 1.
2285 UINT32 L3CacheLocalBandwidthMonitoring
:1;
2289 /// All bit fields as a 32-bit value
2292 } CPUID_INTEL_RDT_MONITORING_L3_CACHE_SUB_LEAF_EDX
;
2296 CPUID Intel Resource Director Technology (Intel RDT) Allocation Information
2298 @param EAX CPUID_INTEL_RDT_ALLOCATION (0x10).
2299 @param ECX CPUID_INTEL_RDT_ALLOCATION_ENUMERATION_SUB_LEAF (0x00).
2300 CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF (0x01).
2301 CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF (0x02).
2303 #define CPUID_INTEL_RDT_ALLOCATION 0x10
2306 Intel Resource Director Technology (Intel RDT) Allocation Enumeration Sub-leaf
2308 @param EAX CPUID_INTEL_RDT_ALLOCATION (0x10)
2309 @param ECX CPUID_INTEL_RDT_ALLOCATION_ENUMERATION_SUB_LEAF (0x00).
2311 @retval EAX Reserved.
2312 @retval EBX L3 and L2 Cache Allocation Technology information described by
2313 the type CPUID_INTEL_RDT_ALLOCATION_ENUMERATION_SUB_LEAF_EBX.
2314 @retval ECX Reserved.
2315 @retval EDX Reserved.
2317 <b>Example usage</b>
2319 CPUID_INTEL_RDT_ALLOCATION_ENUMERATION_SUB_LEAF_EBX Ebx;
2322 CPUID_INTEL_RDT_ALLOCATION, CPUID_INTEL_RDT_ALLOCATION_ENUMERATION_SUB_LEAF,
2323 NULL, &Ebx.Uint32, NULL, NULL
2327 #define CPUID_INTEL_RDT_ALLOCATION_ENUMERATION_SUB_LEAF 0x00
2330 CPUID L3 and L2 Cache Allocation Support Information EBX for CPUID leaf
2331 #CPUID_INTEL_RDT_ALLOCATION, sub-leaf
2332 #CPUID_INTEL_RDT_ALLOCATION_ENUMERATION_SUB_LEAF.
2336 /// Individual bit fields
2341 /// [Bit 1] Supports L3 Cache Allocation Technology if 1.
2343 UINT32 L3CacheAllocation
:1;
2345 /// [Bit 2] Supports L2 Cache Allocation Technology if 1.
2347 UINT32 L2CacheAllocation
:1;
2349 /// [Bit 3] Supports Memory Bandwidth Allocation if 1.
2351 UINT32 MemoryBandwidth
:1;
2352 UINT32 Reserved3
:28;
2355 /// All bit fields as a 32-bit value
2358 } CPUID_INTEL_RDT_ALLOCATION_ENUMERATION_SUB_LEAF_EBX
;
2362 L3 Cache Allocation Technology Enumeration Sub-leaf
2364 @param EAX CPUID_INTEL_RDT_ALLOCATION (0x10)
2365 @param ECX CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF (0x01)
2367 @retval EAX RESID L3 Cache Allocation Technology information described by
2368 the type CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF_EAX.
2369 @retval EBX Bit-granular map of isolation/contention of allocation units.
2370 @retval ECX RESID L3 Cache Allocation Technology information described by
2371 the type CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF_ECX.
2372 @retval EDX RESID L3 Cache Allocation Technology information described by
2373 the type CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF_EDX.
2375 <b>Example usage</b>
2377 CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF_EAX Eax;
2379 CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF_ECX Ecx;
2380 CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF_EDX Edx;
2383 CPUID_INTEL_RDT_ALLOCATION, CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF,
2384 &Eax.Uint32, &Ebx, &Ecx.Uint32, &Edx.Uint32
2388 #define CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF 0x01
2391 CPUID L3 Cache Allocation Technology Information EAX for CPUID leaf
2392 #CPUID_INTEL_RDT_ALLOCATION, sub-leaf
2393 #CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF.
2397 /// Individual bit fields
2401 /// [Bits 4:0] Length of the capacity bit mask for the corresponding ResID
2402 /// using minus-one notation.
2404 UINT32 CapacityLength
:5;
2408 /// All bit fields as a 32-bit value
2411 } CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF_EAX
;
2414 CPUID L3 Cache Allocation Technology Information ECX for CPUID leaf
2415 #CPUID_INTEL_RDT_ALLOCATION, sub-leaf
2416 #CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF.
2420 /// Individual bit fields
2425 /// [Bit 2] Code and Data Prioritization Technology supported if 1.
2427 UINT32 CodeDataPrioritization
:1;
2428 UINT32 Reserved2
:29;
2431 /// All bit fields as a 32-bit value
2434 } CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF_ECX
;
2437 CPUID L3 Cache Allocation Technology Information EDX for CPUID leaf
2438 #CPUID_INTEL_RDT_ALLOCATION, sub-leaf
2439 #CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF.
2443 /// Individual bit fields
2447 /// [Bits 15:0] Highest COS number supported for this ResID.
2449 UINT32 HighestCosNumber
:16;
2453 /// All bit fields as a 32-bit value
2456 } CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF_EDX
;
2459 L2 Cache Allocation Technology Enumeration Sub-leaf
2461 @param EAX CPUID_INTEL_RDT_ALLOCATION (0x10)
2462 @param ECX CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF (0x02)
2464 @retval EAX RESID L2 Cache Allocation Technology information described by
2465 the type CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF_EAX.
2466 @retval EBX Bit-granular map of isolation/contention of allocation units.
2467 @retval ECX Reserved.
2468 @retval EDX RESID L2 Cache Allocation Technology information described by
2469 the type CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF_EDX.
2471 <b>Example usage</b>
2473 CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF_EAX Eax;
2475 CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF_EDX Edx;
2478 CPUID_INTEL_RDT_ALLOCATION, CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF,
2479 &Eax.Uint32, &Ebx, NULL, &Edx.Uint32
2483 #define CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF 0x02
2486 CPUID L2 Cache Allocation Technology Information EAX for CPUID leaf
2487 #CPUID_INTEL_RDT_ALLOCATION, sub-leaf
2488 #CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF.
2492 /// Individual bit fields
2496 /// [Bits 4:0] Length of the capacity bit mask for the corresponding ResID
2497 /// using minus-one notation.
2499 UINT32 CapacityLength
:5;
2503 /// All bit fields as a 32-bit value
2506 } CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF_EAX
;
2509 CPUID L2 Cache Allocation Technology Information EDX for CPUID leaf
2510 #CPUID_INTEL_RDT_ALLOCATION, sub-leaf
2511 #CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF.
2515 /// Individual bit fields
2519 /// [Bits 15:0] Highest COS number supported for this ResID.
2521 UINT32 HighestCosNumber
:16;
2525 /// All bit fields as a 32-bit value
2528 } CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF_EDX
;
2531 Memory Bandwidth Allocation Enumeration Sub-leaf
2533 @param EAX CPUID_INTEL_RDT_ALLOCATION (0x10)
2534 @param ECX CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF (0x03)
2536 @retval EAX RESID memory bandwidth Allocation Technology information
2537 described by the type
2538 CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF_EAX.
2539 @retval EBX Reserved.
2540 @retval ECX RESID memory bandwidth Allocation Technology information
2541 described by the type
2542 CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF_ECX.
2543 @retval EDX RESID memory bandwidth Allocation Technology information
2544 described by the type
2545 CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF_EDX.
2547 <b>Example usage</b>
2549 CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF_EAX Eax;
2551 CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF_ECX Ecx;
2552 CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF_EDX Edx;
2556 CPUID_INTEL_RDT_ALLOCATION, CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF,
2557 &Eax.Uint32, &Ebx, NULL, &Edx.Uint32
2561 #define CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF 0x03
2564 CPUID memory bandwidth Allocation Technology Information EAX for CPUID leaf
2565 #CPUID_INTEL_RDT_ALLOCATION, sub-leaf
2566 #CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF.
2570 /// Individual bit fields
2574 /// [Bits 11:0] Reports the maximum MBA throttling value supported for
2575 /// the corresponding ResID using minus-one notation.
2577 UINT32 MaximumMBAThrottling
:12;
2581 /// All bit fields as a 32-bit value
2584 } CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF_EAX
;
2587 CPUID memory bandwidth Allocation Technology Information ECX for CPUID leaf
2588 #CPUID_INTEL_RDT_ALLOCATION, sub-leaf
2589 #CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF.
2593 /// Individual bit fields
2597 /// [Bits 1:0] Reserved.
2601 /// [Bits 3] Reports whether the response of the delay values is linear.
2604 UINT32 Reserved2
:29;
2607 /// All bit fields as a 32-bit value
2610 } CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF_ECX
;
2613 CPUID memory bandwidth Allocation Technology Information EDX for CPUID leaf
2614 #CPUID_INTEL_RDT_ALLOCATION, sub-leaf
2615 #CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF.
2619 /// Individual bit fields
2623 /// [Bits 15:0] Highest COS number supported for this ResID.
2625 UINT32 HighestCosNumber
:16;
2629 /// All bit fields as a 32-bit value
2632 } CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF_EDX
;
2635 Intel SGX resource capability and configuration.
2636 See Section 37.7.2 "Intel(R) SGX Resource Enumeration Leaves".
2638 If CPUID.(EAX=07H, ECX=0H):EBX.SGX = 1, the processor also supports querying
2639 CPUID with EAX=12H on Intel SGX resource capability and configuration.
2641 @param EAX CPUID_INTEL_SGX (0x12)
2642 @param ECX CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF (0x00).
2643 CPUID_INTEL_SGX_CAPABILITIES_1_SUB_LEAF (0x01).
2644 CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF (0x02).
2645 Sub leafs 2..n based on the sub-leaf-type encoding (returned in EAX[3:0])
2646 until the sub-leaf type is invalid.
2649 #define CPUID_INTEL_SGX 0x12
2652 Sub-Leaf 0 Enumeration of Intel SGX Capabilities.
2653 Enumerates Intel SGX capability, including enclave instruction opcode support.
2655 @param EAX CPUID_INTEL_SGX (0x12)
2656 @param ECX CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF (0x00)
2658 @retval EAX The format of Sub-Leaf 0 Enumeration of Intel SGX Capabilities is
2659 described by the type CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF_EAX.
2660 @retval EBX MISCSELECT: Reports the bit vector of supported extended features
2661 that can be written to the MISC region of the SSA.
2662 @retval ECX Reserved.
2663 @retval EDX The format of Sub-Leaf 0 Enumeration of Intel SGX Capabilities is
2664 described by the type CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF_EDX.
2666 <b>Example usage</b>
2668 CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF_EAX Eax;
2670 CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF_EDX Edx;
2673 CPUID_INTEL_SGX, CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF,
2674 &Eax.Uint32, &Ebx, NULL, &Edx.Uint32
2678 #define CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF 0x00
2681 Sub-Leaf 0 Enumeration of Intel SGX Capabilities EAX for CPUID leaf #CPUID_INTEL_SGX,
2682 sub-leaf #CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF.
2686 /// Individual bit fields
2690 /// [Bit 0] If 1, indicates leaf functions of SGX1 instruction are supported.
2694 /// [Bit 1] If 1, indicates leaf functions of SGX2 instruction are supported.
2699 /// [Bit 5] If 1, indicates Intel SGX supports ENCLV instruction leaves
2700 /// EINCVIRTCHILD, EDECVIRTCHILD, and ESETCONTEXT.
2704 /// [Bit 6] If 1, indicates Intel SGX supports ENCLS instruction leaves ETRACKC,
2705 /// ERDINFO, ELDBC, and ELDUC.
2708 UINT32 Reserved2
:25;
2711 /// All bit fields as a 32-bit value
2714 } CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF_EAX
;
2717 Sub-Leaf 0 Enumeration of Intel SGX Capabilities EDX for CPUID leaf #CPUID_INTEL_SGX,
2718 sub-leaf #CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF.
2722 /// Individual bit fields
2726 /// [Bit 7:0] The maximum supported enclave size is 2^(EDX[7:0]) bytes
2727 /// when not in 64-bit mode.
2729 UINT32 MaxEnclaveSize_Not64
:8;
2731 /// [Bit 15:8] The maximum supported enclave size is 2^(EDX[15:8]) bytes
2732 /// when operating in 64-bit mode.
2734 UINT32 MaxEnclaveSize_64
:8;
2738 /// All bit fields as a 32-bit value
2741 } CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF_EDX
;
2745 Sub-Leaf 1 Enumeration of Intel SGX Capabilities.
2746 Enumerates Intel SGX capability of processor state configuration and enclave
2747 configuration in the SECS structure.
2749 @param EAX CPUID_INTEL_SGX (0x12)
2750 @param ECX CPUID_INTEL_SGX_CAPABILITIES_1_SUB_LEAF (0x01)
2752 @retval EAX Report the valid bits of SECS.ATTRIBUTES[31:0] that software can
2753 set with ECREATE. SECS.ATTRIBUTES[n] can be set to 1 using ECREATE
2754 only if EAX[n] is 1, where n < 32.
2755 @retval EBX Report the valid bits of SECS.ATTRIBUTES[63:32] that software can
2756 set with ECREATE. SECS.ATTRIBUTES[n+32] can be set to 1 using ECREATE
2757 only if EBX[n] is 1, where n < 32.
2758 @retval ECX Report the valid bits of SECS.ATTRIBUTES[95:64] that software can
2759 set with ECREATE. SECS.ATTRIBUTES[n+64] can be set to 1 using ECREATE
2760 only if ECX[n] is 1, where n < 32.
2761 @retval EDX Report the valid bits of SECS.ATTRIBUTES[127:96] that software can
2762 set with ECREATE. SECS.ATTRIBUTES[n+96] can be set to 1 using ECREATE
2763 only if EDX[n] is 1, where n < 32.
2765 <b>Example usage</b>
2773 CPUID_INTEL_SGX, CPUID_INTEL_SGX_CAPABILITIES_1_SUB_LEAF,
2774 &Eax, &Ebx, &Ecx, &Edx
2778 #define CPUID_INTEL_SGX_CAPABILITIES_1_SUB_LEAF 0x01
2782 Sub-Leaf Index 2 or Higher Enumeration of Intel SGX Resources.
2783 Enumerates available EPC resources.
2785 @param EAX CPUID_INTEL_SGX (0x12)
2786 @param ECX CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF (0x02)
2788 @retval EAX The format of Sub-Leaf Index 2 or Higher Enumeration of Intel SGX
2789 Resources is described by the type
2790 CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_EAX.
2791 @retval EBX The format of Sub-Leaf Index 2 or Higher Enumeration of Intel SGX
2792 Resources is described by the type
2793 CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_EBX.
2794 @retval EDX The format of Sub-Leaf Index 2 or Higher Enumeration of Intel SGX
2795 Resources is described by the type
2796 CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_ECX.
2797 @retval EDX The format of Sub-Leaf Index 2 or Higher Enumeration of Intel SGX
2798 Resources is described by the type
2799 CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_EDX.
2801 <b>Example usage</b>
2803 CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_EAX Eax;
2804 CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_EBX Ebx;
2805 CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_ECX Ecx;
2806 CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_EDX Edx;
2809 CPUID_INTEL_SGX, CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF,
2810 &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32
2814 #define CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF 0x02
2817 Sub-Leaf Index 2 or Higher Enumeration of Intel SGX Resources EAX for CPUID
2818 leaf #CPUID_INTEL_SGX, sub-leaf #CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF.
2822 /// Individual bit fields
2826 /// [Bit 3:0] Sub-leaf-type encoding.
2827 /// 0000b: This sub-leaf is invalid, EBX:EAX and EDX:ECX report 0.
2828 /// 0001b: This sub-leaf provides information on the Enclave Page Cache (EPC)
2829 /// in EBX:EAX and EDX:ECX.
2830 /// All other encoding are reserved.
2832 UINT32 SubLeafType
:4;
2835 /// [Bit 31:12] If EAX[3:0] = 0001b, these are bits 31:12 of the physical address of
2836 /// the base of the EPC section.
2838 UINT32 LowAddressOfEpcSection
:20;
2841 /// All bit fields as a 32-bit value
2844 } CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_EAX
;
2847 Sub-Leaf Index 2 or Higher Enumeration of Intel SGX Resources EBX for CPUID
2848 leaf #CPUID_INTEL_SGX, sub-leaf #CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF.
2852 /// Individual bit fields
2856 /// [Bit 19:0] If EAX[3:0] = 0001b, these are bits 51:32 of the physical address of
2857 /// the base of the EPC section.
2859 UINT32 HighAddressOfEpcSection
:20;
2863 /// All bit fields as a 32-bit value
2866 } CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_EBX
;
2869 Sub-Leaf Index 2 or Higher Enumeration of Intel SGX Resources ECX for CPUID
2870 leaf #CPUID_INTEL_SGX, sub-leaf #CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF.
2874 /// Individual bit fields
2878 /// [Bit 3:0] The EPC section encoding.
2879 /// 0000b: Not valid.
2880 /// 0001b: The EPC section is confidentiality, integrity and replay protected.
2881 /// All other encoding are reserved.
2883 UINT32 EpcSection
:4;
2886 /// [Bit 31:12] If EAX[3:0] = 0001b, these are bits 31:12 of the size of the
2887 /// corresponding EPC section within the Processor Reserved Memory.
2889 UINT32 LowSizeOfEpcSection
:20;
2892 /// All bit fields as a 32-bit value
2895 } CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_ECX
;
2898 Sub-Leaf Index 2 or Higher Enumeration of Intel SGX Resources EDX for CPUID
2899 leaf #CPUID_INTEL_SGX, sub-leaf #CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF.
2903 /// Individual bit fields
2907 /// [Bit 19:0] If EAX[3:0] = 0001b, these are bits 51:32 of the size of the
2908 /// corresponding EPC section within the Processor Reserved Memory.
2910 UINT32 HighSizeOfEpcSection
:20;
2914 /// All bit fields as a 32-bit value
2917 } CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_EDX
;
2921 CPUID Intel Processor Trace Information
2923 @param EAX CPUID_INTEL_PROCESSOR_TRACE (0x14)
2924 @param ECX CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF (0x00).
2925 CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF (0x01).
2928 #define CPUID_INTEL_PROCESSOR_TRACE 0x14
2931 CPUID Intel Processor Trace Information Main Leaf
2933 @param EAX CPUID_INTEL_PROCEDSSOR_TRACE (0x14)
2934 @param ECX CPUID_INTEL_PROCEDSSOR_TRACE_MAIN_LEAF (0x00)
2936 @retval EAX Reports the maximum sub-leaf supported in leaf 14H.
2937 @retval EBX Returns Intel processor trace information described by the
2938 type CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF_EBX.
2939 @retval ECX Returns Intel processor trace information described by the
2940 type CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF_ECX.
2941 @retval EDX Reserved.
2943 <b>Example usage</b>
2946 CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF_EBX Ebx;
2947 CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF_ECX Ecx;
2950 CPUID_INTEL_PROCESSOR_TRACE, CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF,
2951 &Eax, &Ebx.Uint32, &Ecx.Uint32, NULL
2955 #define CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF 0x00
2958 CPUID Intel Processor Trace EBX for CPUID leaf #CPUID_INTEL_PROCESSOR_TRACE,
2959 sub-leaf #CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF.
2963 /// Individual bit fields
2967 /// [Bit 0] If 1, indicates that IA32_RTIT_CTL.CR3Filter can be set to 1,
2968 /// and that IA32_RTIT_CR3_MATCH MSR can be accessed.
2972 /// [Bit 1] If 1, indicates support of Configurable PSB and Cycle-Accurate
2975 UINT32 ConfigurablePsb
:1;
2977 /// [Bit 2] If 1, indicates support of IP Filtering, TraceStop filtering,
2978 /// and preservation of Intel PT MSRs across warm reset.
2980 UINT32 IpTraceStopFiltering
:1;
2982 /// [Bit 3] If 1, indicates support of MTC timing packet and suppression of
2983 /// COFI-based packets.
2987 /// [Bit 4] If 1, indicates support of PTWRITE. Writes can set
2988 /// IA32_RTIT_CTL[12] (PTWEn) and IA32_RTIT_CTL[5] (FUPonPTW), and PTWRITE
2989 /// can generate packets.
2993 /// [Bit 5] If 1, indicates support of Power Event Trace. Writes can set
2994 /// IA32_RTIT_CTL[4] (PwrEvtEn), enabling Power Event Trace packet
2997 UINT32 PowerEventTrace
:1;
3001 /// All bit fields as a 32-bit value
3004 } CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF_EBX
;
3007 CPUID Intel Processor Trace ECX for CPUID leaf #CPUID_INTEL_PROCESSOR_TRACE,
3008 sub-leaf #CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF.
3012 /// Individual bit fields
3016 /// [Bit 0] If 1, Tracing can be enabled with IA32_RTIT_CTL.ToPA = 1, hence
3017 /// utilizing the ToPA output scheme; IA32_RTIT_OUTPUT_BASE and
3018 /// IA32_RTIT_OUTPUT_MASK_PTRS MSRs can be accessed.
3022 /// [Bit 1] If 1, ToPA tables can hold any number of output entries, up to
3023 /// the maximum allowed by the MaskOrTableOffset field of
3024 /// IA32_RTIT_OUTPUT_MASK_PTRS.
3028 /// [Bit 2] If 1, indicates support of Single-Range Output scheme.
3030 UINT32 SingleRangeOutput
:1;
3032 /// [Bit 3] If 1, indicates support of output to Trace Transport subsystem.
3034 UINT32 TraceTransportSubsystem
:1;
3037 /// [Bit 31] If 1, generated packets which contain IP payloads have LIP
3038 /// values, which include the CS base component.
3043 /// All bit fields as a 32-bit value
3046 } CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF_ECX
;
3050 CPUID Intel Processor Trace Information Sub-leaf
3052 @param EAX CPUID_INTEL_PROCEDSSOR_TRACE (0x14)
3053 @param ECX CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF (0x01)
3055 @retval EAX Returns Intel processor trace information described by the
3056 type CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF_EAX.
3057 @retval EBX Returns Intel processor trace information described by the
3058 type CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF_EBX.
3059 @retval ECX Reserved.
3060 @retval EDX Reserved.
3062 <b>Example usage</b>
3064 UINT32 MaximumSubLeaf;
3066 CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF_EAX Eax;
3067 CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF_EBX Ebx;
3070 CPUID_INTEL_PROCESSOR_TRACE, CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF,
3071 &MaximumSubLeaf, NULL, NULL, NULL
3074 for (SubLeaf = CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF; SubLeaf <= MaximumSubLeaf; SubLeaf++) {
3076 CPUID_INTEL_PROCESSOR_TRACE, SubLeaf,
3077 &Eax.Uint32, &Ebx.Uint32, NULL, NULL
3082 #define CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF 0x01
3085 CPUID Intel Processor Trace EAX for CPUID leaf #CPUID_INTEL_PROCESSOR_TRACE,
3086 sub-leaf #CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF.
3090 /// Individual bit fields
3094 /// [Bits 2:0] Number of configurable Address Ranges for filtering.
3096 UINT32 ConfigurableAddressRanges
:3;
3099 /// [Bits 31:16] Bitmap of supported MTC period encodings
3101 UINT32 MtcPeriodEncodings
:16;
3105 /// All bit fields as a 32-bit value
3108 } CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF_EAX
;
3111 CPUID Intel Processor Trace EBX for CPUID leaf #CPUID_INTEL_PROCESSOR_TRACE,
3112 sub-leaf #CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF.
3116 /// Individual bit fields
3120 /// [Bits 15:0] Bitmap of supported Cycle Threshold value encodings.
3122 UINT32 CycleThresholdEncodings
:16;
3124 /// [Bits 31:16] Bitmap of supported Configurable PSB frequency encodings.
3126 UINT32 PsbFrequencyEncodings
:16;
3130 /// All bit fields as a 32-bit value
3133 } CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF_EBX
;
3137 CPUID Time Stamp Counter and Nominal Core Crystal Clock Information
3140 If EBX[31:0] is 0, the TSC/"core crystal clock" ratio is not enumerated.
3141 EBX[31:0]/EAX[31:0] indicates the ratio of the TSC frequency and the core
3142 crystal clock frequency.
3143 If ECX is 0, the nominal core crystal clock frequency is not enumerated.
3144 "TSC frequency" = "core crystal clock frequency" * EBX/EAX.
3145 The core crystal clock may differ from the reference clock, bus clock, or core
3148 @param EAX CPUID_TIME_STAMP_COUNTER (0x15)
3150 @retval EAX An unsigned integer which is the denominator of the
3151 TSC/"core crystal clock" ratio
3152 @retval EBX An unsigned integer which is the numerator of the
3153 TSC/"core crystal clock" ratio.
3154 @retval ECX An unsigned integer which is the nominal frequency
3155 of the core crystal clock in Hz.
3156 @retval EDX Reserved.
3158 <b>Example usage</b>
3164 AsmCpuid (CPUID_TIME_STAMP_COUNTER, &Eax, &Ebx, &Ecx, NULL);
3167 #define CPUID_TIME_STAMP_COUNTER 0x15
3171 CPUID Processor Frequency Information
3174 Data is returned from this interface in accordance with the processor's
3175 specification and does not reflect actual values. Suitable use of this data
3176 includes the display of processor information in like manner to the processor
3177 brand string and for determining the appropriate range to use when displaying
3178 processor information e.g. frequency history graphs. The returned information
3179 should not be used for any other purpose as the returned information does not
3180 accurately correlate to information / counters returned by other processor
3181 interfaces. While a processor may support the Processor Frequency Information
3182 leaf, fields that return a value of zero are not supported.
3184 @param EAX CPUID_TIME_STAMP_COUNTER (0x16)
3186 @retval EAX Returns processor base frequency information described by the
3187 type CPUID_PROCESSOR_FREQUENCY_EAX.
3188 @retval EBX Returns maximum frequency information described by the type
3189 CPUID_PROCESSOR_FREQUENCY_EBX.
3190 @retval ECX Returns bus frequency information described by the type
3191 CPUID_PROCESSOR_FREQUENCY_ECX.
3192 @retval EDX Reserved.
3194 <b>Example usage</b>
3196 CPUID_PROCESSOR_FREQUENCY_EAX Eax;
3197 CPUID_PROCESSOR_FREQUENCY_EBX Ebx;
3198 CPUID_PROCESSOR_FREQUENCY_ECX Ecx;
3200 AsmCpuid (CPUID_PROCESSOR_FREQUENCY, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, NULL);
3203 #define CPUID_PROCESSOR_FREQUENCY 0x16
3206 CPUID Processor Frequency Information EAX for CPUID leaf
3207 #CPUID_PROCESSOR_FREQUENCY.
3211 /// Individual bit fields
3215 /// [Bits 15:0] Processor Base Frequency (in MHz).
3217 UINT32 ProcessorBaseFrequency
:16;
3221 /// All bit fields as a 32-bit value
3224 } CPUID_PROCESSOR_FREQUENCY_EAX
;
3227 CPUID Processor Frequency Information EBX for CPUID leaf
3228 #CPUID_PROCESSOR_FREQUENCY.
3232 /// Individual bit fields
3236 /// [Bits 15:0] Maximum Frequency (in MHz).
3238 UINT32 MaximumFrequency
:16;
3242 /// All bit fields as a 32-bit value
3245 } CPUID_PROCESSOR_FREQUENCY_EBX
;
3248 CPUID Processor Frequency Information ECX for CPUID leaf
3249 #CPUID_PROCESSOR_FREQUENCY.
3253 /// Individual bit fields
3257 /// [Bits 15:0] Bus (Reference) Frequency (in MHz).
3259 UINT32 BusFrequency
:16;
3263 /// All bit fields as a 32-bit value
3266 } CPUID_PROCESSOR_FREQUENCY_ECX
;
3270 CPUID SoC Vendor Information
3272 @param EAX CPUID_SOC_VENDOR (0x17)
3273 @param ECX CPUID_SOC_VENDOR_MAIN_LEAF (0x00)
3274 CPUID_SOC_VENDOR_BRAND_STRING1 (0x01)
3275 CPUID_SOC_VENDOR_BRAND_STRING1 (0x02)
3276 CPUID_SOC_VENDOR_BRAND_STRING1 (0x03)
3279 Leaf 17H output depends on the initial value in ECX. SOC Vendor Brand String
3280 is a UTF-8 encoded string padded with trailing bytes of 00H. The complete SOC
3281 Vendor Brand String is constructed by concatenating in ascending order of
3282 EAX:EBX:ECX:EDX and from the sub-leaf 1 fragment towards sub-leaf 3.
3285 #define CPUID_SOC_VENDOR 0x17
3288 CPUID SoC Vendor Information
3290 @param EAX CPUID_SOC_VENDOR (0x17)
3291 @param ECX CPUID_SOC_VENDOR_MAIN_LEAF (0x00)
3293 @retval EAX MaxSOCID_Index. Reports the maximum input value of supported
3294 sub-leaf in leaf 17H.
3295 @retval EBX Returns SoC Vendor information described by the type
3296 CPUID_SOC_VENDOR_MAIN_LEAF_EBX.
3297 @retval ECX Project ID. A unique number an SOC vendor assigns to its SOC
3299 @retval EDX Stepping ID. A unique number within an SOC project that an SOC
3302 <b>Example usage</b>
3305 CPUID_SOC_VENDOR_MAIN_LEAF_EBX Ebx;
3310 CPUID_SOC_VENDOR, CPUID_SOC_VENDOR_MAIN_LEAF,
3311 &Eax, &Ebx.Uint32, &Ecx, &Edx
3315 #define CPUID_SOC_VENDOR_MAIN_LEAF 0x00
3318 CPUID SoC Vendor Information EBX for CPUID leaf #CPUID_SOC_VENDOR sub-leaf
3319 #CPUID_SOC_VENDOR_MAIN_LEAF.
3323 /// Individual bit fields
3327 /// [Bits 15:0] SOC Vendor ID.
3329 UINT32 SocVendorId
:16;
3331 /// [Bit 16] If 1, the SOC Vendor ID field is assigned via an industry
3332 /// standard enumeration scheme. Otherwise, the SOC Vendor ID field is
3333 /// assigned by Intel.
3335 UINT32 IsVendorScheme
:1;
3339 /// All bit fields as a 32-bit value
3342 } CPUID_SOC_VENDOR_MAIN_LEAF_EBX
;
3345 CPUID SoC Vendor Information
3347 @param EAX CPUID_SOC_VENDOR (0x17)
3348 @param ECX CPUID_SOC_VENDOR_BRAND_STRING1 (0x01)
3350 @retval EAX SOC Vendor Brand String. UTF-8 encoded string of type
3351 CPUID_SOC_VENDOR_BRAND_STRING_DATA.
3352 @retval EBX SOC Vendor Brand String. UTF-8 encoded string of type
3353 CPUID_SOC_VENDOR_BRAND_STRING_DATA.
3354 @retval ECX SOC Vendor Brand String. UTF-8 encoded string of type
3355 CPUID_SOC_VENDOR_BRAND_STRING_DATA.
3356 @retval EDX SOC Vendor Brand String. UTF-8 encoded string of type
3357 CPUID_SOC_VENDOR_BRAND_STRING_DATA.
3359 <b>Example usage</b>
3361 CPUID_SOC_VENDOR_BRAND_STRING_DATA Eax;
3362 CPUID_SOC_VENDOR_BRAND_STRING_DATA Ebx;
3363 CPUID_SOC_VENDOR_BRAND_STRING_DATA Ecx;
3364 CPUID_SOC_VENDOR_BRAND_STRING_DATA Edx;
3367 CPUID_SOC_VENDOR, CPUID_SOC_VENDOR_BRAND_STRING1,
3368 &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32
3372 #define CPUID_SOC_VENDOR_BRAND_STRING1 0x01
3375 CPUID SoC Vendor Brand String for CPUID leafs #CPUID_SOC_VENDOR_BRAND_STRING1,
3376 #CPUID_SOC_VENDOR_BRAND_STRING2, and #CPUID_SOC_VENDOR_BRAND_STRING3.
3380 /// 4 UTF-8 characters of Soc Vendor Brand String
3382 CHAR8 BrandString
[4];
3384 /// All fields as a 32-bit value
3387 } CPUID_SOC_VENDOR_BRAND_STRING_DATA
;
3390 CPUID SoC Vendor Information
3392 @param EAX CPUID_SOC_VENDOR (0x17)
3393 @param ECX CPUID_SOC_VENDOR_BRAND_STRING2 (0x02)
3395 @retval EAX SOC Vendor Brand String. UTF-8 encoded string of type
3396 CPUID_SOC_VENDOR_BRAND_STRING_DATA.
3397 @retval EBX SOC Vendor Brand String. UTF-8 encoded string of type
3398 CPUID_SOC_VENDOR_BRAND_STRING_DATA.
3399 @retval ECX SOC Vendor Brand String. UTF-8 encoded string of type
3400 CPUID_SOC_VENDOR_BRAND_STRING_DATA.
3401 @retval EDX SOC Vendor Brand String. UTF-8 encoded string of type
3402 CPUID_SOC_VENDOR_BRAND_STRING_DATA.
3404 <b>Example usage</b>
3406 CPUID_SOC_VENDOR_BRAND_STRING_DATA Eax;
3407 CPUID_SOC_VENDOR_BRAND_STRING_DATA Ebx;
3408 CPUID_SOC_VENDOR_BRAND_STRING_DATA Ecx;
3409 CPUID_SOC_VENDOR_BRAND_STRING_DATA Edx;
3412 CPUID_SOC_VENDOR, CPUID_SOC_VENDOR_BRAND_STRING2,
3413 &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32
3417 #define CPUID_SOC_VENDOR_BRAND_STRING2 0x02
3420 CPUID SoC Vendor Information
3422 @param EAX CPUID_SOC_VENDOR (0x17)
3423 @param ECX CPUID_SOC_VENDOR_BRAND_STRING3 (0x03)
3425 @retval EAX SOC Vendor Brand String. UTF-8 encoded string of type
3426 CPUID_SOC_VENDOR_BRAND_STRING_DATA.
3427 @retval EBX SOC Vendor Brand String. UTF-8 encoded string of type
3428 CPUID_SOC_VENDOR_BRAND_STRING_DATA.
3429 @retval ECX SOC Vendor Brand String. UTF-8 encoded string of type
3430 CPUID_SOC_VENDOR_BRAND_STRING_DATA.
3431 @retval EDX SOC Vendor Brand String. UTF-8 encoded string of type
3432 CPUID_SOC_VENDOR_BRAND_STRING_DATA.
3434 <b>Example usage</b>
3436 CPUID_SOC_VENDOR_BRAND_STRING_DATA Eax;
3437 CPUID_SOC_VENDOR_BRAND_STRING_DATA Ebx;
3438 CPUID_SOC_VENDOR_BRAND_STRING_DATA Ecx;
3439 CPUID_SOC_VENDOR_BRAND_STRING_DATA Edx;
3442 CPUID_SOC_VENDOR, CPUID_SOC_VENDOR_BRAND_STRING3,
3443 &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32
3447 #define CPUID_SOC_VENDOR_BRAND_STRING3 0x03
3450 CPUID Deterministic Address Translation Parameters
3453 Each sub-leaf enumerates a different address translation structure.
3454 If ECX contains an invalid sub-leaf index, EAX/EBX/ECX/EDX return 0. Sub-leaf
3455 index n is invalid if n exceeds the value that sub-leaf 0 returns in EAX. A
3456 sub-leaf index is also invalid if EDX[4:0] returns 0.
3457 Valid sub-leaves do not need to be contiguous or in any particular order. A
3458 valid sub-leaf may be in a higher input ECX value than an invalid sub-leaf or
3459 than a valid sub-leaf of a higher or lower-level structure.
3460 * Some unified TLBs will allow a single TLB entry to satisfy data read/write
3461 and instruction fetches. Others will require separate entries (e.g., one
3462 loaded on data read/write and another loaded on an instruction fetch).
3463 Please see the Intel 64 and IA-32 Architectures Optimization Reference Manual
3464 for details of a particular product.
3465 ** Add one to the return value to get the result.
3467 @param EAX CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS (0x18)
3468 @param ECX CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_MAIN_LEAF (0x00)
3469 CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_SUB_LEAF (0x*)
3472 #define CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS 0x18
3475 CPUID Deterministic Address Translation Parameters
3477 @param EAX CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS (0x18)
3478 @param ECX CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_MAIN_LEAF (0x00)
3480 @retval EAX Reports the maximum input value of supported sub-leaf in leaf 18H.
3481 @retval EBX Returns Deterministic Address Translation Parameters described by
3482 the type CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_EBX.
3483 @retval ECX Number of Sets.
3484 @retval EDX Returns Deterministic Address Translation Parameters described by
3485 the type CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_EDX.
3487 <b>Example usage</b>
3490 CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_EBX Ebx;
3492 CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_EDX Edx;
3495 CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS,
3496 CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_MAIN_LEAF,
3497 &Eax, &Ebx.Uint32, &Ecx, &Edx.Uint32
3501 #define CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_MAIN_LEAF 0x00
3504 CPUID Deterministic Address Translation Parameters EBX for CPUID leafs.
3508 /// Individual bit fields
3512 /// [Bits 0] 4K page size entries supported by this structure.
3516 /// [Bits 1] 2MB page size entries supported by this structure.
3520 /// [Bits 2] 4MB page size entries supported by this structure.
3524 /// [Bits 3] 1 GB page size entries supported by this structure.
3528 /// [Bits 7:4] Reserved.
3532 /// [Bits 10:8] Partitioning (0: Soft partitioning between the logical
3533 /// processors sharing this structure)
3535 UINT32 Partitioning
:3;
3537 /// [Bits 15:11] Reserved.
3541 /// [Bits 31:16] W = Ways of associativity.
3546 /// All bit fields as a 32-bit value
3549 } CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_EBX
;
3552 CPUID Deterministic Address Translation Parameters EDX for CPUID leafs.
3556 /// Individual bit fields
3560 /// [Bits 4:0] Translation cache type field.
3562 UINT32 TranslationCacheType
:5;
3564 /// [Bits 7:5] Translation cache level (starts at 1).
3566 UINT32 TranslationCacheLevel
:3;
3568 /// [Bits 8] Fully associative structure.
3570 UINT32 FullyAssociative
:1;
3572 /// [Bits 13:9] Reserved.
3576 /// [Bits 25:14] Maximum number of addressable IDs for logical
3577 /// processors sharing this translation cache.
3579 UINT32 MaximumNum
:12;
3581 /// [Bits 31:26] Reserved.
3586 /// All bit fields as a 32-bit value
3589 } CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_EDX
;
3592 /// @{ Define value for CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_EDX.TranslationCacheType
3594 #define CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_TRANSLATION_CACHE_TYPE_INVALID 0x00
3595 #define CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_TRANSLATION_CACHE_TYPE_DATA_TLB 0x01
3596 #define CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_TRANSLATION_CACHE_TYPE_INSTRUCTION_TLB 0x02
3597 #define CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_TRANSLATION_CACHE_TYPE_UNIFIED_TLB 0x03
3604 CPUID V2 Extended Topology Enumeration Leaf
3607 CPUID leaf 1FH is a preferred superset to leaf 0BH. Intel recommends first checking
3608 for the existence of Leaf 1FH and using this if available.
3609 Most of Leaf 1FH output depends on the initial value in ECX. The EDX output of leaf
3610 1FH is always valid and does not vary with input value in ECX. Output value in ECX[7:0]
3611 always equals input value in ECX[7:0]. Sub-leaf index 0 enumerates SMT level. Each
3612 subsequent higher sub-leaf index enumerates a higher-level topological entity in
3613 hierarchical order. For sub-leaves that return an invalid level-type of 0 in ECX[15:8];
3614 EAX and EBX will return 0. If an input value n in ECX returns the invalid level-type of
3615 0 in ECX[15:8], other input values with ECX > n also return 0 in ECX[15:8].
3617 Software should use this field (EAX[4:0]) to enumerate processor topology of the system.
3618 Software must not use EBX[15:0] to enumerate processor topology of the system. This value
3619 in this field (EBX[15:0]) is only intended for display/diagnostic purposes. The actual
3620 number of logical processors available to BIOS/OS/Applications may be different from the
3621 value of EBX[15:0], depending on software and platform hardware configurations.
3623 @param EAX CPUID_V2_EXTENDED_TOPOLOGY (0x1F)
3624 @param ECX Level number
3627 #define CPUID_V2_EXTENDED_TOPOLOGY 0x1F
3630 /// @{ Define value for CPUID_EXTENDED_TOPOLOGY_ECX.LevelType
3631 /// The value of the "level type" field is not related to level numbers in
3632 /// any way, higher "level type" values do not mean higher levels.
3634 #define CPUID_V2_EXTENDED_TOPOLOGY_LEVEL_TYPE_MODULE 0x03
3635 #define CPUID_V2_EXTENDED_TOPOLOGY_LEVEL_TYPE_TILE 0x04
3636 #define CPUID_V2_EXTENDED_TOPOLOGY_LEVEL_TYPE_DIE 0x05
3642 CPUID Extended Function
3644 @param EAX CPUID_EXTENDED_FUNCTION (0x80000000)
3646 @retval EAX Maximum Input Value for Extended Function CPUID Information.
3647 @retval EBX Reserved.
3648 @retval ECX Reserved.
3649 @retval EDX Reserved.
3651 <b>Example usage</b>
3655 AsmCpuid (CPUID_EXTENDED_FUNCTION, &Eax, NULL, NULL, NULL);
3658 #define CPUID_EXTENDED_FUNCTION 0x80000000
3662 CPUID Extended Processor Signature and Feature Bits
3664 @param EAX CPUID_EXTENDED_CPU_SIG (0x80000001)
3666 @retval EAX CPUID_EXTENDED_CPU_SIG.
3667 @retval EBX Reserved.
3668 @retval ECX Extended Processor Signature and Feature Bits information
3669 described by the type CPUID_EXTENDED_CPU_SIG_ECX.
3670 @retval EDX Extended Processor Signature and Feature Bits information
3671 described by the type CPUID_EXTENDED_CPU_SIG_EDX.
3673 <b>Example usage</b>
3676 CPUID_EXTENDED_CPU_SIG_ECX Ecx;
3677 CPUID_EXTENDED_CPU_SIG_EDX Edx;
3679 AsmCpuid (CPUID_EXTENDED_CPU_SIG, &Eax, NULL, &Ecx.Uint32, &Edx.Uint32);
3682 #define CPUID_EXTENDED_CPU_SIG 0x80000001
3685 CPUID Extended Processor Signature and Feature Bits ECX for CPUID leaf
3686 #CPUID_EXTENDED_CPU_SIG.
3690 /// Individual bit fields
3694 /// [Bit 0] LAHF/SAHF available in 64-bit mode.
3704 /// [Bit 8] PREFETCHW.
3707 UINT32 Reserved3
:23;
3710 /// All bit fields as a 32-bit value
3713 } CPUID_EXTENDED_CPU_SIG_ECX
;
3716 CPUID Extended Processor Signature and Feature Bits EDX for CPUID leaf
3717 #CPUID_EXTENDED_CPU_SIG.
3721 /// Individual bit fields
3724 UINT32 Reserved1
:11;
3726 /// [Bit 11] SYSCALL/SYSRET available in 64-bit mode.
3728 UINT32 SYSCALL_SYSRET
:1;
3731 /// [Bit 20] Execute Disable Bit available.
3736 /// [Bit 26] 1-GByte pages are available if 1.
3740 /// [Bit 27] RDTSCP and IA32_TSC_AUX are available if 1.
3745 /// [Bit 29] Intel(R) 64 Architecture available if 1.
3751 /// All bit fields as a 32-bit value
3754 } CPUID_EXTENDED_CPU_SIG_EDX
;
3758 CPUID Processor Brand String
3760 @param EAX CPUID_BRAND_STRING1 (0x80000002)
3762 @retval EAX Processor Brand String in type CPUID_BRAND_STRING_DATA.
3763 @retval EBX Processor Brand String Continued in type CPUID_BRAND_STRING_DATA.
3764 @retval ECX Processor Brand String Continued in type CPUID_BRAND_STRING_DATA.
3765 @retval EDX Processor Brand String Continued in type CPUID_BRAND_STRING_DATA.
3767 <b>Example usage</b>
3769 CPUID_BRAND_STRING_DATA Eax;
3770 CPUID_BRAND_STRING_DATA Ebx;
3771 CPUID_BRAND_STRING_DATA Ecx;
3772 CPUID_BRAND_STRING_DATA Edx;
3774 AsmCpuid (CPUID_BRAND_STRING1, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32);
3777 #define CPUID_BRAND_STRING1 0x80000002
3780 CPUID Processor Brand String for CPUID leafs #CPUID_BRAND_STRING1,
3781 #CPUID_BRAND_STRING2, and #CPUID_BRAND_STRING3.
3785 /// 4 ASCII characters of Processor Brand String
3787 CHAR8 BrandString
[4];
3789 /// All fields as a 32-bit value
3792 } CPUID_BRAND_STRING_DATA
;
3795 CPUID Processor Brand String
3797 @param EAX CPUID_BRAND_STRING2 (0x80000003)
3799 @retval EAX Processor Brand String Continued in type CPUID_BRAND_STRING_DATA.
3800 @retval EBX Processor Brand String Continued in type CPUID_BRAND_STRING_DATA.
3801 @retval ECX Processor Brand String Continued in type CPUID_BRAND_STRING_DATA.
3802 @retval EDX Processor Brand String Continued in type CPUID_BRAND_STRING_DATA.
3804 <b>Example usage</b>
3806 CPUID_BRAND_STRING_DATA Eax;
3807 CPUID_BRAND_STRING_DATA Ebx;
3808 CPUID_BRAND_STRING_DATA Ecx;
3809 CPUID_BRAND_STRING_DATA Edx;
3811 AsmCpuid (CPUID_BRAND_STRING2, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32);
3814 #define CPUID_BRAND_STRING2 0x80000003
3817 CPUID Processor Brand String
3819 @param EAX CPUID_BRAND_STRING3 (0x80000004)
3821 @retval EAX Processor Brand String Continued in type CPUID_BRAND_STRING_DATA.
3822 @retval EBX Processor Brand String Continued in type CPUID_BRAND_STRING_DATA.
3823 @retval ECX Processor Brand String Continued in type CPUID_BRAND_STRING_DATA.
3824 @retval EDX Processor Brand String Continued in type CPUID_BRAND_STRING_DATA.
3826 <b>Example usage</b>
3828 CPUID_BRAND_STRING_DATA Eax;
3829 CPUID_BRAND_STRING_DATA Ebx;
3830 CPUID_BRAND_STRING_DATA Ecx;
3831 CPUID_BRAND_STRING_DATA Edx;
3833 AsmCpuid (CPUID_BRAND_STRING3, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32);
3836 #define CPUID_BRAND_STRING3 0x80000004
3840 CPUID Extended Cache information
3842 @param EAX CPUID_EXTENDED_CACHE_INFO (0x80000006)
3844 @retval EAX Reserved.
3845 @retval EBX Reserved.
3846 @retval ECX Extended cache information described by the type
3847 CPUID_EXTENDED_CACHE_INFO_ECX.
3848 @retval EDX Reserved.
3850 <b>Example usage</b>
3852 CPUID_EXTENDED_CACHE_INFO_ECX Ecx;
3854 AsmCpuid (CPUID_EXTENDED_CACHE_INFO, NULL, NULL, &Ecx.Uint32, NULL);
3857 #define CPUID_EXTENDED_CACHE_INFO 0x80000006
3860 CPUID Extended Cache information ECX for CPUID leaf #CPUID_EXTENDED_CACHE_INFO.
3864 /// Individual bit fields
3868 /// [Bits 7:0] Cache line size in bytes.
3870 UINT32 CacheLineSize
:8;
3873 /// [Bits 15:12] L2 Associativity field. Supported values are in the range
3874 /// #CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_DISABLED to
3875 /// #CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_FULL
3877 UINT32 L2Associativity
:4;
3879 /// [Bits 31:16] Cache size in 1K units.
3881 UINT32 CacheSize
:16;
3884 /// All bit fields as a 32-bit value
3887 } CPUID_EXTENDED_CACHE_INFO_ECX
;
3890 /// @{ Define value for bit field CPUID_EXTENDED_CACHE_INFO_ECX.L2Associativity
3892 #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_DISABLED 0x00
3893 #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_DIRECT_MAPPED 0x01
3894 #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_2_WAY 0x02
3895 #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_4_WAY 0x04
3896 #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_8_WAY 0x06
3897 #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_16_WAY 0x08
3898 #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_32_WAY 0x0A
3899 #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_48_WAY 0x0B
3900 #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_64_WAY 0x0C
3901 #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_96_WAY 0x0D
3902 #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_128_WAY 0x0E
3903 #define CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_FULL 0x0F
3909 CPUID Extended Time Stamp Counter information
3911 @param EAX CPUID_EXTENDED_TIME_STAMP_COUNTER (0x80000007)
3913 @retval EAX Reserved.
3914 @retval EBX Reserved.
3915 @retval ECX Reserved.
3916 @retval EDX Extended time stamp counter (TSC) information described by the
3917 type CPUID_EXTENDED_TIME_STAMP_COUNTER_EDX.
3919 <b>Example usage</b>
3921 CPUID_EXTENDED_TIME_STAMP_COUNTER_EDX Edx;
3923 AsmCpuid (CPUID_EXTENDED_TIME_STAMP_COUNTER, NULL, NULL, NULL, &Edx.Uint32);
3926 #define CPUID_EXTENDED_TIME_STAMP_COUNTER 0x80000007
3929 CPUID Extended Time Stamp Counter information EDX for CPUID leaf
3930 #CPUID_EXTENDED_TIME_STAMP_COUNTER.
3934 /// Individual bit fields
3939 /// [Bit 8] Invariant TSC available if 1.
3941 UINT32 InvariantTsc
:1;
3942 UINT32 Reserved2
:23;
3945 /// All bit fields as a 32-bit value
3948 } CPUID_EXTENDED_TIME_STAMP_COUNTER_EDX
;
3952 CPUID Linear Physical Address Size
3954 @param EAX CPUID_VIR_PHY_ADDRESS_SIZE (0x80000008)
3956 @retval EAX Linear/Physical Address Size described by the type
3957 CPUID_VIR_PHY_ADDRESS_SIZE_EAX.
3958 @retval EBX Reserved.
3959 @retval ECX Reserved.
3960 @retval EDX Reserved.
3962 <b>Example usage</b>
3964 CPUID_VIR_PHY_ADDRESS_SIZE_EAX Eax;
3966 AsmCpuid (CPUID_VIR_PHY_ADDRESS_SIZE, &Eax.Uint32, NULL, NULL, NULL);
3969 #define CPUID_VIR_PHY_ADDRESS_SIZE 0x80000008
3972 CPUID Linear Physical Address Size EAX for CPUID leaf
3973 #CPUID_VIR_PHY_ADDRESS_SIZE.
3977 /// Individual bit fields
3981 /// [Bits 7:0] Number of physical address bits.
3984 /// If CPUID.80000008H:EAX[7:0] is supported, the maximum physical address
3985 /// number supported should come from this field.
3987 UINT32 PhysicalAddressBits
:8;
3989 /// [Bits 15:8] Number of linear address bits.
3991 UINT32 LinearAddressBits
:8;
3995 /// All bit fields as a 32-bit value
3998 } CPUID_VIR_PHY_ADDRESS_SIZE_EAX
;