svn commit: r240773 - in head/sys: amd64/amd64 i386/i386

Dimitry Andric dim at FreeBSD.org
Wed Sep 26 09:09:24 UTC 2012


On 2012-09-25 19:39, John Baldwin wrote:
> On Tuesday, September 25, 2012 1:22:44 pm Andriy Gapon wrote:
>> on 09/25/12 19:14 Dimitry Andric said the following:
>>> Are we interested more in "beautifying", than giving
>>> unambiguous information?
>>
>> OTOH, I have never seen CPUID numbers in decimal.

The point is, that in this specific dmesg line, we first print a
hexadecimal ID with 0x, then follow it by IDs which are still
hexadecimal, but NOT prefixed with 0x.

That is inconsistent, and thus confusing; either print them all without
prefix, or print them all with prefix (or a suffix).  The latter is most
unambiguous, in my opinion.


> And the place you typically will use these is in looking at Intel's manuals in
> which case they have the <xx>_<yy>h layout.  If you want to gratuitously
> change the format, I'd vote for outputting the string as '06_2Ah'.

That's also fine with me, as long as *all* IDs get identified in the
same manner. :)

Are you OK with the attached patch, which suffixes all the ID
information with 'h'?


> Note that the full ID is already printed out earlier on the same line with a
> trailing 0x, so it's not clear to me that it was confusing before.

On some machines, the full ID is very clearly related to the family,
model and such, for example on Gavin's Nocona test machine:

   CPU: Intel(R) Xeon(TM) CPU 2.80GHz (2793.24-MHz K8-class CPU)
     Origin = "GenuineIntel"  Id = 0xf41  Family = f  Model = 4  Stepping = 1

Here the family, model and stepping are just the individual hex digits
of the full ID.

However, on a more recent machine, such as this one, dmesg has:

   CPU: Intel(R) Core(TM) i5 CPU         650  @ 3.20GHz (3192.07-MHz K8-class CPU)
     Origin = "GenuineIntel"  Id = 0x20652  Family = 6  Model = 25  Stepping = 2

The family, model and stepping are now not so easily recognized from the
full ID, at least not at first glance.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpuid-hex-1.diff
Type: text/x-diff
Size: 1755 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20120926/b33ab453/cpuid-hex-1.bin


More information about the svn-src-all mailing list