Page 1 of 1

processor type in VMware

Posted: Fri May 29, 2009 12:24 am
by extremecoder
I am working on cpuid instruction and testing the code in VMWare ...

i am using cpuid.eax = 1, in order to identify processor type, family ... when I set the guest OS for both Single and Dual Processor, I am getting the eax = 6F8 which is a 13 bit value ...

how does it returns only 13 bit value ? is this becoz I am trying in VM ?

Re: processor type in VMware

Posted: Fri May 29, 2009 7:12 am
by jal
extremecoder wrote:when I set the guest OS for both Single and Dual Processor, I am getting the eax = 6F8 which is a 13 bit value ... how does it returns only 13 bit value ? is this becoz I am trying in VM ?
Your assumption that it must return more than 13 bits is wrong. The upper bits are used for 'extended family' and 'extended model', and are 0 for almost al Intel processors. Check this PDF for reference.


JAL

Re: processor type in VMware

Posted: Fri May 29, 2009 1:35 pm
by NickJohnson
Well, I think the point is that it is really returning 32 bits, but the upper 19 of them are zeroes. Your printk/printf function must remove leading zeroes, which isn't a problem, but numbers won't always have eight hex digits.