Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 4 Feb 2002 21:34:04 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 4 Feb 2002 21:33:54 -0500 Received: from ylug.mozilla.gr.jp ([203.141.142.92]:21265 "HELO maison.kyo-ko.org") by vger.kernel.org with SMTP id ; Mon, 4 Feb 2002 21:33:45 -0500 X-Mailer: cmail 2.61.1+20011011 on GNU Emacs 20.7.2 / Mule 4.1 =?ISO-2022-JP?B?KBskQjAqGyhCKQ==?= From: Hiroshi MIURA To: lkml Subject: [PATCH] NSC Geode IA32 CPU ID User-Agent: SEMI/1.14.3 (=?ISO-2022-JP?B?GyRCNW0lTkMrGyhC?=) FLIM/1.14.3 (=?ISO-2022-JP?B?GyRCQCZLNThmTk1BMBsoQg==?=) APEL/10.3 Emacs/20.7 (i386-debian-linux-gnu) MULE/4.1 (=?ISO-2022-JP?B?GyRCMCobKEI=?=) MIME-Version: 1.0 (generated by SEMI 1.14.3 - =?ISO-2022-JP?B?IhskQjVtGyhC?= =?ISO-2022-JP?B?GyRCJU5DKxsoQiI=?=) Content-Type: text/plain; charset=US-ASCII Message-Id: <20020205021911.696F0118231@triton2> Date: Tue, 5 Feb 2002 11:19:11 +0900 (JST) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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 */ 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/