The MASM Forum Archive 2004 to 2012

General Forums => The Laboratory => Topic started by: dedndave on January 03, 2010, 11:26:03 AM

Title: Another CPU ID Program
Post by: dedndave on January 03, 2010, 11:26:03 AM
hi folks
i would like to see how this runs on different machines
source is included, as always.............

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 15
   bExtFamily: 0
       bModel: 4
    bExtModel: 0
        bType: 0
        bStep: 3
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000000111b
   dwMiscBits: 00000000000000101011101101110111b
      szBrand: Intel(R) Pentium(R) 4 CPU 3.00GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE3

NOTE - this routine is preliminary
it has a few problems, not the least of which is that it may provide inaccurate information for non-Intel/AMD processors

;    -    dwMiscBits
;               0_1 values come from CPUID function 1
;               8_1 values come from CPUID function 80000001h
;
;               Bit(s) Source        Name    Description
;
;                 0    0_1 edx:00    FPU     on-chip FPU
;                 1    0_1 edx:01    VME     virtual mode enhancements
;                 2    0_1 edx:02    DE      debug extension
;                 3    8_1 ecx:00    LAHF64  lahf/sahf in 64-bit mode
;                 4    0_1 edx:04    RDTSC   rdtsc instruction
;                 5    8_1 edx:29    LM64    Intel 64/AMD long mode
;                 6    0_1 edx:06    PAE     physical address extension
;                 7    0_1 ecx:23    POPCNT  popcnt instruction
;                 8    0_1 edx:08    CX8     cmpxchg8 instruction
;                 9    0_1 edx:24    FXSR    fxsave/fxrstor instructions
;                10    8_1 edx:11    SYSCALL syscall/sysret instructions
;                11    0_1 edx:11    SEP     sysenter/sysexit instructions
;                12    0_1 edx:28    HTT     hyper-threading technology
;                13    0_1 ecx:13    CX16    cmpxchg16 instruction
;                14                          unused in this version
;                15    0_1 edx:15    CMOV    cmov instructions
;               16-23  0_1 ebx:16-23         total thread count if HTT = 1
;               24-31                        unused in this version
Title: Re: Another CPU ID Program
Post by: jj2007 on January 03, 2010, 12:29:15 PM
          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 6
   bExtFamily: 0
       bModel: 14
    bExtModel: 0
        bType: 0
        bStep: 8
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000000111b
   dwMiscBits: 00000000000000001000101101010111b
      szBrand: Intel(R) Celeron(R) M CPU        420  @ 1.60GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE3
Title: Re: Another CPU ID Program
Post by: brethren on January 03, 2010, 12:32:43 PM
          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 2
      bFamily: 15
   bExtFamily: 0
       bModel: 8
    bExtModel: 4
        bType: 0
        bStep: 2
     bMmxBits: 00000011b
   w3DNowBits: 0000000000000011b
     wSseBits: 0000000000000111b
   dwMiscBits: 00000000000000101011111101111111b
      szBrand: AMD Turion(tm) 64 X2 Mobile Technology TL-52
     szVendor: AuthenticAMD
        szMmx: MMX+
      sz3DNow: 3DNow!+
        szSse: SSE3
Press any key to continue ...
Title: Re: Another CPU ID Program
Post by: hutch-- on January 03, 2010, 02:02:28 PM

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 6
   bExtFamily: 0
       bModel: 7
    bExtModel: 1
        bType: 0
        bStep: 10
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000011111b
   dwMiscBits: 00000000000001001011101101111111b
      szBrand: Intel(R) Core(TM)2 Quad CPU    Q9650  @ 3.00GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE4.1
Press any key to continue ...
Title: Re: Another CPU ID Program
Post by: hutch-- on January 03, 2010, 02:07:39 PM

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 15
   bExtFamily: 0
       bModel: 4
    bExtModel: 0
        bType: 0
        bStep: 10
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000000111b
   dwMiscBits: 00000000000000011011101101111111b
      szBrand: Genuine Intel(R) CPU 3.80GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE3
Press any key to continue ...
Title: Re: Another CPU ID Program
Post by: FORTRANS on January 03, 2010, 02:09:48 PM
Hi,

Steve

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000200h
    bVendorID: 1
      bFamily: 6
   bExtFamily: 0
       bModel: 8
    bExtModel: 0
        bType: 0
        bStep: 3
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000000001b
   dwMiscBits: 00000000000000001000101101010111b
      szBrand:
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE
Press any key to continue ...

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 6
   bExtFamily: 0
       bModel: 13
    bExtModel: 0
        bType: 0
        bStep: 6
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000000011b
   dwMiscBits: 00000000000000001000101100010111b
      szBrand: Intel(R) Pentium(R) M processor 1.70GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE2
Press any key to continue ...

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000200h
    bVendorID: 1
      bFamily: 5
   bExtFamily: 0
       bModel: 4
    bExtModel: 0
        bType: 0
        bStep: 3
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000000000b
   dwMiscBits: 00000000000000000000000100010111b
      szBrand:
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse:
Press any key to continue ...
Title: Re: Another CPU ID Program
Post by: dedndave on January 03, 2010, 04:23:54 PM
very cool guys - many thanks   :U
Title: Re: Another CPU ID Program
Post by: Vortex on January 03, 2010, 04:33:31 PM

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 15
   bExtFamily: 0
       bModel: 4
    bExtModel: 0
        bType: 0
        bStep: 9
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000000111b
   dwMiscBits: 00000000000000101011101101111111b
      szBrand: Intel(R) Pentium(R) 4 CPU 3.20GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE3
Title: Re: Another CPU ID Program
Post by: Gunner on January 03, 2010, 04:45:40 PM
          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 15
   bExtFamily: 0
       bModel: 2
    bExtModel: 0
        bType: 0
        bStep: 7
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000000011b
   dwMiscBits: 00000000000000011001101101010111b
      szBrand: Intel(R) Pentium(R) 4 CPU 2.40GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE2
Press any key to continue ...
Title: Re: Another CPU ID Program
Post by: fearless on January 03, 2010, 07:09:04 PM
          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 6
   bExtFamily: 0
       bModel: 7
    bExtModel: 1
        bType: 0
        bStep: 7
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000011111b
   dwMiscBits: 00000000000001001011101101111111b
      szBrand: Intel(R) Core(TM)2 Quad  CPU   Q9550  @ 2.83GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE4.1
Press any key to continue ...
Title: Re: Another CPU ID Program
Post by: Bill Cravener on January 03, 2010, 07:13:51 PM
          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 15
   bExtFamily: 0
       bModel: 6
    bExtModel: 0
        bType: 0
        bStep: 4
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000000111b
   dwMiscBits: 00000000000000101011101101111111b
      szBrand: Intel(R) Pentium(R) D CPU 2.80GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE3
Press any key to continue ...
Title: Re: Another CPU ID Program
Post by: BasilYercin on January 03, 2010, 09:17:59 PM

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 2
      bFamily: 15
   bExtFamily: 0
       bModel: 15
    bExtModel: 1
        bType: 0
        bStep: 0
     bMmxBits: 00000011b
   w3DNowBits: 0000000000000011b
     wSseBits: 0000000000000011b
   dwMiscBits: 00000000000000001000111101111111b
      szBrand: AMD Sempron(tm) Processor 3000+
     szVendor: AuthenticAMD
        szMmx: MMX+
      sz3DNow: 3DNow!+
        szSse: SSE2
Press any key to continue ...
Title: Re: Another CPU ID Program
Post by: GregL on January 03, 2010, 09:58:55 PM

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 15
   bExtFamily: 0
       bModel: 6
    bExtModel: 0
        bType: 0
        bStep: 4
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000000111b
   dwMiscBits: 00000000000000101011101101111111b
      szBrand: Intel(R) Pentium(R) D CPU 3.20GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE3
Press any key to continue ...
Title: Re: Another CPU ID Program
Post by: MichaelW on January 04, 2010, 05:54:06 AM
P3:

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000200h
    bVendorID: 1
      bFamily: 6
   bExtFamily: 0
       bModel: 7
    bExtModel: 0
        bType: 0
        bStep: 3
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000000001b
   dwMiscBits: 00000000000000001000101101010111b
      szBrand:
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE
Title: Re: Another CPU ID Program
Post by: Siekmanski on January 04, 2010, 08:50:13 AM
          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 6
   bExtFamily: 0
       bModel: 15
    bExtModel: 0
        bType: 0
        bStep: 11
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000001111b
   dwMiscBits: 00000000000001001011101101111111b
      szBrand: Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSSE3
Title: Re: Another CPU ID Program
Post by: hutch-- on January 04, 2010, 08:50:54 AM
Michael's result is interesting, I wonder if there is enough data available for the PIII and earlier to determine the processor type ? I remember in the distant past the very early Pentiums and a Cyrix processor and while almost none of them would be running anything later than win9x I never bothered to find out if they could be ID'd or not. I once owned an old AMD running at 550 meg that had problems with win95b and needed a patch but as is probably the case, even if stuff that old would still run, its doubtful that its worth the effort to cater for it.
Title: Re: Another CPU ID Program
Post by: dedndave on January 04, 2010, 12:51:29 PM
they can be identified
although, to cover the entire gambit of old CPUs takes too much code
not much sense to ID anything earlier than a 486
Win98 requires an FPU - Win95 does not
that is a good break-point, i would say
most 386 owners never acquired a 387
386 processors aren't too bad to ID, as there weren't very many models
486 on up has CPUID, to one degree or another

one thing i forgot to put in there was a simple "level of CPUID support" value
that would ID some earlier processors if we had the database (haven't seen info listed that way)
i.e. when you invoke CPUID with a value of EAX=0, it returns (in EAX) the highest level of standard CPUID functions
if the CPU supports CPUID function 5 max, for example, it will return a 5
similarly, with the extended functions, if you invoke CPUID with 80000000h, it returns a value like 80000005h in EAX
i have seen no list organized as "this CPU supports these CPUID functions"
although, one could be created
Title: Re: Another CPU ID Program
Post by: FORTRANS on January 04, 2010, 03:24:11 PM
Hi,

   I went out to Intel's site and browsed around.  Application
Note AP-485 has a table with family and type values.  It
also has a Brand ID table.  With those one should be able
to identify most processors.  Some are still ambiguous.  Still
it seems a decent document.  So the older processors like
the ones I and Michael posted could be "named" if wanted.

Regards,

Steve N.
Title: Re: Another CPU ID Program
Post by: dedndave on January 04, 2010, 03:28:19 PM
i plan on doing that, too, Steve
we can at least ID 80386, 80486, Pentium I, II, III that way
thanks for the app-note number
oh - that is 241618.pdf - got that one - although, i think they updated it
Title: Re: Another CPU ID Program
Post by: FORTRANS on January 04, 2010, 03:54:17 PM
Hi,

   Yeah, I found after about an hour of browsing that I
had an older version already.  (Grumble.)  Intel's search
gave a lot of broken links when searching for the PDF by
its number.  So that's why I posted the AP number.  And
it turned out to have been updated from the one I had
so I figured it wouldn't hurt mention it.

Cheers,

Steve N.
Title: Re: Another CPU ID Program
Post by: dedndave on January 04, 2010, 04:03:01 PM
that is revision 036 - i was running on 034
not that any 486/older pentium stuff has changed - lol

EDIT - one thing i have to do is to make sure i am only using instructions that will execute on whatever we decide to support
i am sure i am using some 586 instructions (well - addressing modes, at least)
and - i better make sure my conditional branches are short - lol
Title: Re: Another CPU ID Program
Post by: hutch-- on January 04, 2010, 10:25:06 PM
Dave,

I asked the question because to cover the whole range of very old stuff would blow out the detection algo for very little gain. The real uses are to detect instruction sets like MMX, SSE 1/2/3/4/4.1 and the AMD specifics. If its easy to handle the earlier Pentium range then it would make sense but you can open up a Pandoras box to cover all the variations of the old stuff when almost all of it no longer runs.

You could do an OS type specific version for Win2000 or later that did not test the very old stuff and if you felt like it later you could do a true legacy version that plodded through the antiques but a compact and simplified version for the late stuff would be of a lot more use.
Title: Re: Another CPU ID Program
Post by: dedndave on January 04, 2010, 11:01:16 PM
i have been looking at it, Hutch
i am making a table (text file notes) to ID the simple ones
it looks like i should be able to handle the following and create simple strings without too much bloat:

80486
Pentium
Pentium Pro
Pentium II
Pentium III

i think those are the strings i will use, too - nothing fancy
no need to say "Pentium III MMX" because the MMX is already taken care of
80386's and older 80486's that do not support CPUID get nothing - lol
Title: Re: Another CPU ID Program
Post by: dedndave on January 22, 2010, 03:00:23 AM
Warning

CPUID can cause severe headaches
Title: Re: Another CPU ID Program
Post by: hutch-- on January 22, 2010, 03:31:25 AM
 :bg

> 80386's and older 80486's that do not support CPUID get nothing

Processor too old to indentify  :P
Title: Re: Another CPU ID Program
Post by: dedndave on January 22, 2010, 04:10:29 AM
you're close, Hutch.....
"programmer to old to process"   :P

when i saw how easy it was to id 80386/80486 - that one went in no prob
but - i have been poking around and trying to ID other vendors
also - i want to do a core and thread count
i figure i may as well do it once, do it right, and be done with it
i think we all take a stab at this one time or another
about half way through, we get side-tracked or decide it isn't worth the effort
so - i'll take one for the team - lol
Title: Re: Another CPU ID Program
Post by: hutch-- on January 22, 2010, 04:59:38 AM
 :bg

CPU does not support MMX or later instructions. (Translation = Antique pile of junk) or (Legacy Hardware of unknown origin) etc ...

Here is another one.

Vendor String Not Available. (ALIAS as above)
Title: Re: Another CPU ID Program
Post by: dedndave on January 22, 2010, 10:40:23 AM
well - i think i have the framework in place to name all the processors that win95+ can run on
i won't have the names for the earlier Geodes, for example, but i will be able to add them without altering the data structure
it didn't take much in the way of code or data to say "80386" or "80486" - and for those processors, that is all i intend to provide

the hardest group to cover is the Intel Pentium II/III group, which includes a lot of marketing names like Xeon and Celeron
some of those cannot be distinguished
the worst part of that group are the Tualatin cores, which are abundant because they were good performers
as an example, the Pentium III-S is a special server version of the Tualatin that runs at 1.45 V and has a heat spreader package
that processor has found it's way into many laptop and mobile applications and is an old favorite of overclockers
there are also Low Voltage and Ultra Low Voltage versions of that core (1.15 and 1.1 V)
for programming considerations, the name isn't critical, as they all run the same instruction set
but - if you incorrectly identify a processor, someone will say "this routine is broken" - lol
i can avoid some of that
along the way, i have learned a few things, which is always good too   :U

the real reason for going through it was to find out what design criteria were needed to provide the desired results
i wanted a routine that could be expanded on without re-writing it everytime you add a name - lol
Title: Re: Another CPU ID Program
Post by: Magicle on February 02, 2010, 07:55:11 PM
   EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 2
      bFamily: 15
   bExtFamily: 1
       bModel: 2
    bExtModel: 0
        bType: 0
        bStep: 3
     bMmxBits: 00000011b
   w3DNowBits: 0000000000000011b
     wSseBits: 0000000001000111b
   dwMiscBits: 00000000000001001011111111111111b
      szBrand: AMD Phenom(tm) 9850 Quad-Core Processor
     szVendor: AuthenticAMD
        szMmx: MMX+
      sz3DNow: 3DNow!+
        szSse: SSE4a


I am so sad, I can't even figure 10% of that code  :(
Rofl, maybe in 3 years I'll be able to write a code like that as well  :P
Title: Re: Another CPU ID Program
Post by: dedndave on February 02, 2010, 08:38:48 PM
CPUID is something noone wants to learn - lol
i am currently working on a much better version
i finally tackled the last hurdle, it is just a matter of putting all the pieces together
Title: Re: Another CPU ID Program
Post by: Magicle on February 02, 2010, 11:50:31 PM
Sorry for my ignorance but, what exactly are you trying to accomplish?
Title: Re: Another CPU ID Program
Post by: dedndave on February 03, 2010, 12:12:01 AM
lol nothing ignorant there
not sure what i am doing   :P

the idea is to write a routine that programmers can use to identify the platform at runtime
i have another thread on "OS Info Dump", and one to measure CPU frequency
Hutch has one for getting the disk free space and another for getting the memory stats
put them all together, and a programmer can select algorithms and/or data sizes (or even DLL's) based on the runtime platform
of particular intrest in this case, is which instruction sets can be used
if the progam is running on a machine that supports SSE 4.1 instructions, for example, those instructions can be used
a more complicated scenerio might be one where the programmer wants to control thread scheduling
he might need to know how many cores there are and which affinity bits correspond to which cores
there are simpler cases where we just want to know what processor a piece of test code is running on
if you look at a few of the posts in the Laboratory forum, you will see some of the test programs name the CPU
Title: Re: Another CPU ID Program
Post by: Magicle on February 03, 2010, 12:39:06 AM
Cool, thanks for the info Dave (Me has gotten wiser me thinks!)  :P
Title: Re: Another CPU ID Program
Post by: dedndave on February 03, 2010, 12:48:57 AM
no prob - you have a nice processor, there
you might be able to find it in the Laboratory
if not, d/l some of the test attachments in there and run them to see how it compares

here's an example by JJ...
http://www.masm32.com/board/index.php?topic=12984.0
Title: Re: Another CPU ID Program
Post by: FORTRANS on February 03, 2010, 10:17:27 AM
Hi,

   Perhaps we should have a sticky topic to point to the various
CPU/OS/System identification threads?

Cheers,

Steve N.
Title: Re: Another CPU ID Program
Post by: dedndave on February 03, 2010, 10:29:31 AM
well - we are still in the development stage
once we get the bugs worked out, we could put them all in one sticky place   :U
Title: Re: Another CPU ID Program
Post by: herge on February 09, 2010, 09:06:23 AM
Hi *.*:


          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 2
      bFamily: 15
   bExtFamily: 0
       bModel: 15
    bExtModel: 2
        bType: 0
        bStep: 2
     bMmxBits: 00000011b
   w3DNowBits: 0000000000000011b
     wSseBits: 0000000000000111b
   dwMiscBits: 00000000000000001000111101111111b
      szBrand: AMD Athlon(tm) 64 Processor 3200+
     szVendor: AuthenticAMD
        szMmx: MMX+
      sz3DNow: 3DNow!+
        szSse: SSE3
Press any key to continue ...


Regards: herge
Title: Re: Another CPU ID Program
Post by: BlackVortex on February 11, 2010, 05:14:43 AM
          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 6
   bExtFamily: 0
       bModel: 7
    bExtModel: 1
        bType: 0
        bStep: 10
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000011111b
   dwMiscBits: 00000000000000101011101101111111b
      szBrand: Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE4.1

:U
Title: Re: Another CPU ID Program
Post by: dacid on February 12, 2010, 09:05:35 AM

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 2
      bFamily: 15
   bExtFamily: 0
       bModel: 11
    bExtModel: 6
        bType: 0
        bStep: 2
     bMmxBits: 00000011b
   w3DNowBits: 0000000000000011b
     wSseBits: 0000000000000111b
   dwMiscBits: 00000000000000101011111101111111b
      szBrand: AMD Athlon(tm) 64 X2 Dual Core Processor 6000+
     szVendor: AuthenticAMD
        szMmx: MMX+
      sz3DNow: 3DNow!+
        szSse: SSE3
Press any key to continue ...
Title: Re: Another CPU ID Program
Post by: PBrennick on February 14, 2010, 01:50:03 PM

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 2
      bFamily: 15
   bExtFamily: 1
       bModel: 6
    bExtModel: 0
        bType: 0
        bStep: 2
     bMmxBits: 00000011b
   w3DNowBits: 0000000000000011b
     wSseBits: 0000000001000111b
   dwMiscBits: 00000000000000101011111111111111b
      szBrand: AMD Turion(tm) II Dual-Core Mobile M500
     szVendor: AuthenticAMD
        szMmx: MMX+
      sz3DNow: 3DNow!+
        szSse: SSE4a
Press any key to continue ...

Title: Re: Another CPU ID Program
Post by: dedndave on February 14, 2010, 05:28:28 PM
the routine seems to work well for Intel and AMD processors
but, it may return inaccurate results for off-brand cores
there are more things i wanted this routine to do, but first, i have to make it do what it does correctly - lol

after some thought, i realize that naming the processor, creating the codename string, enumerating packages, enumerating cores,
mapping cores to affinity mask bits, feature detection and creating feature strings are all very different goals
different applications require different treatment
to be completely successful, ring 0 access is needed to do some of it - a bit beyond the scope of identifying features

i may seperate the functions so that if feature information is desired, the bloat of performing all the other tasks is not included

and - if you think CPUID is a mess now, wait until you see what they are doing with AVX - lol
so far, i count 9 different feature bits to describe AVX capabilities, and i am sure there will be more
Intel and AMD are completely different with regard to AVX
Title: Re: Another CPU ID Program
Post by: PBrennick on February 15, 2010, 05:10:07 AM
.... and the beat goes on. Where does it end? Certainly, never. You certainly are not afraid of complicated tasks!

Paul
Title: Re: Another CPU ID Program
Post by: dedndave on February 15, 2010, 05:39:07 AM
QuoteYou certainly are not afraid of complicated tasks!

lol - in the world of engineering, i always get the crap-jobs
i get the stuff noone else wants to tackle
i have learned to just stay with it and finish it
a job is a job, after all - and - it can be rather lucrative   :bg

as for assembly language, i am much the same way, but it is a spare-time hobby
so, i don't always get to finish what i want when i want to
with CPUID, i realized that many of us had tackled it at one time or another
after you toil through a pile of documentation, you still don't know how it works - lol
you wind up leaving it in a "this will be good enough" state
i wanted to tackle it and get it right, just so noone else would have to mess with it
i think splitting it up makes sense - i can finish some requirements now
for some of it, i need to learn more to do it - that can wait til later

as it is, i have some non-technical tasks to be done before the summer arrives
so, i want to get things in a state where i can set them aside for a month and finish all that stuff
then, i can come back to it - if i finish my other tasks, i can play with code all summer and stay inside with the A/C   :bg
Title: Re: Another CPU ID Program
Post by: Bill Cravener on February 15, 2010, 10:40:08 AM
Quote from: dedndave on February 15, 2010, 05:39:07 AM
- if i finish my other tasks, i can play with code all summer and stay inside with the A/C   :bg

I spent a year in the Dallas Fort Worth area and I just couldn't take the heat down there. Exact opposite of our northeastern winters. The summer I spent down there average temp was 100 F. Up here in the cold you can add more layers, in the heat there is only so much the law allows you to remove when outdoors. :bg
Title: Re: Another CPU ID Program
Post by: dedndave on February 15, 2010, 01:21:27 PM
around here, 100 is nice weather in the summer
it is when it gets over 110 that you must stay indoors during the day
at midnight - it might get down to 90 - great time for a swim
Title: Re: Another CPU ID Program
Post by: frktons on February 15, 2010, 09:06:53 PM

-----------------------------------------------------------------------------------------
          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 6
   bExtFamily: 0
       bModel: 15
    bExtModel: 0
        bType: 0
        bStep: 6
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000001111b
   dwMiscBits: 00000000000000101011101101111111b
      szBrand: Intel(R) Core(TM)2 CPU          6600  @ 2.40GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSSE3
-----------------------------------------------------------------------------------------


Well this is the machine, the owner is not so smart  :8)


I just added the code tags for you so it was easier to read.
Title: Re: Another CPU ID Program
Post by: clive on March 05, 2010, 08:13:48 AM
          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 6
   bExtFamily: 0
       bModel: 12
    bExtModel: 1
        bType: 0
        bStep: 2
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000001111b
   dwMiscBits: 00000000000000101001101101011111b
      szBrand: Intel(R) Atom(TM) CPU N270   @ 1.60GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSSE3
Title: Re: Another CPU ID Program
Post by: joemc on March 11, 2010, 06:11:17 AM

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 6
   bExtFamily: 0
       bModel: 15
    bExtModel: 0
        bType: 0
        bStep: 6
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000001111b
   dwMiscBits: 00000000000000101011101101111111b
      szBrand: Intel(R) Core(TM)2 CPU         T5600  @ 1.83GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSSE3
Press any key to continue ...

Really the same as the other DUO other than brand :/
Title: Re: Another CPU ID Program
Post by: Greenhorn__ on March 29, 2010, 09:27:42 PM
          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 2
      bFamily: 15
   bExtFamily: 1
       bModel: 4
    bExtModel: 0
        bType: 0
        bStep: 2
     bMmxBits: 00000011b
   w3DNowBits: 0000000000000011b
     wSseBits: 0000000001000111b
   dwMiscBits: 00000000000001001011111111111111b
      szBrand: AMD Phenom(tm) II X4 955 Processor
     szVendor: AuthenticAMD
        szMmx: MMX+
      sz3DNow: 3DNow!+
        szSse: SSE4a
Press any key to continue ...