[URGENT] [PATCH] 2.1.109: small patch to bugs.h

Andrew Derrick Balsa (andrebalsa@altern.org)
Fri, 17 Jul 1998 12:10:48 +0200


--Boundary-=_oQHnWnkUEwHsqmGbbuqCLJJiVswM
Content-Type: text/plain
Content-Transfer-Encoding: 8bit

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

--Boundary-=_oQHnWnkUEwHsqmGbbuqCLJJiVswM
Content-Type: text/x-c;
name="2.1.109-cpuid.patch"
Content-Transfer-Encoding: 8bit
Content-Description: small patch to bugs.h in 2.1.109
Content-Disposition: attachment; filename="2.1.109-cpuid.patch"

--- 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;

--Boundary-=_oQHnWnkUEwHsqmGbbuqCLJJiVswM--

-
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