TianoCore EDK2 master
Loading...
Searching...
No Matches
Cpuid.h
Go to the documentation of this file.
1
18#ifndef __AMD_CPUID_H__
19#define __AMD_CPUID_H__
20
38#define CPUID_SIGNATURE_AUTHENTIC_AMD_EBX SIGNATURE_32 ('A', 'u', 't', 'h')
39#define CPUID_SIGNATURE_AUTHENTIC_AMD_EDX SIGNATURE_32 ('e', 'n', 't', 'i')
40#define CPUID_SIGNATURE_AUTHENTIC_AMD_ECX SIGNATURE_32 ('c', 'A', 'M', 'D')
44
64#define AMD_CPUID_EXTENDED_TOPOLOGY 0x80000026
65
85typedef union {
89 struct {
93 UINT32 Stepping : 4;
97 UINT32 BaseModel : 4;
101 UINT32 BaseFamily : 4;
105 UINT32 Reserved1 : 4;
109 UINT32 ExtModel : 4;
113 UINT32 ExtFamily : 8;
117 UINT32 Reserved2 : 4;
118 } Bits;
122 UINT32 Uint32;
124
129typedef union {
133 struct {
137 UINT32 Reserved : 28;
141 UINT32 PkgType : 4;
142 } Bits;
146 UINT32 Uint32;
148
153typedef union {
157 struct {
161 UINT32 LAHF_SAHF : 1;
165 UINT32 CmpLegacy : 1;
169 UINT32 SVM : 1;
173 UINT32 ExtApicSpace : 1;
177 UINT32 AltMovCr8 : 1;
181 UINT32 LZCNT : 1;
185 UINT32 SSE4A : 1;
189 UINT32 MisAlignSse : 1;
193 UINT32 PREFETCHW : 1;
197 UINT32 OSVW : 1;
201 UINT32 IBS : 1;
205 UINT32 XOP : 1;
209 UINT32 SKINIT : 1;
213 UINT32 WDT : 1;
217 UINT32 Reserved1 : 1;
221 UINT32 LWP : 1;
225 UINT32 FMA4 : 1;
229 UINT32 TCE : 1;
233 UINT32 Reserved2 : 4;
241 UINT32 PerfCtrExtCore : 1;
245 UINT32 Reserved3 : 2;
253 UINT32 PerfTsc : 1;
257 UINT32 PerfCtrExtL3 : 1;
261 UINT32 MwaitExtended : 1;
265 UINT32 Reserved4 : 2;
266 } Bits;
270 UINT32 Uint32;
272
277typedef union {
281 struct {
285 UINT32 FPU : 1;
289 UINT32 VME : 1;
293 UINT32 DE : 1;
297 UINT32 PSE : 1;
301 UINT32 TSC : 1;
305 UINT32 MSR : 1;
309 UINT32 PAE : 1;
313 UINT32 MCE : 1;
317 UINT32 CMPXCHG8B : 1;
321 UINT32 APIC : 1;
325 UINT32 Reserved1 : 1;
329 UINT32 SYSCALL_SYSRET : 1;
333 UINT32 MTRR : 1;
337 UINT32 PGE : 1;
341 UINT32 MCA : 1;
345 UINT32 CMOV : 1;
349 UINT32 PAT : 1;
353 UINT32 PSE36 : 1;
357 UINT32 Reserved2 : 2;
361 UINT32 NX : 1;
365 UINT32 Reserved3 : 1;
369 UINT32 MmxExt : 1;
373 UINT32 MMX : 1;
377 UINT32 FFSR : 1;
381 UINT32 FFXSR : 1;
385 UINT32 Page1GB : 1;
389 UINT32 RDTSCP : 1;
393 UINT32 Reserved4 : 1;
397 UINT32 LM : 1;
401 UINT32 ThreeDNow : 1;
405 UINT32 ThreeDNowExt : 1;
406 } Bits;
410 UINT32 Uint32;
412
431typedef union {
435 struct {
451 UINT32 Reserved : 8;
452 } Bits;
456 UINT32 Uint32;
458
463typedef union {
467 struct {
471 UINT32 CLZERO : 1;
475 UINT32 IRPerf : 1;
479 UINT32 XSaveErPtr : 1;
483 UINT32 Reserved : 29;
484 } Bits;
488 UINT32 Uint32;
490
495typedef union {
499 struct {
503 UINT32 NC : 8;
507 UINT32 Reserved1 : 4;
515 UINT32 PerfTscSize : 2;
519 UINT32 Reserved2 : 14;
520 } Bits;
524 UINT32 Uint32;
526
540#define CPUID_AMD_PROCESSOR_TOPOLOGY 0x8000001E
541
546typedef union {
550 struct {
555 } Bits;
559 UINT32 Uint32;
561
566typedef union {
570 struct {
574 UINT32 CoreId : 8;
578 UINT32 ThreadsPerCore : 8;
582 UINT32 Reserved : 16;
583 } Bits;
587 UINT32 Uint32;
589
594typedef union {
598 struct {
602 UINT32 NodeId : 8;
610 UINT32 Reserved : 21;
611 } Bits;
615 UINT32 Uint32;
617
641#define CPUID_MEMORY_ENCRYPTION_INFO 0x8000001F
642
647typedef union {
651 struct {
655 UINT32 SmeBit : 1;
656
660 UINT32 SevBit : 1;
661
665 UINT32 PageFlushMsrBit : 1;
666
670 UINT32 SevEsBit : 1;
671
675 UINT32 ReservedBits : 28;
676 } Bits;
680 UINT32 Uint32;
682
687typedef union {
691 struct {
695 UINT32 PtePosBits : 6;
696
701 UINT32 ReducedPhysBits : 5;
702
706 UINT32 ReservedBits : 21;
707 } Bits;
711 UINT32 Uint32;
713
718typedef union {
722 struct {
726 UINT32 NumGuests;
727 } Bits;
731 UINT32 Uint32;
733
738typedef union {
742 struct {
746 UINT32 MinAsid;
747 } Bits;
751 UINT32 Uint32;
753
754#endif