Table of Contents

CPUID settings

Name

  CPUID_SETTINGS

Header file

Configured via config/settings.h.

Examples

Enable CPUID settings

  #define CPUID_SETTINGS        /* CPUID settings */

Description

This build option enables support for the CPUID settings, which expose information retrieved using the CPUID instruction.

The CPU vendor and model can be retrieved using the cpuvendor and cpumodel settings.

Other information can be retrieved by constructing a numbered setting using the syntax ${cpuid/<register>.<function>}}, where <function> is the CPUID function number and <register> indicates the CPU register in which the information is returned (encoded as %eax=0, %ebx=1, %ecx=2, %edx=3). For example ${cpuid/2.0x80000001} will give the value of %ecx after calling CPUID with %eax=0x80000001.

For some CPUID leaves (such as %eax=0x00000004), there is also a subfunction number. This may be specified using the syntax ${cpuid/<subfunction>.0x40.<register>.<function>}.

See also