8 if (!cpuid_is_supported()) {
9 printf ("CPUID instruction is not supported by this CPU\n");
14 if (cpuid_sprintf_cputype(cpuid_get_cpu_type(), cputype))
15 printf ("Vendor ID: %s\n", cputype);
18 cpuid(CPU_PROC_BRAND_STRING, (uint32_t *)buf);
19 printf ("Processor Brand: %s\n", buf);
21 printf ("Highest extended function supported: %#010x\n", cpuid_highest_ext_func_supported());
23 uint32_t phys_virt[2];
24 cpuid(CPU_VIRT_PHYS_ADDR_SIZES, phys_virt);
25 printf ("Physical address size: %d\nVirtual address size: %d\n", phys_virt[0], phys_virt[1]);
27 uint32_t extfeatures[2];
28 cpuid(CPU_EXTENDED_PROC_INFO_FEATURE_BITS, extfeatures);
29 printf ("Extended processor info and feature bits: %d %d\n", extfeatures[0], extfeatures[1]);
32 cpuid(CPU_EXTENDED_L2_CACHE_FEATURES, l2c);
33 printf("L2 Line size: %u bytes\tAssociativity: %02xh\tCache Size: %u KB\n",
34 l2c[0], l2c[1], l2c[2]);
37 cpuid(0x0ffffffUL, &invalid);
38 printf ("Testing invalid: %#010x\n", invalid);