Xiao Feng,
  Did GetNativeSystemInfo() work? I can write our own api if we need it,
but the best way would be to do it around cpuid, since the chip knows best.
I know the cpuid documented behaviour on Intel. On other platforms, I am not
100% sure, though AMD and Intel have somewhat similar feedback from cpuid
(except for brandname string).
 One advantage of using the OS api's is that they are already supposed to
have done this work with the platform vendors and should be uptodate.

Rana


On 11/1/06, Xiao-Feng Li <[EMAIL PROTECTED]> wrote:

Very informative! Thanks, Rana.

-xiaofeng

On 11/2/06, Rana Dasgupta <[EMAIL PROTECTED]> wrote:
>    On Windows, there is a bunch of bugs.
>
>    - On W2003 SP1, Vista, XP-64 GetLogicalProcessorInformation() is the
>    recommended api. It returns # of cores on AMD and # of logical procs
on
>    Intel.
>    - GetSystemInfo() is on XP-32 and Windows Server. It does not work in
>    wow mode. I think GetNativeSystemInfo is needed.
>    - For x64, the VC/VC++ the __cpuid() intrinsic returns
>    wrong information
>
>       The root cause is that the incorrect versions use the cpuid
> instruction incorrectly. __cpuid() uses old style cpuid and takes input
from
> eax only instead of eax, ecx . GetSystemInfo() uses the registers in
short
> mode when doing cpuid, so I think it fails for wow. It is amazing how
> Windows works at all!
>
>
>
>
> On 11/1/06, Xiao-Feng Li <[EMAIL PROTECTED]> wrote:
> >
> > On 11/1/06, Alexey Varlamov <[EMAIL PROTECTED]> wrote:
> > > Just a wild guess: this may be caused by x86 emulation on em64t
> > > (x86_64). SDK docs advise to use GetNativeSystemInfo() in such case,
> > > instead of currently used GetSystemInfo(). (See
> > > vm\port\src\misc\win\sysinfo.c).
> > >
> >
> > huh, I guess you are right, since my machine is X86-64bit. :-) I will
> > try the API you pointed.
> >
> > Thanks,
> > xiaofeng
> >
> >
>
>

Reply via email to