L4Re – L4 Runtime Environment
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").
 

Functions

l4_umword_t l4_kip_version (l4_kernel_info_t *kip) L4_NOTHROW
 Get the kernel version. More...
 
const char * l4_kip_version_string (l4_kernel_info_t *kip) L4_NOTHROW
 Get the kernel version string. More...
 
int l4_kernel_info_version_offset (l4_kernel_info_t *kip) L4_NOTHROW
 Return offset in bytes of version_strings relative to the KIP base. More...
 
l4_cpu_time_t l4_kip_clock (l4_kernel_info_t *kip) L4_NOTHROW
 Return clock value from the KIP. More...
 
l4_umword_t l4_kip_clock_lw (l4_kernel_info_t *kip) L4_NOTHROW
 Return least significant machine word of clock value from the KIP. More...
 

Detailed Description

Kernel Info Page access functions.

Definition in file kip.h.

Function Documentation

◆ l4_kernel_info_version_offset()

int l4_kernel_info_version_offset ( l4_kernel_info_t kip)
inline

Return offset in bytes of version_strings relative to the KIP base.

Parameters
kipPointer to the kernel info page (KIP).
Returns
offset of version_strings relative to the KIP base address, in bytes.

Definition at line 138 of file kip.h.

Referenced by l4_kip_version_string().

+ Here is the caller graph for this function:

◆ l4_kip_clock()

l4_cpu_time_t l4_kip_clock ( l4_kernel_info_t kip)
inline

Return clock value from the KIP.

Parameters
kipPointer to the kernel info page (KIP).
Returns
Value of the clock field in the KIP.

The KIP clock always contains the current (relative) time in micro seconds independently of the CPU frequency. The clock is only guaranteed to be accurate within the scheduling granularity announced in the KIP.

Definition at line 142 of file kip.h.

References l4_mb().

Referenced by L4::Poll_timeout_kipclock::set(), and L4::Poll_timeout_kipclock::test().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ l4_kip_clock_lw()

l4_umword_t l4_kip_clock_lw ( l4_kernel_info_t kip)
inline

Return least significant machine word of clock value from the KIP.

Parameters
kipPointer to the kernel info page (KIP).
Returns
Lower machine word of clock value from the KIP.

Definition at line 164 of file kip.h.

References l4_mb().

+ Here is the call graph for this function:

◆ l4_kip_version()

l4_umword_t l4_kip_version ( l4_kernel_info_t kip)
inline

Get the kernel version.

Parameters
kipKernel Info Page.
Returns
Kernel version string. 0 if KIP could not be mapped.

Definition at line 130 of file kip.h.

◆ l4_kip_version_string()

const char * l4_kip_version_string ( l4_kernel_info_t kip)
inline

Get the kernel version string.

Parameters
kipKernel Info Page.
Returns
Kernel version string.

Definition at line 134 of file kip.h.

References l4_kernel_info_version_offset().

+ Here is the call graph for this function: