15 #ifndef __L4_UTIL_CPU_H 16 #define __L4_UTIL_CPU_H 55 unsigned long *eax,
unsigned long *ebx,
56 unsigned long *ecx,
unsigned long *edx);
60 l4util_cpu_pause(
void)
62 __asm__ __volatile__ (
"rep; nop");
70 asm volatile(
"pushl %%ebx \t\n" 73 "movl %%eax, %%ebx \t\n" 74 "xorl $0x200000, %%eax \t\n" 79 "xorl %%ebx, %%eax \t\n" 87 return eax & 0x200000;
92 unsigned long *eax,
unsigned long *ebx,
93 unsigned long *ecx,
unsigned long *edx)
95 asm volatile(
"pushl %%ebx \t\n" 97 "mov %%ebx, %%esi \t\n" 106 L4_INLINE
unsigned int 109 unsigned long dummy, capability;
117 L4_INLINE
unsigned int void l4util_cpu_cpuid(unsigned long mode, unsigned long *eax, unsigned long *ebx, unsigned long *ecx, unsigned long *edx)
Generic CPUID access function.
#define EXTERN_C_END
End section with C types and functions.
unsigned int l4util_cpu_capabilities(void)
Returns the CPU capabilities if the "cpuid" instruction is available.
L4 compiler related defines.
#define EXTERN_C_BEGIN
Start section with C types and functions.
unsigned int l4util_cpu_capabilities_nocheck(void)
Returns the CPU capabilities.
int l4util_cpu_has_cpuid(void)
Check whether the CPU supports the "cpuid" instruction.