Messages in this thread Patch in this message | | | Date | Thu, 21 Jan 1999 03:57:03 +0100 | From | Matthias Andree <> | Subject | [PATCH] 2.2.0-pre8 AMD K6-2/stepping misdetection |
| |
Hi, folks!
There's still a bug concerning stepping output in proc/cpuinfo, which can be corrected by applying the attached patch. (It works for me with an K6-2 stepping 0.)
(Heck, I should beat up my vendor for selling me a stepping 0 CPU ;)
So let's reconsider this:
-------------------------------------------------------------------------- emma1:/usr/src/linux-2.2.0-pre8/arch/i386/kernel # cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 5 model : 8 model name : AMD-K6(tm) 3D processor stepping : unknown cpu MHz : 300.689918 [...] cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr mce cx8 sep mmx 3dnow bogomips : 599.65 -------------------------------------------------------------------------- from /var/log/boot.msg: (reformatted manually)
Linux version 2.2.0-pre8 (root@emma1) (gcc version pgcc-2.91.60 19981201 (egcs-1.1.1 release)) #3 Wed Jan 20 01:28:28 CET 1999 Detected 300689918 Hz processor. Calibrating delay loop... 599.65 BogoMIPS Memory: 62224k/65472k available (1536k kernel code, 408k reserved, 1224k data, 80k init) CPU: AMD AMD-K6(tm) 3D processor stepping 00 --------------------------------------------------------------------------
If I understand arch/i386/kernel/setup.c right, the CPU identification is read entirely via CPUID.
The AMD-K6 Processor BIOS Design Application Note, 21329 Rev H1 (*) however recommends displaying AMD-K6(tm)-2/XXX (XXX = clock/1 MHz) for Model 8 (any stepping) during BIOS boot-up.
So shouldn't we better stick with model/stepping based identification, which would allow for displaying the correct (ahem) K6(tm)-2 string?
This would also prevent displaying the string "AMD" twice during boot-up. However, this will require some redesign in setup.c which is not-trivial and which I cannot currently do due to lack of spare time, since MediaGX stuff relies on amd_model as well. I might look at it later if nobody has done so until then. While we're at it, we could also read from cpuid(0x80000005, ...) to obtain L1 cache and other information.
(*) you can find links to the AMD FTP to it on http://www.amd.com/K6/k6docs.htm or was it .html? The documents are in PDF format.
-- Matthias Andree --- arch/i386/kernel/setup.c.orig Wed Jan 20 00:52:16 1999 +++ arch/i386/kernel/setup.c Thu Jan 21 03:16:43 1999 @@ -669,7 +669,7 @@ c->x86_model, c->x86_model_id[0] ? c->x86_model_id : "unknown"); - if (c->x86_mask) + if (c->x86_mask || c->cpuid_level>=0) p += sprintf(p, "stepping\t: %d\n", c->x86_mask); else p += sprintf(p, "stepping\t: unknown\n"); | |