Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
cmd:cpuid [2012/06/06 23:29]
127.0.0.1 external edit
cmd:cpuid [2012/06/12 10:05]
mcb30
Line 3: Line 3:
 ===== Synopsis ===== ===== Synopsis =====
  
-    cpuid [--amd] [--ecx] <bit number>+    cpuid [--ext] [--ecx] <bit number>
  
 ===== Examples ===== ===== Examples =====
Line 9: Line 9:
 === Check if CPU supports 64-bit operation ("long mode") === === Check if CPU supports 64-bit operation ("long mode") ===
  
-    cpuid --amd 29 && set arch x86_64 || set arch i386+    cpuid --ext 29 && set arch x86_64 || set arch i386
  
 === Check if CPU supports physical address extensions ("​PAE"​) === === Check if CPU supports physical address extensions ("​PAE"​) ===
Line 18: Line 18:
  
     cpuid --ecx 5 && set vmx yes ||     cpuid --ecx 5 && set vmx yes ||
-    cpuid --amd --ecx 2 && set svm yes ||+    cpuid --ext --ecx 2 && set svm yes ||
     isset ${vmx} || isset ${svm} && set hw_virt yes ||     isset ${vmx} || isset ${svm} && set hw_virt yes ||
  
 ===== Description ===== ===== Description =====
  
-Check for the existence of the specified x86 CPU feature using the ''​[[http://​en.wikipedia.org/​wiki/​CPUID|CPUID]]''​ instruction. ​ If the ''​%%--amd%%''​ option is specified then the [[http://​support.amd.com/​us/​Embedded_TechDocs/​25481.pdf|AMD-defined ("extended"​) ​feature set]] is checked, otherwise the [[http://​download.intel.com/​design/​processor/​applnots/​24161832.pdf|Intel-defined ("standard"​) ​feature set]] is checked. ​ If the ''​%%--ecx%%''​ option is specified then the feature set contained in the ''​%%%ecx%%''​ register is checked, otherwise the feature set contained in the ''​%%%edx%%''​ register is checked.+Check for the existence of the specified x86 CPU feature using the ''​[[http://​en.wikipedia.org/​wiki/​CPUID|CPUID]]''​ instruction. ​ If the ''​%%--ext%%''​ option is specified then the [[http://​support.amd.com/​us/​Embedded_TechDocs/​25481.pdf|extended feature set]] is checked, otherwise the [[http://​download.intel.com/​design/​processor/​applnots/​24161832.pdf|standard feature set]] is checked. ​ If the ''​%%--ecx%%''​ option is specified then the feature set contained in the ''​%%%ecx%%''​ register is checked, otherwise the feature set contained in the ''​%%%edx%%''​ register is checked.
  
 Some useful features to check are: Some useful features to check are:
  
 ^ Feature set  ^ Register ​ ^ Bit  ^ Feature ​ ^ Command ​ | ^ Feature set  ^ Register ​ ^ Bit  ^ Feature ​ ^ Command ​ |
-AMD    ​| ''​%%%edx%%'' ​ | 29  ^ Long mode (64-bit) ​ | ''​%%cpuid --amd 29%%'' ​ | +Extended  ​| ''​%%%edx%%'' ​ | 29  ^ Long mode (64-bit) ​ | ''​%%cpuid --ext 29%%'' ​ | 
-Intel  | ''​%%%edx%%'' ​ | 6   ^ Physical address extensions (PAE)  | ''​%%cpuid 6%%'' ​ | +Standard ​ | ''​%%%edx%%'' ​ | 6   ^ Physical address extensions (PAE)  | ''​%%cpuid 6%%'' ​ | 
-Intel  | ''​%%%ecx%%'' ​ | 5   ^ Virtual Machine Extensions (VMX)  | ''​%%cpuid --ecx 5%%'' ​ | +Standard ​ | ''​%%%ecx%%'' ​ | 5   ^ Virtual Machine Extensions (VMX)  | ''​%%cpuid --ecx 5%%'' ​ | 
-AMD    ​| ''​%%%ecx%%'' ​ | 2   ^ Secure Virtual Machine (SVM)  | ''​%%cpuid --amd --ecx 2%%'' ​ | +Extended  ​| ''​%%%ecx%%'' ​ | 2   ^ Secure Virtual Machine (SVM)  | ''​%%cpuid --ext --ecx 2%%'' ​ | 
-Intel  | ''​%%%edx%%'' ​ | 15  ^ Conditional Move (CMOV) ​ | ''​%%cpuid 15%%'' ​ |+Standard ​ | ''​%%%edx%%'' ​ | 15  ^ Conditional Move (CMOV) ​ | ''​%%cpuid 15%%'' ​ |
  
 ===== Command status ===== ===== Command status =====
Line 47: Line 47:
 ===== Notes ===== ===== Notes =====
  
-The [[http://​download.intel.com/​design/​processor/​applnots/​24161832.pdf|Intel-defined ("standard"​) ​feature set]] represents the values returned in ''​%%%ecx%%''​ and ''​%%%edx%%''​ when ''​CPUID''​ is called with ''​%%%eax=0x00000001%%''​.+The [[http://​download.intel.com/​design/​processor/​applnots/​24161832.pdf|standard feature set]] represents the values returned in ''​%%%ecx%%''​ and ''​%%%edx%%''​ when ''​CPUID''​ is called with ''​%%%eax=0x00000001%%''​.
  
-The [[http://​support.amd.com/​us/​Embedded_TechDocs/​25481.pdf|AMD-defined ("extended"​) ​feature set]] represents the values returned in ''​%%%ecx%%''​ and ''​%%%edx%%''​ when ''​CPUID''​ is called with ''​%%%eax=0x80000001%%''​.+The [[http://​support.amd.com/​us/​Embedded_TechDocs/​25481.pdf|extended feature set]] represents the values returned in ''​%%%ecx%%''​ and ''​%%%edx%%''​ when ''​CPUID''​ is called with ''​%%%eax=0x80000001%%''​.
  
cmd/cpuid.txt · Last modified: 2021/02/19 14:58 by mcb30
Recent changes RSS feed CC Attribution-Share Alike 4.0 International Driven by DokuWiki
All uses of this content must include an attribution to the iPXE project and the URL https://ipxe.org
References to "iPXE" may not be altered or removed.