]> git.ozlabs.org Git - ccan/blobdiff - ccan/cpuid/test/run.c
cpuid: better parser for processor info
[ccan] / ccan / cpuid / test / run.c
index 843389fa2a7733178b4399bfb6d6fe3e2c07dd5d..83b90f37ebd346c6c08a3bf9f33efa7fef3771d7 100644 (file)
@@ -18,6 +18,11 @@ int main(void)
        cpuid(CPU_PROC_BRAND_STRING, (uint32_t *)buf);
        printf ("Processor Brand: %s\n", buf);
 
+       uint32_t procinfo[8];
+       cpuid(CPU_PROCINFO_AND_FEATUREBITS, procinfo);
+       printf("Stepping: %d Model: 0x%X Family: %d extended model: %d extended family: %d\n",
+               procinfo[0], procinfo[1], procinfo[2], procinfo[3], procinfo[4]);
+
        printf ("Highest extended function supported: %#010x\n", cpuid_highest_ext_func_supported());
 
        uint32_t phys_virt[2];