Subject: port-i386/27300: identcpu for SiS55x System On Chip CPU series
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <ianzag@megasignal.com>
List: netbsd-bugs
Date: 10/19/2004 10:38:35
>Number:         27300
>Category:       port-i386
>Synopsis:       identcpu for SiS55x System On Chip CPU series
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-i386-maintainer
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 19 10:39:01 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Ian Zagorskih
>Release:        NetBSD-current
>Organization:
NGEDC
>Environment:
NetBSD IANZAG 2.99.10 NetBSD 2.99.10 (IANZAG-ACPI) #0: Mon Oct 18 17:31:49 NOVST 2004  ianzag@IANZAG:/usr/src/sys/arch/i386/compile/IANZAG-ACPI i386

>Description:
NetBSD is missing CPUID identification code for SiS SOC CPUs like SiS55x series.
Specs for SiS55x available from http://www.sis.com/products/soc/55x.htm
Patch to detect SiS55x CPU is attached. Now dmesg looks like:

---cut---
NetBSD 2.99.10 (MAKS-PXE) #8: Tue Oct 19 17:20:22 NOVST 2004
ianzag@IANZAG:/usr/src/sys/arch/i386/compile/MAKS-PXE
total memory = 119 MB
avail memory = 115 MB
BIOS32 rev. 0 found at 0xfdb40
mainbus0 (root)
cpu0 at mainbus0: (uniprocessor)
cpu0: SiS SiS55x (586-class), 166.62 MHz, id 0x505
cpu0: features 800111<FPU,TSC,CX8>
cpu0: features 800111<MMX>
---cut---

>How-To-Repeat:

>Fix:
Index: i386/identcpu.c
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/i386/identcpu.c,v
retrieving revision 1.16
diff -u -r1.16 identcpu.c
--- i386/identcpu.c 8 Aug 2004 05:21:01 -0000 1.16
+++ i386/identcpu.c 19 Oct 2004 10:31:33 -0000
@@ -537,6 +537,59 @@
    NULL,
    NULL,
   } }
+ },
+ {
+  "SiS SiS SiS ",
+  CPUVENDOR_SIS,
+  "SiS",
+  /* Family 4, AFAIK SiS never had any of these */
+  { {
+   CPUCLASS_486,
+   {
+    0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0,
+    "486 compatible" /* Default */
+   },
+   NULL,
+   NULL,
+   NULL,
+  },
+  /* Family 5, AFAIK SiS has only SiS55x System On Chip (SOC) CPU family */
+  {
+   CPUCLASS_586,
+   {
+    "SiS55x", 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0,
+    "SiS"    /* Default */
+   },
+   NULL,
+   NULL,
+   NULL,
+  },
+  /* Family 6, AFAIK not yet available from SiS */
+  {
+   CPUCLASS_686,
+   {
+    0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0,
+    "Pentium Pro compatible" /* Default */
+   },
+   NULL,
+   NULL,
+   NULL,
+  },
+  /* Family > 6, not yet available from SiS */
+  {
+   CPUCLASS_686,
+   {
+    0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0,
+    "Pentium Pro compatible" /* Default */
+   },
+   NULL,
+   NULL,
+   NULL,
+  } }
  }
 };
 
Index: include/cputypes.h
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/include/cputypes.h,v
retrieving revision 1.13
diff -u -r1.13 cputypes.h
--- include/cputypes.h 17 Nov 2001 08:21:43 -0000 1.13
+++ include/cputypes.h 19 Oct 2004 10:31:33 -0000
@@ -68,6 +68,7 @@
 #define CPUVENDOR_AMD  3
 #define CPUVENDOR_IDT  4
 #define CPUVENDOR_TRANSMETA 5
+#define CPUVENDOR_SIS  6
 
 /*
  * Some other defines, dealing with values returned by cpuid.

>Release-Note:
>Audit-Trail:
>Unformatted: