+#if MACH_KDB
+
+/*
+ * Display the cpuid
+ * *
+ * cp
+ */
+void
+db_cpuid(__unused db_expr_t addr,
+ __unused int have_addr,
+ __unused db_expr_t count,
+ __unused char *modif)
+{
+
+ uint32_t i, mid;
+ uint32_t cpid[4];
+
+ do_cpuid(0, cpid); /* Get the first cpuid which is the number of
+ * basic ids */
+ db_printf("%08X - %08X %08X %08X %08X\n",
+ 0, cpid[eax], cpid[ebx], cpid[ecx], cpid[edx]);
+
+ mid = cpid[eax]; /* Set the number */
+ for (i = 1; i <= mid; i++) { /* Dump 'em out */
+ do_cpuid(i, cpid); /* Get the next */
+ db_printf("%08X - %08X %08X %08X %08X\n",
+ i, cpid[eax], cpid[ebx], cpid[ecx], cpid[edx]);
+ }
+ db_printf("\n");
+
+ do_cpuid(0x80000000, cpid); /* Get the first extended cpuid which
+ * is the number of extended ids */
+ db_printf("%08X - %08X %08X %08X %08X\n",
+ 0x80000000, cpid[eax], cpid[ebx], cpid[ecx], cpid[edx]);
+
+ mid = cpid[eax]; /* Set the number */
+ for (i = 0x80000001; i <= mid; i++) { /* Dump 'em out */
+ do_cpuid(i, cpid); /* Get the next */
+ db_printf("%08X - %08X %08X %08X %08X\n",
+ i, cpid[eax], cpid[ebx], cpid[ecx], cpid[edx]);
+ }
+}
+
+#endif