Re: Test whether rdmsr instruction is supported.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



All modern processors (at least those you can run XP on) support cpuid.

"RossettoeCioccolato" <rossetoecioccolato@xxxxxxxxxxxxxxxx> wrote in message
news:%23r%23r5AeEKHA.1336@xxxxxxxxxxxxxxxxxxxxxxx
Thanks to all who responded. I see that the MSR feature information
returned by __cpuid and __cpuidex is documented:
http://msdn.microsoft.com/en-us/library/hskdteyh.aspx.

I don't think so. Microsoft is using CPUID to check if RDMSR is supported
in HAL without any speacial tricks like affinity or raising irql.

Volodymyr, could you provide a symbol which contains this code. I would
like to document that MS relies on this algorithm for my records.

Testing bit 5 in edx after cpuid instruction.<

Not to be anal, but should I also test whether the processor supports the
cpuid instruction? See for example:

"...if you want to use the CPUID instruction to check processor
properties, you should first ensure that the processor supports the CPUID
instruction."
http://books.google.com/books?id=ZFDqpSUPwAgC&pg=PA232&lpg=PA232&dq=test+cpuid+instruction+supported&source=bl&ots=X4QbQJs9dj&sig=PXrAZbyD_Dbdkx8O8_1mZC-HGBY&hl=en&ei=kelySrafDYu6Nd7I6LAM&sa=X&oi=book_result&ct=result&resnum=5#v=onepage&q=test%20cpuid%20instruction%20supported&f=false.

Or can I just assume that it is because I am running under Windows? If
the HAL makes this assumption then presumably it also is safe for ISV's.
Correct?

Regards,

Rossetoecioccolato.



.



Relevant Pages

  • BTW: IMHO there is rich sample of using CPUID in the web (open source lib. under the MPL)
    ... CarbonSoft cxCpu 4 provides a comprehensive class library allowing you, ... having to worry about different vendor's implementation of the CPUID ... The CPUID instruction takes a single parameter that identifies the execution ... The execution level determines what information is to be returned, ...
    (borland.public.delphi.language.basm)
  • Re: # of Physical processors in a Unix system
    ... It's a fuzzy line between multicore and multiprocessor thanks to things like Hyperthreads and shared caches. ... which tells you how to use the CPUID instruction to determine this. ... CPUID is an unprivileged instruction, but there is a Linux cpuid module that provides device nodes that let you read the output of the CPUID ... I am just starting to look at this on Opteron, but naturally AMD chose to do something completely different as far as CPU identification. ...
    (comp.os.linux.development.apps)
  • Re: Source code for CPUCount20 Intel utility
    ... > Hi Vladimir, ... > Thanks for the code suggstion and the link to CPUID utility. ... > Microsoft example about how to use CPUID instruction. ... > (sigle/multiple core processor). ...
    (microsoft.public.win32.programmer.kernel)
  • New Application: CPUID Explorer
    ... I've uploaded a new utility program that shows how to use the CPUID instruction to ... It is now available from my MVP Tips site. ...
    (microsoft.public.vc.mfc)
  • Re: Test whether rdmsr instruction is supported.
    ... in HAL without any speacial tricks like affinity or raising irql. ... Volodymyr, could you provide a symbol which contains this code. ... "...if you want to use the CPUID instruction to check processor properties, ...
    (microsoft.public.development.device.drivers)