Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Feb 1999 12:08:27 -0600 (CST)
From:      toasty@dragondata.com
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   i386/10050: [PATCH] identcpu.c slightly broken
Message-ID:  <199902121808.MAA15725@dreams.dragondata.com>

next in thread | raw e-mail | index | archive | help


>Number:         10050
>Category:       i386
>Synopsis:       [PATCH] identcpu.c slightly broken
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 12 10:10:00 PST 1999
>Closed-Date:
>Last-Modified:
>Originator:     Kevin Day
>Release:        FreeBSD 3.0-RELEASE i386
>Organization:
DragonData Internet Services
>Environment:



>Description:

sys/i386/i386/identcpu.c has two minor bugs, involving ANDing cpu_id

>How-To-Repeat:

>Fix:
	
--- identcpu.c  Fri Feb 12 18:55:19 1999
+++ identcpu.c  Fri Feb 12 18:58:02 1999
@@ -131,7 +131,7 @@
 
 #if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU)
        if (strcmp(cpu_vendor,"GenuineIntel") == 0) {
-               if ((cpu_id & 0xf00) > 3) {
+               if ((cpu_id & 0xf00) > 0x300) {
                        cpu_model[0] = '\0';
 
                        switch (cpu_id & 0x3000) {
@@ -495,7 +495,7 @@
        if (strcmp(cpu_vendor, "GenuineIntel") == 0 ||
            strcmp(cpu_vendor, "AuthenticAMD") == 0 ||
                ((strcmp(cpu_vendor, "CyrixInstead") == 0) &&
-                ((cpu_id & 0xf00) > 5))) {
+                ((cpu_id & 0xf00) > 0x500))) {
                printf("  Stepping=%u", cpu_id & 0xf);
                if (strcmp(cpu_vendor, "CyrixInstead") == 0)
                        printf("  DIR=0x%04x", cyrix_did);
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902121808.MAA15725>