L4Re Operating System Framework
Interface and Usage Documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
kip.h File Reference

Kernel Info Page access functions. More...

#include <l4/sys/compiler.h>
#include <l4/sys/l4int.h>
#include <l4/sys/__kip-arch.h>
#include <l4/sys/__kip-64bit.h>
+ Include dependency graph for kip.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define L4_KERNEL_INFO_MAGIC   (0x4BE6344CL) /* "L4µK" */
 Kernel Info Page identifier ("L4µK").
 
#define l4_kip_for_each_feature(s)    for (s += __builtin_strlen(s) + 1; *s; s += __builtin_strlen(s) + 1)
 Cycle through kernel features given in the KIP.
 

Enumerations

enum  { L4_KIP_OFFS_READ_US = 0x900 , L4_KIP_OFFS_READ_NS = 0x980 }
 

Functions

l4_kernel_info_t const * l4_kip (void) L4_NOTHROW
 Get Kernel Info Page.
 
l4_umword_t l4_kip_version (l4_kernel_info_t const *kip) L4_NOTHROW
 Get the kernel version.
 
const char * l4_kip_version_string (l4_kernel_info_t const *kip) L4_NOTHROW
 Get the kernel version string.
 
int l4_kernel_info_version_offset (l4_kernel_info_t const *kip) L4_NOTHROW
 Return offset in bytes of version_strings relative to the KIP base.
 
l4_cpu_time_t l4_kip_clock (l4_kernel_info_t const *kip) L4_NOTHROW
 Return clock value from the KIP.
 
l4_umword_t l4_kip_clock_lw (l4_kernel_info_t const *kip) L4_NOTHROW
 Return least significant machine word of clock value from the KIP.
 
l4_uint64_t l4_kip_clock_ns (l4_kernel_info_t const *kip) L4_NOTHROW
 Return current clock using the KIP in nanoseconds.
 
int l4_kip_kernel_has_feature (l4_kernel_info_t const *kip, char const *str)
 Check if kernel supports a feature.
 

Detailed Description

Kernel Info Page access functions.

Definition in file kip.h.

Macro Definition Documentation

◆ l4_kip_for_each_feature

#define l4_kip_for_each_feature (   s)     for (s += __builtin_strlen(s) + 1; *s; s += __builtin_strlen(s) + 1)

Cycle through kernel features given in the KIP.

Cycles through all KIP kernel feature strings. s must be a character pointer (char const *) initialized with l4_kip_version_string().

Definition at line 230 of file kip.h.

Function Documentation

◆ l4_kip_kernel_has_feature()

int l4_kip_kernel_has_feature ( l4_kernel_info_t const *  kip,
char const *  str 
)
inline

Check if kernel supports a feature.

Parameters
kipPointer to the kernel info page (KIP).
strFeature name to check.
Returns
1 if the kernel supports the feature, 0 if not.

Checks the feature field in the KIP for the given string.

Definition at line 244 of file kip.h.

References l4_kip_for_each_feature, and l4_kip_version_string().

+ Here is the call graph for this function: