Re: AMD cpu recognition! (diff patch included)

Alan Cox (linker@nightshade.ml.org)
Mon, 13 Jul 1998 09:37:58 -0400 (EDT)


At first I thought you had a tri-cpu SMP K6!

On Sat, 11 Jul 1998, Rob Dale wrote:

> Recognizes AMD K5 through AMD K6-2.
>
> Made with diff -uN arch/i386/kernel/setup.c ~/setup.c > k6diff
> patch -u arch/i386/kernel/setup.c k6diff
>
> /proc/cpuinfo from my 3 k6 machines...
>
> K6-2 300:
> processor : 0
> cpu : 586
> model : K6-2 (model 8)
> vendor_id : AuthenticAMD
> stepping : 0
> fdiv_bug : no
> hlt_bug : no
> f00f_bug : no
> fpu : yes
> fpu_exception : yes
> cpuid : yes
> wp : yes
> flags : fpu vme de pse tsc msr mce cx8 mmx
> bogomips : 599.65
>
> K6 200:
> processor : 0
> cpu : 586
> model : K6 (model 6)
> vendor_id : AuthenticAMD
> stepping : 1
> fdiv_bug : no
> hlt_bug : no
> f00f_bug : no
> fpu : yes
> fpu_exception : yes
> cpuid : yes
> wp : yes
> flags : fpu vme de pse tsc msr mce cx8 mmx
> bogomips : 599.65
>
> K6 233:
> processor : 0
> cpu : 586
> model : K6 (model 6)
> vendor_id : AuthenticAMD
> stepping : 2
> fdiv_bug : no
> hlt_bug : no
> f00f_bug : no
> fpu : yes
> fpu_exception : yes
> cpuid : yes
> wp : yes
> flags : fpu vme de pse tsc msr mce cx8 mmx
> bogomips : 599.65
>
> Next, to check for 3DNOW! instructions!
> Then, implement them! woohoo!
>
> The patch is attached, but here it is anyway...
>
> --- linux/arch/i386/kernel/setup.c Mon Jul 13 01:20:34 1998
> +++ setup.c Mon Jul 13 01:13:36 1998
> @@ -231,20 +231,6 @@
> return NULL;
> }
>
> -static const char * AMDmodel(unsigned int nr)
> -{
> -
> - static const char *model[] = {
> - "K5 (model 0)", "K5 (model 1)", "K5 (model 2)", "K5
> (model 3)",
> - "unknown (model 4)", "unknown (model 5)",
> - "K6 (model 6)", "K6 (model 7)", "K6-2 (model 8)", "K6-2
> (model 9)"
> - };
> - if (nr < sizeof(model)/sizeof(char *))
> - return model[nr];
> - return NULL;
> -
> -}
> -
> static const char * Cx86model(void)
> {
> unsigned char nr6x86 = 0;
> @@ -305,8 +291,6 @@
> static char nbuf[12];
> if (strncmp(x86_vendor_id, "Cyrix", 5) == 0)
> p = Cx86model();
> - else if (strncmp(x86_vendor_id, "AuthenticAMD", 12) == 0)
> - p = AMDmodel(model);
> else {
> switch (x86) {
> case 4:
> @@ -376,10 +360,9 @@
> "stepping\t:
> %s\n",
>
> Cx86_type[Cx86_step]);
> }
> - else
> + else
> len += sprintf(buffer+len,
> "stepping\t:
> unknown\n");
> -
>
> len += sprintf(buffer+len,
> "fdiv_bug\t: %s\n"
>
> __
> Robert Dale
>
> "arrest this man he talks in maths"
> RADIOHEAD OK COMPUTER

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html