lkml.org 
[lkml]   [1998]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[URGENT] [PATCH] 2.1.109: small patch to bugs.h
Date
Hi,

Sorry about the [URGENT], just want to get this small fix done.

Intel and AMD 486 class processors get (mis)identified as Cyrix chips.

The attached patch should fix that problem. I also fixes a small spelling
mistake and two typos in comments.

Please Pete, could you test this out on your Intel 486 DX2-66?

Thanks in advance,
---------------------
Andrew D. Balsa
andrebalsa@altern.org
--- linux/include/asm-i386/bugs.h.orig Mon Jul 13 23:26:38 1998
+++ linux/include/asm-i386/bugs.h Fri Jul 17 12:22:57 1998
@@ -232,7 +232,7 @@
}

/*
- * perform the Cyrix 5/2 test (!0 means it's a Cyrix)
+ * Perform the Cyrix 5/2 test (returns 0x200 if it's a Cyrix).
*/

static inline int test_cyrix_52div(void)
@@ -245,7 +245,7 @@
"movb $2,%%bl\n\t"
"div %%bl\n\t"
"lahf\n\t"
- "andl $0x200,%%eax": "=a" (test) : : "bx", "cc");
+ "andl $0xff00,%%eax": "=a" (test) : : "bx", "cc");

return test;
}
@@ -258,10 +258,10 @@

__initfunc(static void check_cyrix_cpu(void))
{
- if (boot_cpu_data.cpuid_level == -1 && boot_cpu_data.x86 == 4
- && test_cyrix_52div()) {
+ if ((boot_cpu_data.cpuid_level == -1) && (boot_cpu_data.x86 == 4)
+ && (test_cyrix_52div() == 0x200)) {

- /* default to an unknown Cx486, (we will diferentiate later) */
+ /* default to an unknown Cx486, (we will differentiate later) */
/* NOTE: using 0xff since 0x00 is a valid DIR0 value */
strcpy(boot_cpu_data.x86_vendor_id, "CyrixInstead");
boot_cpu_data.x86_model = 0xff;
@@ -270,7 +270,7 @@
}

/*
- * Fix two problems with the Cyrix 686 and 686L:
+ * Fix two problems with the Cyrix 6x86 and 6x86L:
* -- the cpuid is disabled on power up, enable it, use it.
* -- the SLOP bit needs resetting on some motherboards due to broken BIOS,
* so that the udelay loop calibration works well. Recalibrate.
@@ -281,7 +281,7 @@
__initfunc(static void check_cx686_cpuid_slop(void))
{
if (boot_cpu_data.x86_vendor == X86_VENDOR_CYRIX &&
- (boot_cpu_data.x86_model & 0xf0) == 0x30) { /* 686(L) */
+ (boot_cpu_data.x86_model & 0xf0) == 0x30) { /* 6x86(L) */
int dummy;
unsigned char ccr3, ccr5;
\
 
 \ /
  Last update: 2005-03-22 13:43    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site