<< Back to Codezero API Reference

11.) KERNEL INTERFACE PAGE (KIP) Data Structure

 
/* Structure to define kernel versioning and API information */
struct kernel_desc {
	u16 rsrv;
	u8 subid;
	u8 id;
	u16 gendate;
	u16 date_rsrv;
	u16 subsubver;
	u8 subver;
	u8 ver;
	u32 supplier;
} __attribute__((__packed__));
 
/* Experimental KIP with non-standard offsets */
struct kip {
	/* System descriptions */
	u32 magic;
	u16 version_rsrv;
	u8  api_subversion;
	u8  api_version;
	u32 api_flags;
 
        /* System call address fields */
	u32 kmem_control;
	u32 time;
 
	u32 space_control;
	u32 thread_control;
	u32 ipc_control;
	u32 map;
	u32 ipc;
	u32 kread;
	u32 unmap;
	u32 exchange_registers;
	u32 thread_switch;
	u32 schedule;
	u32 getid;
	u32 mutex_control;
 
	u32 arch_syscall0;
	u32 arch_syscall1;
	u32 arch_syscall2;
 
        /* UTCB address field */
	u32 utcb;
 
	struct kernel_desc kdesc;
} __attribute__((__packed__));
Purpose
Operational Model
L4 Userspace Library Functions
 
/* 
 * Returns address of kernel interface page, and sets api version and kernel id 
 * on the arguments obtained from the KIP 
 */
static inline void *
l4_kernel_interface(unsigned int *api_version, unsigned int *api_flags,
		     unsigned int *kernel_id);

<< Back to Codezero API Reference