diff options
author | ftrvxmtrx <ftrvxmtrx@gmail.com> | 2013-03-16 18:07:48 +0100 |
---|---|---|
committer | ftrvxmtrx <ftrvxmtrx@gmail.com> | 2013-03-16 18:07:48 +0100 |
commit | f4174739bbbdc9075ed7ec06fa9f47e7e6deafd3 (patch) | |
tree | 0b49e4aabbaa573065c1b54d2507f5a5b6e2c8ad /sys/src/cmd/aux/cpuid.c | |
parent | f37465fd7f768a72628506956473ae69112cf774 (diff) |
aux/cpuid: fix wrong extfunc1 bits
Diffstat (limited to 'sys/src/cmd/aux/cpuid.c')
-rw-r--r-- | sys/src/cmd/aux/cpuid.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/src/cmd/aux/cpuid.c b/sys/src/cmd/aux/cpuid.c index e0caaeeb0..a14ef988e 100644 --- a/sys/src/cmd/aux/cpuid.c +++ b/sys/src/cmd/aux/cpuid.c @@ -31,7 +31,7 @@ func0(ulong) { Res r; char buf[13]; - + r = cpuid(0, 0); ((ulong *) buf)[0] = r.bx; ((ulong *) buf)[1] = r.dx; @@ -44,7 +44,7 @@ void printbits(char *id, ulong x, char **s) { int i, j; - + for(i = 0, j = 0; i < 32; i++) if((x & (1<<i)) != 0 && s[i] != nil){ if(j++ % 16 == 0){ @@ -73,7 +73,7 @@ func1(ulong) "movbe", "popcnt", "tscdeadline", "aes", "xsave", "osxsave", "avx", "f16c", "rdrnd", "hypervisor" }; - + r = cpuid(1, 0); Bprint(out, "procmodel %.8ulx / %.8ulx\n", r.ax, r.bx); printbits("features", r.dx, bitsdx); @@ -85,16 +85,16 @@ extfunc1(ulong ax) { Res r; static char *bitsdx[32] = { - "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce", "cx8", "apic", "sep", "mtrr", "pge", - "mca", "cmov", "pat", "fcmov", "pse36", nil, "mp", "nx", nil, "mmx+", "mmx", nil, - "ffxsr", "pg1g", "tscp", nil, "lm", "3dnow!+", "3dnow" + "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce", "cx8", "apic", + nil, "syscall", "mtrr", "pge", "mca", "cmov", "pat", "pse36", nil, "mp", + "nx", nil, "mmx+", "mmx", "fxsr", "ffxsr", "pg1g", "tscp", nil, "lm", "3dnow!+", "3dnow!" }; static char *bitscx[32] = { "ahf64", "cmp", "svm", "eas", "cr8d", "lzcnt", "sse4a", "msse", "3dnow!p", "osvw", "ibs", "xop", "skinit", "wdt", nil, "lwp", "fma4", "tce", nil, "nodeid", nil, "tbm", "topx", "pcx_core", "pcx_nb", }; - + r = cpuid(ax, 0); Bprint(out, "extmodel %.8ulx / %.8ulx\n", r.ax, r.bx); printbits("extfeatures", r.dx, bitsdx); @@ -129,7 +129,7 @@ void extfunc8(ulong ax) { Res r; - + r = cpuid(ax, 0); Bprint(out, "physbits %uld\n", CUT(r.ax, 0, 7)); Bprint(out, "virtbits %uld\n", CUT(r.ax, 8, 15)); @@ -154,7 +154,7 @@ void stdfunc(ulong ax) { Res r; - + r = cpuid(ax, 0); Bprint(out, "%.8ulx %.8ulx %.8ulx %.8ulx %.8ulx\n", ax, r.ax, r.bx, r.cx, r.dx); } @@ -176,7 +176,7 @@ main(int argc, char **argv) int i, rflag, aflag; ulong w; static Biobuf buf; - + rflag = aflag = 0; ARGBEGIN { case 'r': rflag++; break; |