Subject: NetBSD vs. Pentium Prescott CPUs
To: None <port-i386@NetBSD.org>
From: Matthias Scheler <tron@zhadum.org.uk>
List: port-i386
Date: 02/15/2006 23:16:44
	Hello,

the Pentium 4 630 on my desktop system is not fully recognized by NetBSD:

cpu0: Intel (686-class), 3000.52 MHz, id 0xf43 <---
cpu0: features bfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features bfebfbff<PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX>
cpu0: features bfebfbff<FXSR,SSE,SSE2,SS,HTT,TM,SBF>
cpu0: features2 649d<SSE3,MONITOR,DS-CPL,EST,CID,xTPR>
cpu0: features3 20100000<EM64T>
cpu0: "Intel(R) Pentium(R) 4 CPU 3.00GHz"
cpu0: I-cache 12K uOp cache 8-way
cpu0: L2 cache 2 MB 64B/line 8-way
cpu0: ITLB 4K/4M: 64 entries
cpu0: DTLB 4K/4M: 64 entries
cpu0: using thermal monitor 1
cpu0: Enhanced SpeedStep running at 1500 MHz (1420 mV)
cpu0: unknown Enhanced SpeedStep CPU
cpu0: calibrating local timer
cpu0: apic clock running at 200 MHz
cpu0: 64 page colors

This leads e.g. to problem with "cpuflags":

tron@lyssa:~>cpuflags 
-march=pentiumpro

I've tried to fix the identification code in "identcpu.c" but haven't
figured out how to fix it. One of the problems seems to be that it
cannot figure out the "brand id" for the CPU. The following code in
cpu_probe_base_features() gets called ...

	CPUID(1, ci->ci_signature, miscbytes, ci->ci_feature2_flags,
	    ci->ci_feature_flags);

	/* Brand is low order 8 bits of ebx */
	ci->ci_brand_id = miscbytes & 0xff;

... but sets "ci->ci_brand_id" which is an invalid brand id and
therfore breaks the proper CPU detectin. Any ideas how to fix that?

	Kind regards

-- 
Matthias Scheler                                  http://scheler.de/~matthias/