[PATCH] Re: CPU name for "pure" i386 missing

Cesar Eduardo Barros (cesarb@nitnet.com.br)
Tue, 27 Feb 2001 11:08:48 -0300


I've made a patch to fix the problem. I've not even compiled it yet (I might do
it later).

--- linux-2.4.2.orig/arch/i386/kernel/setup.c Tue Feb 27 10:17:18 2001
+++ linux-2.4.2/arch/i386/kernel/setup.c Tue Feb 27 11:04:54 2001
@@ -1996,6 +1996,15 @@
case X86_VENDOR_UNKNOWN:
default:
/* Not much we can do here... */
+ /* Check if at least it has cpuid */
+ if (c->cpuid_level == -1)
+ {
+ /* No cpuid. It must be an ancient CPU */
+ if (c->x86 == 4)
+ strcpy(c->x86_model_id, "486");
+ else if (c->x86 == 3)
+ strcpy(c->x86_model_id, "386");
+ }
break;

case X86_VENDOR_CYRIX:

-- 
Cesar Eduardo Barros
cesarb@nitnet.com.br
cesarb@dcc.ufrj.br
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/