NetBSD-Bugs archive

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

Re: bin/38667: cpuctl does not properly deal with AMD Phenom



The following reply was made to PR bin/38667; it has been noted by GNATS.

From: Paul Goyette <paul%whooppee.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/38667: cpuctl does not properly deal with AMD Phenom
Date: Fri, 16 May 2008 06:17:16 -0700 (PDT)

 The following patch is necessary to enable cpuctl to properly identify 
 my Phenom processor:
 
 Index: i386.c
 ===================================================================
 RCS file: /cvsroot/src/usr.sbin/cpuctl/arch/i386.c,v
 retrieving revision 1.3
 diff -u -p -r1.3 i386.c
 --- i386.c     15 May 2008 23:31:56 -0000      1.3
 +++ i386.c     16 May 2008 13:15:45 -0000
 @@ -983,7 +983,8 @@ amd_amd64_name(struct cpu_info *ci)
        extfamily = CPUID2EXTFAMILY(ci->ci_signature);
        extmodel  = CPUID2EXTMODEL(ci->ci_signature);
 
 -      if (extfamily == 0x00) {
 +      switch (extfamily) {
 +      case 0x00:
                switch (model) {
                case 0x1:
                        switch (extmodel) {
 @@ -1093,6 +1094,17 @@ amd_amd64_name(struct cpu_info *ci)
                default:
                        ret = "Unknown AMD64 CPU";
                }
 +              break;
 +      case 0x01:
 +              switch (model) {
 +                      case 0x02:
 +                              ret = "Phenom";
 +                              break;
 +                      default:
 +                              ret = "Unknown AMD64 CPU";
 +                              break;
 +              }
 +              break;
        }
 
        return ret;
 
 ----------------------------------------------------------------------
 |   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:   |
 | Customer Service | FA29 0E3B 35AF E8AE 6651 |  paul%whooppee.com@localhost   
|
 | Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette%juniper.net@localhost 
|
 ----------------------------------------------------------------------
 


Home | Main Index | Thread Index | Old Index