mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] NSC Geode IA32 CPU ID
@ 2002-02-05  2:19 Hiroshi MIURA
  0 siblings, 0 replies; only message in thread
From: Hiroshi MIURA @ 2002-02-05  2:19 UTC (permalink / raw)
  To: lkml

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-02-05  2:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-05  2:19 [PATCH] NSC Geode IA32 CPU ID Hiroshi MIURA

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®