L4Re – L4 Runtime Environment
cpu.h File Reference

CPU related functions. More...

#include <l4/sys/compiler.h>
+ Include dependency graph for cpu.h:

Go to the source code of this file.

Functions

int l4util_cpu_has_cpuid (void)
 Check whether the CPU supports the "cpuid" instruction. More...
 
unsigned int l4util_cpu_capabilities (void)
 Returns the CPU capabilities if the "cpuid" instruction is available. More...
 
unsigned int l4util_cpu_capabilities_nocheck (void)
 Returns the CPU capabilities. More...
 
void l4util_cpu_cpuid (unsigned long mode, unsigned long *eax, unsigned long *ebx, unsigned long *ecx, unsigned long *edx)
 Generic CPUID access function.
 

Detailed Description

CPU related functions.

Author
Frank Mehnert fm3@o.nosp@m.s.in.nosp@m.f.tu-.nosp@m.dres.nosp@m.den.d.nosp@m.e

Definition in file cpu.h.

Function Documentation

◆ l4util_cpu_capabilities()

unsigned int l4util_cpu_capabilities ( void  )
inline

Returns the CPU capabilities if the "cpuid" instruction is available.

Returns
CPU capabilities if the "cpuid" instruction is available, 0 if the "cpuid" instruction is not supported.

Definition at line 118 of file cpu.h.

References l4util_cpu_capabilities_nocheck(), and l4util_cpu_has_cpuid().

+ Here is the call graph for this function:

◆ l4util_cpu_capabilities_nocheck()

unsigned int l4util_cpu_capabilities_nocheck ( void  )
inline

Returns the CPU capabilities.

Returns
CPU capabilities.

Definition at line 107 of file cpu.h.

References l4util_cpu_cpuid().

+ Here is the call graph for this function:

◆ l4util_cpu_has_cpuid()

int l4util_cpu_has_cpuid ( void  )
inline

Check whether the CPU supports the "cpuid" instruction.

Returns
1 if it has, 0 if it has not

Definition at line 66 of file cpu.h.