7 if (!cpuid_is_supported()) {
8 printf ("CPUID instruction is not supported by this CPU\n");
12 printf ("MMX: %s\n", cpuid_has_mmx() ? "Yes" : "No");
13 printf ("SSE: %s\n", cpuid_has_sse() ? "Yes" : "No");
14 printf ("SSE2: %s\n", cpuid_has_sse2() ? "Yes" : "No");
15 printf ("SSE3: %s\n", cpuid_has_sse3() ? "Yes" : "No");
16 printf ("x64: %s\n", cpuid_has_x64() ? "Yes" : "No");
19 cpuid(CPU_VENDORID, buf);
20 printf ("Vendor ID: %s\n", buf);
22 cpuid(CPU_PROC_BRAND_STRING, buf);
23 printf ("Processor Brand: %s\n", buf);
26 cpuid(CPU_HIGHEST_EXTENDED_FUNCTION_SUPPORTED, &addr);
27 printf ("Highest extended function supported: %#010x\n", addr);
30 cpuid(CPU_VIRT_PHYS_ADDR_SIZES, &virtphys_size);
31 printf ("Virtual and physical address sizes: %d\n", virtphys_size);
34 cpuid(CPU_EXTENDED_PROC_INFO_FEATURE_BITS, extfeatures);
35 printf ("Extended processor info and feature bits: %d %d\n", extfeatures[0], extfeatures[1]);
38 cpuid(CPU_EXTENDED_L2_CACHE_FEATURES, l2features);
39 printf ("L2 Cache Size: %u KB\tLine Size: %u bytes\tAssociativity: %02xh\n",
40 l2features[0], l2features[1], l2features[2]);
43 cpuid(0x0ffffffUL, &invalid);
44 printf ("Testing invalid: %#010x\n", invalid);