lkml.org 
[lkml]   [1999]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectPATCH: Winchip support (2.2.10-ac12)
Date
This is diffed against 2.2.10-ac12
It increases the support for IDT Winchips.
o Enables use of CMPXCHG8B instruction
o Reports 3DNow! in /proc/cpuinfo for Winchip 2
o Replaced a large if/else with a switch.

(A patch against 2.3.12 will follow soon)

regards,

d.


diff -urN linux.ac/CREDITS linux.dj/CREDITS
--- linux.ac/CREDITS Mon Jul 19 22:32:31 1999
+++ linux.dj/CREDITS Tue Jul 20 03:20:09 1999
@@ -978,6 +978,13 @@
S: Chapel Hill, North Carolina 27514-4818
S: USA

+N: Dave Jones
+E: dave@powertweak.com
+W: http://linux.powertweak.com
+D: Centaur/IDT Winchip/Winchip 2 tweaks
+D: Misc clean ups.
+S: (email for current address)
+
N: Bernhard Kaindl
E: bkaindl@netway.at
E: edv@bartelt.via.at
diff -urN linux.ac/arch/i386/kernel/setup.c
linux.dj/arch/i386/kernel/setup.c
--- linux.ac/arch/i386/kernel/setup.c Mon Jul 19 22:27:32 1999
+++ linux.dj/arch/i386/kernel/setup.c Tue Jul 20 03:23:25 1999
@@ -14,6 +14,9 @@
* Bart Hartgers <bart@etpmod.phys.tue.nl>, May 199.
*
* Intel Mobile Pentium II detection fix. Sean Gilley, June 1999.
+ *
+ * IDT Winchip tweaks, misc clean ups.
+ * Dave Jones <dave@powertweak.com>, July 1999
*/

/*
@@ -810,7 +813,6 @@
}
}
}
-
}

if (p) {
@@ -860,22 +862,26 @@
printk("%s", c->x86_model_id);

if (c->x86_mask || c->cpuid_level>=0)
- printk(" stepping %02x", c->x86_mask);
+ printk(" stepping %02x\n", c->x86_mask);

- if(c->x86_vendor == X86_VENDOR_CENTAUR)
- {
+ if(c->x86_vendor == X86_VENDOR_CENTAUR) {
u32 hv,lv;
rdmsr(0x107, lv, hv);
- printk("\nCentaur FSR was 0x%X ",lv);
- lv|=(1<<8);
- lv|=(1<<7);
+ printk("Centaur FSR was 0x%X ",lv);
+ lv|=(1<<1 | 1<<2 | 1<<7);
/* lv|=(1<<6); - may help too if the board can cope */
- printk("now 0x%X", lv);
+ printk("now 0x%X\n", lv);
wrmsr(0x107, lv, hv);
+
/* Emulate MTRRs using Centaur's MCR. */
- c->x86_capability |= X86_FEATURE_MTRR;
+ c->x86_capability |= X86_FEATURE_MTRR;
+
+ /* Set 3DNow! on Winchip 2 and above. */
+ if (c->x86_model >=8)
+ c->x86_capability |= X86_FEATURE_AMD3D;
+
+ c->x86_capability |= X86_FEATURE_CX8;
}
- printk("\n");
}

/*
@@ -910,7 +916,7 @@
c->x86 + '0',
c->x86_model,
c->x86_model_id[0] ? c->x86_model_id :
"unknown");
-
+
if (c->x86_mask || c->cpuid_level >= 0)
p += sprintf(p, "stepping\t: %d\n", c->x86_mask);
else
@@ -926,14 +932,19 @@
p += sprintf(p, "cache size\t: %d KB\n",
c->x86_cache_size);

/* Modify the capabilities according to chip type */
- if (c->x86_vendor == X86_VENDOR_CYRIX) {
+ switch (c->x86_vendor) {
+ case X86_VENDOR_CYRIX:
x86_cap_flags[24] = "cxmmx";
- } else if (c->x86_vendor == X86_VENDOR_AMD) {
- x86_cap_flags[16] = "fcmov";
- x86_cap_flags[31] = "3dnow";
+ break;
+
+ case X86_VENDOR_AMD:
if (c->x86 == 5 && c->x86_model == 6)
x86_cap_flags[10] = "sep";
- } else if (c->x86_vendor == X86_VENDOR_INTEL) {
+ x86_cap_flags[16] = "fcmov";
+ x86_cap_flags[31] = "3dnow";
+ break;
+
+ case X86_VENDOR_INTEL:
x86_cap_flags[6] = "pae";
x86_cap_flags[9] = "apic";
x86_cap_flags[14] = "mca";
@@ -941,6 +952,16 @@
x86_cap_flags[17] = "pse36";
x86_cap_flags[18] = "psn";
x86_cap_flags[24] = "osfxsr";
+ break;
+
+ case X86_VENDOR_CENTAUR:
+ if (c->x86_model >=8) /* Only Winchip2 and above
*/
+ x86_cap_flags[31] = "3dnow";
+ break;
+
+ default:
+ /* Unknown CPU manufacturer. Transmeta ? :-) */
+ break;
}

sep_bug = c->x86_vendor == X86_VENDOR_INTEL &&
-
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.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.268 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site