1 /* ----------------------------------------------------------------------- *
3 * Copyright 2006 Erwan Velu - All Rights Reserved
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 * Boston MA 02111-1307, USA; either version 2 of the License, or
9 * (at your option) any later version; incorporated herein by reference.
11 * ----------------------------------------------------------------------- */
16 * A CPUID demo program using libcom32
29 openconsole(&dev_stdcon_r
, &dev_stdcon_w
);
33 printf("Vendor = %s\n",cpu
.vendor
);
34 printf("Model = %s\n",cpu
.model
);
35 printf("Vendor ID = %d\n",cpu
.vendor_id
);
36 printf("Family = %d\n",cpu
.family
);
37 printf("Model ID = %d\n",cpu
.model_id
);
38 printf("Stepping = %d\n",cpu
.stepping
);
40 if (cpu
.flags
.fpu
) printf("fpu ");
41 if (cpu
.flags
.vme
) printf("vme ");
42 if (cpu
.flags
.de
) printf("de ");
43 if (cpu
.flags
.pse
) printf("pse ");
44 if (cpu
.flags
.tsc
) printf("tsc ");
45 if (cpu
.flags
.msr
) printf("msr ");
46 if (cpu
.flags
.pae
) printf("pae ");
47 if (cpu
.flags
.mce
) printf("mce ");
48 if (cpu
.flags
.cx8
) printf("cx8 ");
49 if (cpu
.flags
.apic
) printf("apic ");
50 if (cpu
.flags
.sep
) printf("sep ");
51 if (cpu
.flags
.mtrr
) printf("mtrr ");
52 if (cpu
.flags
.pge
) printf("pge ");
53 if (cpu
.flags
.mca
) printf("mca ");
54 if (cpu
.flags
.cmov
) printf("cmov ");
55 if (cpu
.flags
.pat
) printf("pat ");
56 if (cpu
.flags
.pse_36
) printf("pse_36 ");
57 if (cpu
.flags
.psn
) printf("psn ");
58 if (cpu
.flags
.clflsh
) printf("clflsh ");
59 if (cpu
.flags
.dts
) printf("dts ");
60 if (cpu
.flags
.acpi
) printf("acpi ");
61 if (cpu
.flags
.mmx
) printf("mmx ");
62 if (cpu
.flags
.sse
) printf("sse ");
63 if (cpu
.flags
.sse2
) printf("sse2 ");
64 if (cpu
.flags
.ss
) printf("ss ");
65 if (cpu
.flags
.htt
) printf("ht ");
66 if (cpu
.flags
.acc
) printf("acc ");
67 if (cpu
.flags
.syscall
) printf("syscall ");
68 if (cpu
.flags
.mp
) printf("mp ");
69 if (cpu
.flags
.nx
) printf("nx ");
70 if (cpu
.flags
.mmxext
) printf("mmxext ");
71 if (cpu
.flags
.lm
) printf("lm ");
72 if (cpu
.flags
.nowext
) printf("3dnowext ");
73 if (cpu
.flags
.now
) printf("3dnow! ");
76 if (cpu
.flags
.smp
) printf("yes\n");