Subject: Re: [Fwd: Re: port-i386/36428: piixpcib boot hang on 4.0_BETA2]
To: Pierre Pronchery <khorben@defora.org>
From: Thor Lancelot Simon <tls@rek.tjls.com>
List: tech-kern
Date: 07/02/2007 14:38:29
On Mon, Jul 02, 2007 at 07:03:06PM +0200, Pierre Pronchery wrote:
> 	Hello,
> 
> doomwarrior wrote:
>
> >> #define CPUID_PIII_REV_0x14_COPPERMINE 0x680
> >> #define CPUID_PIII_REV_0x0D_COPPERMINE 0x681
> >> #define CPUID_PIII_REV_0x0C_COPPERMINE 0x683
> >> #define CPUID_PIII_REV_0x07_COPPERMINE 0x686
> >> #define CPUID_PIII_REV_0x04_TULATATIN  0x6B0
> >> #define CPUID_PIII_REV_0x1C_TULATATIN  0x6B1
> >> #define CPUID_PIII_REV_0x01_TULATATIN  0x6B4
> 
> I think they're actually called "tualatin".

I believe that's correct, but I don't think the product codename
belongs in the constant like that.  We don't do that anywhere else
in the kernel.

If you want to make it possible to print the product name, use a
structure, mapping from ID to CPUID_PIII_REV_X and whether the
feature you want is present, and toss in the code name as a string
element.  That way you can iterate through the array matching on
the ID and whether the feature you want is present, and avoid big
multi-label switch statements in the code -- cleaner anyhow.

Thor