[Issue 3798] core.cpuid locks systems with Xeon E5530 CPU

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Feb 12 20:35:49 PST 2010


http://d.puremagic.com/issues/show_bug.cgi?id=3798


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug at yahoo.com.au


--- Comment #2 from Don <clugdbug at yahoo.com.au> 2010-02-12 20:35:48 PST ---
(In reply to comment #1)
> The problem appears to be that the termination condition for the following loop
> never becomes true:
> 
>     do {
>         asm {
>             mov EAX, 0x0B;
>             mov ECX, level;
>             cpuid;
>             mov a, EAX;
>             mov b, EAX;
>             mov c, ECX;
>             mov d, EDX;        
>         }
>         if (b!=0) {
>            // I'm not sure about this. The docs state that there
>            // are 2 hyperthreads per core if HT is factory enabled.
>             if (level==0) maxThreads = b & 0xFFFF;
>             else if (level==1) maxCores = b & 0xFFFF;
> 
>         }
>     } while (a!=0 || b!=0);

Please add ++level;  as the last line of that loop, so that it ends as:
        ++level;
    } while (a!=0 || b!=0);

Does that fix it? I don't have access to a Core i7, so I'm flying blind based
on the Intel manuals.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list