Subject: identifycpu() on a Cyrix 6x86
To: None <port-i386@NetBSD.ORG>
From: Kevin Cousins <kevinc@obelix.premium.com.au>
List: port-i386
Date: 02/02/1998 09:32:28
Bear with me: I am not the strongest chip etiology person, and I have
asked a similar question before (wrt NetBSD-1.2/i386):

The machine: 32MB RAM, Quantum Fireball 4.3GB IDE HDD, etc., etc..
All of this is secondary---the CPU is reported by the BIOS to be a
Cyrix 6x86 PR200+.

Here are some of the relevant boot messages:
+---
| Feb  2 08:34:51 obelix /netbsd: NetBSD 1.3 (OBELIX) #27: Fri Jan 16 18:37:08 EST 1998
| Feb  2 08:34:51 obelix /netbsd:     root@obelix:/usr/src/sys/arch/i386/compile/OBELIX
| Feb  2 08:34:51 obelix /netbsd: cpu0: Cyrix 6x86 (486-class)
+---

When I bought this machine, I asked for a Pentium-grade CPU.  

Digging about in the kernel source, I found in /sys/arch/i386/i386/machdep.c:
(-rw-rw-r--   1 root    wsrc   63308 Dec  8 23:24 machdep.c)
+---
| struct cpu_nocpuid_nameclass i386_nocpuid_cpus[] = {
| 	  { CPUVENDOR_INTEL, "Intel", "386SX",	CPUCLASS_386,
| 		  NULL},				/* CPU_386SX */
| 	  { CPUVENDOR_INTEL, "Intel", "386DX",	CPUCLASS_386,
| 		  NULL},				/* CPU_386   */
| 	  { CPUVENDOR_INTEL, "Intel", "486SX",	CPUCLASS_486,
| 		  NULL},				/* CPU_486SX */
| 	  { CPUVENDOR_INTEL, "Intel", "486DX",	CPUCLASS_486,
| 		  NULL},				/* CPU_486   */
| 	  { CPUVENDOR_CYRIX, "Cyrix", "486DLC",	CPUCLASS_486,
| 		  NULL},				/* CPU_486DLC */
| 	  { CPUVENDOR_CYRIX, "Cyrix", "6x86",		CPUCLASS_486,
| 		  cyrix6x86_cpu_setup},	/* CPU_6x86 */
| 	  { CPUVENDOR_NEXGEN,"NexGen","586",      CPUCLASS_386,
| 		  NULL},				/* CPU_NX586 */
| };
+---

and later in the same file:
+---
| 	  {
| 		  "CyrixInstead",
| 		  CPUVENDOR_CYRIX,
| 		  "Cyrix",
| 		  /* Family 4 */
| 		  { {
| 			  CPUCLASS_486,
| 			  {
| 				  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
| 				  "486"		/* Default */
| 			  },
| 			  NULL
| 		  },
| 		  /* Family 5 */
| 		  {
| 			  CPUCLASS_586,
| 			  {
| 				  0, 0, "6x86", 0, 0, 0, 0, 0, 0, 0, 0, 0,
| 				  0, 0, 0, 0,
| 				  "6x86"		/* Default */
| 			  },
| 			  cyrix6x86_cpu_setup
| 		  },
| 		  /* Family 6, not yet available from Cyrix */
| 		  {
| 			  CPUCLASS_686,
| 			  {
| 				  "M2", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
| 				  "M2"		/* Default */
| 			  },
| 			  NULL
| 		  } }
| 	  }
+---

So!  Which is it?  Is the 6x86 a 486-class or a 586-class CPU?

I guess that this is only really a cosmetic issue---the change of a
'4' to a '5' in a boot message, but as a consequence I am confused as
to whether or not to put "options I586_CPU" in my kernel config file.

--Kevin.