EAX = 80000000h first and checking if the returned value is not less than 80000004h. #include <stdio.h> #include <string.h> #include <cpuid.h> int main() { unsigned int regs[12]; char str[sizeof(regs)]; __cpuid(0x80000000, regs[0], regs[1], regs[2], regs[3]); if (regs[0] < 0x80000004) return 1; __cpuid(0x80000002, regs[0], regs[1], regs[2], regs[3]); __cpuid(0x80000003, regs[4], regs[5], regs[6], regs[7]); __cpuid(0x80000004, regs[8], regs[9], regs[10], regs[11]); memcpy(str, regs, sizeof(regs)); printf("%s\n", str); return 0; } EAX=80000005h: L1 Cache and TLB Identifiers This function contains the processor’s L1 cache and TLB characteristics. EAX=80000006h: Extended L2 Cache Features Returns details of the L2 cache in ECX, including the line size in bytes (Bits 07 - 00), type of associativity (encoded by a 4 bits field; Bits 15 - 12) and the cache size in KB (Bits 31 - 16). #include <stdio.h> #include <cpuid.h> int main() { unsigned int eax, ebx, ecx, edx; unsigned int lsize, assoc, cache; __cpuid(0x80000006, eax, ebx, ecx, edx); lsize = ecx & 0xff; assoc = (ecx >> 12) & 0x07; cache = (ecx >> 16) & 0xffff; printf("Line size: %d B, Assoc. type: %d, Cache size: %d KB.\n", lsize, assoc, cache); return 0; } EAX=80000007h: Advanced Power Management Information This function provides advanced power management feature identifiers. EDX bit 8 indicates support for invariant TSC. EAX=80000008h: Virtual and Physical address Sizes EDX provides information specific to RDPRU (the maximum register identifier allowed) in 31-16. The current number as of Zen 2 is 1 for MPERF and APERF. EAX=8000001Fh: Encrypted Memory Capabilities EAX=80000021h: Extended Feature Identification 2 EAX=8FFFFFFFh: AMD Easter Egg Several AMD CPU models will, for CPUID with EAX=8FFFFFFFh, return an Easter Egg string in EAX, EBX, ECX and EDX. Known Easter Egg strings include: CPUID usage from high-level languages Inline assembly This information is easy to access from other languages as well. For instance, the C code for gcc below prints the first five values, returned by the cpuid: #include <stdio.h> #include <cpuid.h> int main() { unsigned int i, eax, ebx, ecx, edx; for (i = 0; i < 5; i++) { __cpuid(i, eax, ebx, ecx, edx); printf ("InfoType %x\nEAX: %x\nEBX: %x\nECX: %x\nEDX: %x\n", i, eax, ebx, ecx, edx); } return 0; } In MSVC and Borland/Embarcadero C compilers (bcc32) flavored inline assembly, the clobbering information is implicit in the instructions: #include <stdio.h> int main() { unsigned int a, b, c, d, i = 0; __asm { /* Do the call. */ mov EAX, i; cpuid; /* Save results.