[PATCH] NSC Geode IA32 CPU ID

From: Hiroshi MIURA (miura@da-cha.org)
Date: Mon Feb 04 2002 - 21:19:11 EST


Hello,

I think current kernel dont recognize NSC Geode CPU ID.
Geode was called MediaGX/GXm before, but National semicomductor Corp.
changes ID from "CyrixInstead" to "Geode by NSC".

I made a patch to fix this.

diff -ur kernel-source-2.4.7/arch/i386/kernel/setup.c linux/arch/i386/kernel/setup.c
--- kernel-source-2.4.7/arch/i386/kernel/setup.c Thu Jul 12 01:31:44 2001
+++ linux/arch/i386/kernel/setup.c Fri Aug 10 21:12:06 2001
@@ -1238,7 +1238,7 @@
 }
 
 /*
- * Read Cyrix DEVID registers (DIR) to get more detailed info. about the CPU
+ * Read NSC/Cyrix DEVID registers (DIR) to get more detailed info. about the CPU
  */
 static void do_cyrix_devid(unsigned char *dir0, unsigned char *dir1)
 {
@@ -1878,6 +1882,8 @@
                 c->x86_vendor = X86_VENDOR_AMD;
         else if (!strcmp(v, "CyrixInstead"))
                 c->x86_vendor = X86_VENDOR_CYRIX;
+ else if (!strcmp(v, "Geode by NSC"))
+ c->x86_vendor = X86_VENDOR_NSC;
         else if (!strcmp(v, "UMC UMC UMC "))
                 c->x86_vendor = X86_VENDOR_UMC;
         else if (!strcmp(v, "CentaurHauls"))
@@ -2222,6 +2228,10 @@
                 init_cyrix(c);
                 break;
 
+ case X86_VENDOR_NSC:
+ init_cyrix(c);
+ break;
+
         case X86_VENDOR_AMD:
                 init_amd(c);
                 break;
@@ -2319,14 +2329,15 @@
 {
         get_cpu_vendor(&boot_cpu_data);
 
- if ( boot_cpu_data.x86_vendor == X86_VENDOR_CYRIX )
+ if (( boot_cpu_data.x86_vendor == X86_VENDOR_CYRIX ) ||
+ ( boot_cpu_data.x86_vendor == X86_VENDOR_NSC ))
                 init_cyrix(&boot_cpu_data);
 }
 
 
 /* These need to match <asm/processor.h> */
 static char *cpu_vendor_names[] __initdata = {
- "Intel", "Cyrix", "AMD", "UMC", "NexGen", "Centaur", "Rise", "Transmeta" };
+ "Intel", "Cyrix", "AMD", "UMC", "NexGen", "Centaur", "Rise", "Transmeta", "NSC" };
 
 
 void __init print_cpu_info(struct cpuinfo_x86 *c)
diff -ur kernel-source-2.4.7/include/asm-i386/processor.h linux/include/asm-i386/processor.h
--- kernel-source-2.4.7/include/asm-i386/processor.h Sat Jul 21 04:52:18 2001
+++ linux/include/asm-i386/processor.h Fri Aug 10 10:52:53 2001
@@ -62,6 +62,7 @@
 #define X86_VENDOR_CENTAUR 5
 #define X86_VENDOR_RISE 6
 #define X86_VENDOR_TRANSMETA 7
+#define X86_VENDOR_NSC 8
 #define X86_VENDOR_UNKNOWN 0xff
 
 /*
@@ -217,7 +218,7 @@
 }
 
 /*
- * Cyrix CPU configuration register indexes
+ * NSC/Cyrix CPU configuration register indexes
  */
 #define CX86_CCR0 0xc0
 #define CX86_CCR1 0xc1
@@ -233,7 +234,7 @@
 #define CX86_RCR_BASE 0xdc
 
 /*
- * Cyrix CPU indexed register access macros
+ * NSC/Cyrix CPU indexed register access macros
  */
 
 #define getCx86(reg) ({ outb((reg), 0x22); inb(0x23); })

-- 
Hiroshi Miura  --- miura@da-cha.org http://www.da-cha.org/ 
CCNA, Oracle Silver Master, Network Specialist(JITEC)
My interest: http://www.cis.com.tw/Product/WS-U50R.htm

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



This archive was generated by hypermail 2b29 : Thu Feb 07 2002 - 21:00:40 EST