From nick@specialix.com  Tue Nov  4 12:56:51 1997
Received: from relay1.UU.NET (relay1.UU.NET [192.48.96.5])
          by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id MAA07021
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 4 Nov 1997 12:56:39 -0800 (PST)
          (envelope-from nick@specialix.com)
Received: from slxinc.specialix.com by relay1.UU.NET with SMTP 
	(peer crosschecked as: slxinc.specialix.com [192.65.145.1])
	id QQdogh22020; Tue, 4 Nov 1997 15:52:56 -0500 (EST)
Received: from zephyr.specialix.com by specialix.com id aa12727;
          4 Nov 97 12:50 PST
Received: by zephyr.specialix.com 
        (8.8.5//ident-1.0) id MAA09690; Tue, 4 Nov 1997 12:52:40 -0800 (PST) 
Message-Id: <199711042052.MAA09690@zephyr.specialix.com>
Date: Tue, 4 Nov 1997 12:52:40 -0800 (PST)
From: nsayer@quack.kfu.com
Reply-To: nsayer@quack.kfu.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: Cyrix CPU detection
X-Send-Pr-Version: 3.2

>Number:         4936
>Category:       kern
>Synopsis:       Cyrix CPU detection
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          support
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov  4 13:00:02 PST 1997
>Closed-Date:    Fri Nov 7 06:08:53 PST 1997
>Last-Modified:  Fri Nov  7 06:12:43 PST 1997
>Originator:     Nick Sayer
>Release:        FreeBSD 2.2.2-RELEASE i386
>Organization:
Just me
>Environment:

Cyrix CPUs

>Description:

Direct from the Cyrix CPU detection web page, here is how you identify
recent Cyrix CPUs.

There is a method to my madness. The MediaGX chip has imbedded video
support. This support will likely require a new XFree86 server.
it would make life quite easy if the server could detect the presence
of MediaGX simply by doing a sysctl on hw.model.

>How-To-Repeat:

>Fix:

This code is untested.

--- identcpu.c.orig	Sun Feb  2 10:47:05 1997
+++ identcpu.c	Tue Nov  4 12:41:05 1997
@@ -135,6 +135,28 @@
 				break;
 			}
 		}
+	} else if (strcmp(cpu_vendor,"CyrixInstead") == 0) {
+		/*
+		 * Values taken from Cyrix CPU Detection guide
+		 * http://www.cyrix.com/process/support/detection.htm
+		 */
+		cpu_model[0] = '\0';
+		strcpy(cpu_model, "Cyrix ");
+		switch (cpu_id & 0xff0) {
+		case 0x520:
+			strcat(cpu_model, "6x86"); break;
+			break;
+		case 0x440:
+			strcat(cpu_model, "MediaGX"); break;
+			break;
+		case 0x600:
+			strcat(cpu_model, "6x86MX"); break;
+			break;
+		case 0x540:
+			strcat(cpu_model, "GXm"); break;
+			break;
+		}
+			
 	} else if (strcmp(cpu_vendor,"AuthenticAMD") == 0) {
 		/*
 		 * Values taken from AMD Processor Recognition
@@ -207,6 +229,7 @@
 		printf("  Id = 0x%lx",cpu_id);
 
 	if (strcmp(cpu_vendor, "GenuineIntel") == 0 ||
+	    strcmp(cpu_vendor, "CyrixInstead") == 0 ||
 	    strcmp(cpu_vendor, "AuthenticAMD") == 0) {
 		printf("  Stepping=%ld", cpu_id & 0xf);
 		if (cpu_high > 0) {
>Release-Note:
>Audit-Trail:

From: KATO Takenori <kato@migmatite.eps.nagoya-u.ac.jp>
To: nsayer@quack.kfu.com
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/4936: Cyrix CPU detection
Date: Wed, 05 Nov 1997 10:12:25 +0900

 > >Release:        FreeBSD 2.2.2-RELEASE i386
 
 CPU detection code is improved in 2.2.5 / 3.0-current.  Many non-Intel 
 CPUs are identified as they are.
 
 
 > +		case 0x540:
 > +			strcat(cpu_model, "GXm"); break;
 > +			break;
 
 I'm interested in this item.  Is GXm CPU compatible with Pentium
 instruction set?  Are its CCRs compatible with 6x86's?
 
 
 ----
 KATO Takenori <kato@ganko.eps.nagoya-u.ac.jp>
 Dept. Earth Planet. Sci., Nagoya Univ.,  Nagoya, 464-01, Japan
 PGP public key: finger kato@eclogite.eps.nagoya-u.ac.jp
 ------------------- Powered by FreeBSD(98) -------------------
State-Changed-From-To: open->closed 
State-Changed-By: kato 
State-Changed-When: Fri Nov 7 06:08:53 PST 1997 
State-Changed-Why:  
CPU identification routine has been improved to identify MediaGX CPUs. 
Thanks for suggestion! 
>Unformatted:
