From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.redhat.com (Postfix) with ESMTP id 4D7283F649 for ; Tue, 4 Mar 2003 08:55:44 -0500 (EST) Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id h24DthF11891 for axp-list@listman.redhat.com; Tue, 4 Mar 2003 08:55:43 -0500 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with SMTP id h24DthV11887 for ; Tue, 4 Mar 2003 08:55:43 -0500 Received: from mgate.uni-hannover.de (zzismail@mgate.uni-hannover.de [130.75.2.3]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id h24Dthq21132 for ; Tue, 4 Mar 2003 08:55:43 -0500 Received: from wega.itp.uni-hannover.de by mgate.uni-hannover.de with LocalSMTP (PP) with ESMTP; Tue, 4 Mar 2003 12:47:18 +0100 Received: from mirzam.itp.uni-hannover.de (mirzam.itp.uni-hannover.de [130.75.25.94]) by wega.itp.uni-hannover.de (AIX4.3/UCB 8.8.8/8.8.8) with ESMTP id MAA92694 for ; Tue, 4 Mar 2003 12:47:17 +0100 Received: (from kreutzm@localhost) by mirzam.itp.uni-hannover.de (8.11.6/8.9.3) id h24BlHa10811 for axp-list@redhat.com; Tue, 4 Mar 2003 12:47:17 +0100 Date: Tue, 4 Mar 2003 12:47:17 +0100 From: Helge Kreutzmann To: AXP-Liste Subject: Detecting EV67 cpus Message-ID: <20030304114717.GA10782@itp.uni-hannover.de> Mail-Followup-To: AXP-Liste Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DocE+STaALJfprDB" Content-Disposition: inline User-Agent: Mutt/1.4i X-Public-Key-URL: http://www.itp.uni-hannover.de/~kreutzm/data/kreutzm.gpg X-homepage: http://www.itp.uni-hannover.de/~kreutzm X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, for some which is doing some CPU detection I wanted to add the alpha part. I looked around at various sources and found the following code segment which seemed to do the job: char* cputype() { unsigned long ver, mask; asm ("implver %0" : "=3Dr" (ver)); asm ("amask %1, %0" : "=3Dr" (mask) : "r" (-1)); // printf("%ld-%x\n", ver, ~mask); switch (ver) { =20 case 0 : return "ev4"; case 1 : switch (~mask) { case 0 : return "ev5";=20 case 1 : return "ev56";=20 case 101 : return "pca56";=20 default : return "ev5-unknown"; } case 2 : switch (~mask) { case 303 : return "ev6"; case 307 : return "ev67"; case 1307 : return "ev68"; default : return "ev6-unknown"; } case 3 : return "ev7"; // I assume this default : return "Unknown"; } } For ev7 I guessed, but for ev67 it is definitly false because our XP1000 report ~mask=3D775 not 307. Also when looking into /proc/cpuinfo I see various entries for cpu model: Unknown, EV6 and EV67. Does anyone (Jay ?) know a proper table of ~mask values? Thanks Helge --=20 Helge Kreutzmann, Dipl.-Phys. Helge.Kreutzmann@itp.uni-hannov= er.de gpg signed mail preferred gpg-key: finger kreutzm@rigel.itp.uni-hannov= er.de 64bit GNU powered http://www.itp.uni-hannover.de/~kreu= tzm Help keep free software "libre": http://www.freepatents.org/ --DocE+STaALJfprDB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE+ZJJFRsxcY/MYpWoRAjOtAKCxwZmL/XjkyaY3OM9+iRvblX7cWACcCzTT AVj1zmxAsn4jQeqYbQNGe1g= =DMru -----END PGP SIGNATURE----- --DocE+STaALJfprDB--