45 unsigned long original;
46 unsigned long inverted;
59 :
"=&r" ( original ),
"=&r" ( inverted )
61 if ( ! ( ( original ^ inverted ) &
CPUID_FLAG ) ) {
62 DBGC (
colour,
"CPUID instruction is not supported\n" );
88 &max_function, &discard_b, &
discard_c, &discard_d );
96 DBGC (
colour,
"CPUID invalid maximum function %#08x\n",
102 if (
function > max_function ) {
103 DBGC (
colour,
"CPUID function %#08x not supported\n",
123 DBGC (
features,
"CPUID has no Intel-defined features\n" );
130 DBGC (
features,
"CPUID Intel features: %%ecx=%08x, %%edx=%08x\n",
147 DBGC (
features,
"CPUID has no AMD-defined features\n" );
154 DBGC (
features,
"CPUID AMD features: %%ecx=%08x, %%edx=%08x\n",
int cpuid_supported(uint32_t function)
Check whether or not CPUID function is supported.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
#define EINVAL
Invalid argument.
struct arbelprm_rc_send_wqe rc
#define CPUID_FEATURES
Get standard features.
static void x86_amd_features(struct x86_features *features)
Get AMD-defined x86 CPU features.
#define colour
Colour for debug messages.
#define CPUID_HYPERVISOR
CPUID hypervisor function.
#define CPUID_AMD_CHECK_MASK
Extended function existence check mask.
void x86_features(struct x86_features *features)
Get x86 CPU features.
static void x86_intel_features(struct x86_features *features)
Get Intel-defined x86 CPU features.
#define ENOTSUP
Operation not supported.
#define CPUID_FLAG
CPUID support flag.
static int cpuid_instruction_supported(void)
Check whether or not CPUID instruction is supported.
x86 CPU feature detection
uint32_t features
Supported features.
__asm__(".section \".rodata\", \"a\", " PROGBITS "\n\t" "\nprivate_key_data:\n\t" ".size private_key_data, ( . - private_key_data )\n\t" ".equ private_key_len, ( . - private_key_data )\n\t" ".previous\n\t")
#define ENOTTY
Inappropriate I/O control operation.
#define CPUID_EXTENDED
CPUID extended function.
#define CPUID_AMD_FEATURES
Get extended features.
void * memset(void *dest, int character, size_t len) __nonnull