* Detecting EV67 cpus
@ 2003-03-04 11:47 Helge Kreutzmann
2003-03-04 18:05 ` Jay Estabrook
0 siblings, 1 reply; 2+ messages in thread
From: Helge Kreutzmann @ 2003-03-04 11:47 UTC (permalink / raw)
To: AXP-Liste
[-- Attachment #1: Type: text/plain, Size: 1821 bytes --]
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" : "=r" (ver));
asm ("amask %1, %0" : "=r" (mask) : "r" (-1));
// printf("%ld-%x\n", ver, ~mask);
switch (ver)
{
case 0 : return "ev4";
case 1 : switch (~mask)
{
case 0 : return "ev5";
case 1 : return "ev56";
case 101 : return "pca56";
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=775 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
--
Helge Kreutzmann, Dipl.-Phys. Helge.Kreutzmann@itp.uni-hannover.de
gpg signed mail preferred gpg-key: finger kreutzm@rigel.itp.uni-hannover.de
64bit GNU powered http://www.itp.uni-hannover.de/~kreutzm
Help keep free software "libre": http://www.freepatents.org/
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Detecting EV67 cpus
2003-03-04 11:47 Detecting EV67 cpus Helge Kreutzmann
@ 2003-03-04 18:05 ` Jay Estabrook
0 siblings, 0 replies; 2+ messages in thread
From: Jay Estabrook @ 2003-03-04 18:05 UTC (permalink / raw)
To: AXP-Liste
On Tue, Mar 04, 2003 at 12:47:17PM +0100, Helge Kreutzmann wrote:
>
> case 3 : return "ev7"; // I assume this
Assume this for EV7 and EV79 (see below for reference).
> For ev7 I guessed, but for ev67 it is definitly false because
> our XP1000 report ~mask=775 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?
Sorry, I don't know why the XP1000 value is strange.
The AMASK bits are documented in the Alpha Architecture Reference, a
copy of which is available for download at:
ftp://ftp.compaq.com/pub/products/alphaCPUdocs/
NOTE: this is the latest, last, and most complete edition to be made
publically available.
A quick summary:
bitno extension
----- -------
0 byte/word instructions (BWX)
1 square root and FP conversion (FIX)
2 count instructions (CIX)
8 multi-media instructions (MVI)
9 precise arithmetic trap (PAT)
12 support for prefetch with modify intent to improve (PMI)
So, from your switch statement we see:
CPU extensions
--- ----------
EV4 none
EV5 none
EV56 BWX
PCA56 BWX and MVI
EV6 BWX and FIX and MVI and PAT
EV67 BWX and FIX and CIX and MVI and PAT
EV68 BWX and FIX and CIX and MVI and PAT and PMI
/* I believe the following EV7/EV79 info is correct. */
EV7 BWX and FIX and CIX and MVI and PAT and PMI
EV79 BWX and FIX and CIX and MVI and PAT and PMI
--Jay++
-----------------------------------------------------------------------------
Jay A Estabrook HPTC - LINUX support
Hewlett-Packard Company - MRO1-2/K15 (508) 467-2080
200 Forest Street, Marlboro MA 01752 Jay.Estabrook@hp.com
-----------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-03-04 18:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-04 11:47 Detecting EV67 cpus Helge Kreutzmann
2003-03-04 18:05 ` Jay Estabrook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox