[PATCH] preliminary Cyrix III detection code

From: Mikael Pettersson (mikpe@csd.uu.se)
Date: Wed Apr 26 2000 - 18:50:57 EST


This patch, against 2.3.99-pre6-7, adds VIA Cyrix III detection
code to arch/i386/kernel/setup.c. Code written from published
specs, but untested as I don't have a Cyrix III myself.

Anyone with a Cyrix III care to test it?

/Mikael

--- linux-2.3.99-pre6p7/arch/i386/kernel/setup.c.~1~ Wed Apr 26 21:45:33 2000
+++ linux-2.3.99-pre6p7/arch/i386/kernel/setup.c Thu Apr 27 01:11:44 2000
@@ -1070,6 +1070,40 @@
                 c->x86_capability |= X86_FEATURE_MTRR;
                 break;
 
+ case 8: /* Cyrix III */
+ /* Integrated 256KB L2 cache. */
+ c->x86_cache_size = 256;
+ /* Use extended CPUID levels to get extended feature
+ flags and CPU marketing name. */
+ get_model_name(c);
+ /* Emulate MTRRs using Cyrix' ARRs. */
+ c->x86_capability |= X86_FEATURE_MTRR;
+ /*
+ * Construct the multiplier string:
+ *
+ * dir0_lsn multiplier
+ * 0100 2.5
+ * 0001 3.0
+ * 0101 3.5
+ * 0010 4.0
+ * 0110 4.5
+ * 0011 5.0
+ * 0111 5.5
+ * 1000 6.0
+ * 1010 6.5
+ * 1001 7.0
+ * 1011 7.5
+ */
+ if (dir0_lsn & 8) {
+ p = Cx86_cb + ((dir0_lsn & 2) ? 0 : 2);
+ p[0] = '6' + (dir0_lsn & 1);
+ } else {
+ p = Cx86_cb + ((dir0_lsn & 4) ? 0 : 2);
+ p[0] = '2' + (dir0_lsn & 3);
+ }
+ strcat(buf, p);
+ return;
+
         case 0xf: /* Cyrix 486 without DEVID registers */
                 switch (dir0_lsn) {
                 case 0xd: /* either a 486SLC or DLC w/o DEVID */
@@ -1471,6 +1505,8 @@
 
                     case X86_VENDOR_CYRIX:
                         x86_cap_flags[24] = "cxmmx";
+ if (Cx86_dir0_msb >= 8) /* Cyrix III and above */
+ x86_cap_flags[31] = "3dnow";
                         break;
 
                     case X86_VENDOR_AMD:

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



This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:12 EST