Port-amd64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: cpuctl on Quad Core Xeon?

>>>>> David Laight writes:

David> On Mon, Nov 24, 2008 at 07:05:32PM +0100, Joerg Sonnenberger wrote:
>> On Mon, Nov 24, 2008 at 06:59:16PM +0100, Urban Boquist wrote:

>> > cpu0: "Intel(R) Xeon(R) CPU X3360 @ 2.83GHz"
>> That's a literal string encoding in a bunch of registers.

David> And written to those registers by the system BIOS based on
David> information provided by intel and cpu strapping info.

As far as I can see, using the cpu brand string for identification is
what intel recommends for newer processors. See e.g. this:


in particular "7. Proper Identification Sequence".

And our cpuctl code is already using the brand string for AMD cpus.

Would the below patch be acceptable? It will print "Xeon" instead of
"Pentium III" in my case and it should not change anything for the old
Xeons since the new test is added after the cache size tests that is
already there (to differentiate between normal and Xeon variants of
Pentium III).

Best regards,

        -- Urban

Index: i386.c
RCS file: /anoncvs/src/usr.sbin/cpuctl/arch/i386.c,v
retrieving revision 1.13
diff -u -r1.13 i386.c
--- i386.c      14 Oct 2008 15:49:04 -0000      1.13
+++ i386.c      25 Nov 2008 11:07:59 -0000
@@ -753,6 +753,9 @@
                        ret = "Pentium III Xeon";
+               if (ret == NULL && *cpu_brand_string != '\0')
+                       if (strstr(cpu_brand_string, "Xeon") != NULL)
+                               ret = "Xeon";
        } else if (model >= 8) {
                if (ci->ci_brand_id && ci->ci_brand_id < 0x10) {
                        switch (ci->ci_brand_id) {

Home | Main Index | Thread Index | Old Index