i386/identcpu.c question

John Baldwin jhb at FreeBSD.org
Thu Mar 11 10:05:48 PST 2004


On Wednesday 10 March 2004 10:51 pm, RMH wrote:
> Hello hackers,
>
> there are several lines in i386/identcpu.c:
>
> case 0x600:
>         /* Check the particular flavor of 686 */
>         switch (cpu_id & 0xf0) {
> 	case 0x00:
> 	        strcat(cpu_model, "Pentium Pro A-step");
> 		break;
> 	case 0x10:
> 	        strcat(cpu_model, "Pentium Pro");
> 		break;
> 	case 0x30:
> 	case 0x50:
> 	case 0x60:
> 	        strcat(cpu_model,
> 		"Pentium II/Pentium II Xeon/Celeron");
> 		cpu = CPU_PII;
> 		break;
> 	case 0x70:
> 	case 0x80:
> 	case 0xa0:
> 	case 0xb0:
> 	        strcat(cpu_model,
> 		"Pentium III/Pentium III Xeon/Celeron");
> 		cpu = CPU_PIII;
> 		break;
>
> 0x30 stands for 0.35-micron Klamath core (Pentium II), there
> were no Celeron or Xeon CPUs produced using it. There was
> PIIOD, but check for the OverDrive is done separately.
>
> By the way, 0x60 stands for Celeron (Mendocino) and mobile
> Pentium II (Dixon) only; 0x70 -- for Pentium III (Katmai)
> and Pentium III Xeon (Tanner) only; 0x80 -- for Celeron
> (Coppermine-128) and Pentium III (Coppermine) only; 0xa0 --
> for Pentium III Xeon (Cascades) only; 0xb0 -- for Celeron
> (Tualatin) and Pentium III (Tualatin) only.
>
> 	case 0x30:
> 		strcat(cpu_model, "Pentium II");
> 		cpu = CPU_PII;
> 		break;
> 	case 0x50:
> 		strcat(cpu_model,
> 		"Pentium II/Pentium II Xeon/Celeron");
> 		cpu = CPU_PII;
> 		break;
> 	case 0x60:
> 	        strcat(cpu_model,
> 		"Mobile Pentium II/Celeron");
> 		cpu = CPU_PII;
> 		break;
> 	case 0x70:
> 		strcat(cpu_model,
> 		"Pentium III/Pentium III Xeon");
> 		cpu = CPU_PIII;
> 		break;
> 	case 0x80:
> 		strcat(cpu_model, "Pentium III/Celeron");
> 		cpu = CPU_PIII;
> 		break;
> 	case 0xa0:
> 		strcat(cpu_model, "Pentium III Xeon");
> 		cpu = CPU_PIII;
> 		break;
> 	case 0xb0:
> 	        strcat(cpu_model, "Pentium III/Celeron");
> 		cpu = CPU_PIII;
> 		break;
>
> I suppose it doesn't take a lot of code to fix, but it looks
> much better when a CPU is recognised properly (or close to).

It used to be like this but was considered too much work to maintain and was 
consolidated.  Note that on modern CPUs we use the name provided by extended 
cpuid.

-- 
John Baldwin <jhb at FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org


More information about the freebsd-hackers mailing list