lkml.org 
[lkml]   [1997]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectnew ia32 ident patch
I've completely re-done the whatever-86 cpu identification to correctly
identify what (I hope is) all CPUs...

Please give it a test and let me know... I'm hoping to have this put in
the main distribution at some point in time...

The patch will apply cleanly to stock 2.1.5[789] and 2.1.60,and compiles.
I've "tested the amd5model() output since that's what I've got, so any
others would be greatly appreciated!

Pat

--
+----------------------------------------------------------------------------+
| Patrick St. Jean '97 XLH 883 psj@cgmlarson.com |
| Programmer & Systems Administrator +1 713-977-4177 x106 |
| Larson Software Technology http://www.cgmlarson.com |
+----------------------------------------------------------------------------+
--- setup.c.orig Mon Oct 20 15:51:17 1997
+++ setup.c Tue Oct 21 14:23:22 1997
@@ -231,11 +231,44 @@
request_region(0xf0,0x10,"fpu");
}

+static const char * amd4model(unsigned int nr)
+{
+ static const char *model[] = {
+ "0", "1", "2", "DX/2", "4", "5", "6", "DX/2-WB", "DX/4",
+ "DX/4-WB", "A", "B", "C", "D","Am5x86-WT","Am5x86-WB"
+ };
+ if (nr < sizeof(model)/sizeof(char *))
+ return model[nr];
+ return NULL;
+}
+
+static const char * cyrix4model(unsigned int nr)
+{
+ static const char *model[] = {
+ "0", "1", "2", "3", "MediaGX", "5", "6", "7", "8", "5x86",
+ "A", "B", "C", "D", "E", "F"
+ };
+ if (nr < sizeof(model)/sizeof(char *))
+ return model[nr];
+ return NULL;
+}
+
+static const char * umc4model(unsigned int nr)
+{
+ static const char *model[] = {
+ "0", "U5D", "U5S", "3", "4", "5", "6", "7", "8", "9",
+ "A", "B", "C", "D", "E", "F"
+ };
+ if (nr < sizeof(model)/sizeof(char *))
+ return model[nr];
+ return NULL;
+}
+
static const char * i486model(unsigned int nr)
{
static const char *model[] = {
- "0","DX","SX","DX/2","4","SX/2","6","DX/2-WB","DX/4","DX/4-WB",
- "10","11","12","13","Am5x86-WT","Am5x86-WB"
+ "DX-25/33", "DX-50", "SX", "DX/2", "SL", "SX/2", "6",
+ "DX/2-WB", "DX/4", "DX/4-WB", "A", "B", "C", "D", "E", "F"
};
if (nr < sizeof(model)/sizeof(char *))
return model[nr];
@@ -245,20 +278,66 @@
static const char * i586model(unsigned int nr)
{
static const char *model[] = {
- "0", "Pentium 60/66","Pentium 75+","OverDrive PODP5V83",
- "Pentium MMX"
+ "Pentium 60/66 A-step", "Pentium 60/66", "Pentium 75+",
+ "OverDrive PODP5V83", "Pentium MMX", "5", "6", "Pentium 75+",
+ "8", "9", "A", "B", "C", "D", "E", "F"
+ };
+ if (nr < sizeof(model)/sizeof(char *))
+ return model[nr];
+ return NULL;
+}
+
+static const char * amd5model(unsigned int nr)
+{
+ static const char *model[] = {
+ "K5/SSA5 (PR-75, PR-90, PR-100)", "K5 (PR-120, PR-133)",
+ "K5 (PR-166)", "K5 (PR-200)", "4", "5",
+ "K6 (166 - 266)", "K6 (166 - 300)", "K6 (model 8)",
+ "K6 (model 9)", "A", "B", "C", "D", "E", "F"
};
if (nr < sizeof(model)/sizeof(char *))
return model[nr];
return NULL;
}

-static const char * k5model(unsigned int nr)
+static const char * centaur5model(unsigned int nr)
{
static const char *model[] = {
- "SSA5 (PR-75, PR-90, PR-100)", "5k86 (PR-120, PR-133)",
- "5k86 (PR-166)", "5k86 (PR-200)", "", "",
- "K6(PR-133..PR-166)","K6(PR-133..PR-200)"
+ "0", "1", "2", "3", "C6", "5", "6", "7", "8", "9", "A",
+ "B", "C", "D", "E", "F"
+ };
+ if (nr < sizeof(model)/sizeof(char *))
+ return model[nr];
+ return NULL;
+}
+
+static const char * cyrix5model(unsigned int nr)
+{
+ static const char *model[] = {
+ "0", "1", "6x86", "3", "MediaGX with MMX", "5", "6", "7", "8",
+ "9", "A", "B", "C", "D", "E", "F"
+ };
+ if (nr < sizeof(model)/sizeof(char *))
+ return model[nr];
+ return NULL;
+}
+
+static const char * nexgen5model(unsigned int nr)
+{
+ static const char *model[] = {
+ "Nx586", "1", "2", "3", "4", "5", "6", "7", "8",
+ "9", "A", "B", "C", "D", "E", "F"
+ };
+ if (nr < sizeof(model)/sizeof(char *))
+ return model[nr];
+ return NULL;
+}
+
+static const char * cyrix6model(unsigned int nr)
+{
+ static const char *model[] = {
+ "6x86MX", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A",
+ "B", "C", "D", "E", "F"
};
if (nr < sizeof(model)/sizeof(char *))
return model[nr];
@@ -268,7 +347,8 @@
static const char * i686model(unsigned int nr)
{
static const char *model[] = {
- "PPro A-step", "Pentium Pro", "2", "Pentium II"
+ "Pentium Pro A-step", "Pentium Pro", "2", "Pentium II", "4",
+ "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"
};
if (nr < sizeof(model)/sizeof(char *))
return model[nr];
@@ -281,17 +361,35 @@
static char nbuf[12];
switch (x86) {
case 4:
- p = i486model(model);
+ if (!strcmp(x86_vendor_id, "AuthenticAMD")){
+ p = amd4model(model);
+ }else if (!strcmp(x86_vendor_id, "CyrixInstead")){
+ p = cyrix4model(model);
+ }else if (!strcmp(x86_vendor_id, "UMC UMC UMC ")){
+ p = umc4model(model);
+ }else{
+ p = i486model(model);
+ }
break;
case 5:
- if(strcmp(x86_vendor_id, "AuthenticAMD") == 0){
- p = k5model(model);
- } else {
+ if (!strcmp(x86_vendor_id, "AuthenticAMD")){
+ p = amd5model(model);
+ }else if (!strcmp(x86_vendor_id, "CentaurHauls")){
+ p = centaur5model(model);
+ }else if (!strcmp(x86_vendor_id, "CyrixInstead")){
+ p = cyrix5model(model);
+ }else if (!strcmp(x86_vendor_id, "NexGenDriven")){
+ p = nexgen5model(model);
+ }else{
p = i586model(model);
}
break;
case 6:
- p = i686model(model);
+ if (!strcmp(x86_vendor_id, "CyrixInstead")){
+ p = cyrix6model(model);
+ }else{
+ p = i686model(model);
+ }
break;
}
if (p)
\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.545 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site