iPXE
|
x86 CPU feature detection More...
Go to the source code of this file.
Macros | |
#define | colour 0x861d |
Colour for debug messages. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static int | cpuid_instruction_supported (void) |
Check whether or not CPUID instruction is supported. More... | |
int | cpuid_supported (uint32_t function) |
Check whether or not CPUID function is supported. More... | |
static void | x86_intel_features (struct x86_features *features) |
Get Intel-defined x86 CPU features. More... | |
static void | x86_amd_features (struct x86_features *features) |
Get AMD-defined x86 CPU features. More... | |
void | x86_features (struct x86_features *features) |
Get x86 CPU features. More... | |
x86 CPU feature detection
Definition in file cpuid.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Check whether or not CPUID instruction is supported.
rc | Return status code |
Definition at line 44 of file cpuid.c.
References __asm__(), colour, CPUID_FLAG, DBGC, and ENOTSUP.
Referenced by cpuid_supported().
int cpuid_supported | ( | uint32_t | function | ) |
Check whether or not CPUID function is supported.
function | CPUID function |
rc | Return status code |
Definition at line 75 of file cpuid.c.
References colour, CPUID_AMD_CHECK_MASK, CPUID_EXTENDED, CPUID_HYPERVISOR, cpuid_instruction_supported(), DBGC, discard_c, EINVAL, ENOTTY, and rc.
Referenced by cpuid_settings_fetch(), rdtsc_probe(), x86_amd_features(), and x86_intel_features().
|
static |
Get Intel-defined x86 CPU features.
features | x86 CPU features to fill in |
Definition at line 116 of file cpuid.c.
References CPUID_FEATURES, cpuid_supported(), DBGC, features, and rc.
Referenced by x86_features().
|
static |
Get AMD-defined x86 CPU features.
features | x86 CPU features to fill in |
Definition at line 140 of file cpuid.c.
References CPUID_AMD_FEATURES, cpuid_supported(), DBGC, features, and rc.
Referenced by x86_features().
void x86_features | ( | struct x86_features * | features | ) |
Get x86 CPU features.
features | x86 CPU features to fill in |
Definition at line 163 of file cpuid.c.
References features, memset(), x86_amd_features(), and x86_intel_features().
Referenced by check_fxsr(), cpuid_exec(), hv_check_hv(), rdrand_entropy_enable(), and rtc_entropy_enable().