assembly - How to reliably detect maximum additional CPUID levels? -
i query cpu features using cpuid
instruction. i'm interested in additional cpuid levels, including 0x80000000
, 0xc0000000
(centaur). problem don't see clear way of determining whether particular level supported.
in particular, i'm worried particular bit intel(r) 64 , ia-32 architectures software developer's manual:
two types of information returned: basic , extended function information. if value entered cpuid.eax higher maximum input value basic or extended function processor data highest basic information leaf returned.
this means if query cpuid
eax = 0x80000000
or eax = 0xc0000000
, can either maximum cpuid level in eax
, or output random basic level leaf.
is there reliable , relatively easy way of determining whether particular level supported?
you should start detecting processor vendor identification (12-character text string @ level 0) , continue basing on value. intel, 2 range of levels, since 0 , 0x80000000, supported (the first 1 native intel 1 , second 1 option set compatibility amd); amd, same 2 ranges supported bits can change value; then, other vendors, may own ranges according documentation.
Comments
Post a Comment