OpenCores
URL https://opencores.org/ocsvn/c0or1k/c0or1k/trunk

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [docs/] [man/] [man7/] [kip.7] - Rev 2

Compare with Previous | Blame | View Log

.TH KIP 7 2009-11-07 "Codezero" "Codezero Programmer's Manual"
.SH NAME
.nf
.BR "Kernel Interface Page (KIP)" " - Overview of KIP in Codezero"

.SH SYNOPSIS
.nf
.B #include <l4/api/kip.h>


.SH DESCRIPTION
The kernel interface page acts as a read-only identification structure for system-level information. Information about the microkernel version, api, and various fundamental configuration flags may be obtained via this page. Another purpose of this page is to supply system call addresses to userspace during initialization. Since the system call offsets are discovered at run-time this way, the system reserves the flexibility of changing system call offsets in the future.

KIP also provides the address of the thread-local UTCB address, and the value of this field dynamically changes as each thread becomes runnable. The KIP structure is defined as follows:
.nf
.B struct kip {
           /* System descriptions */
.BI "      u32 " "magic" ";"
.BI "      u16 " "version_rsrv" ";"
.BI "      u8  " "api_subversion" ";"
.BI "      u8  " "api_version" ";"
.BI "      u32 " "api_flags" ";"
.BI ""
           /* Addresses of various avaiable System calls */
.BI "      u32 " "container_control" ";"
.BI "      u32 " "time" ";"
.BI "      u32 " "irq_control" ";"
.BI "      u32 " "thread_control" ";"
.BI "      u32 " "ipc_control" ";"
.BI "      u32 " "map" ";"
.BI "      u32 " "ipc" ";"
.BI "      u32 " "capability_control" ";"
.BI "      u32 " "unmap" ";"
.BI "      u32 " "exchange_registers" ";"
.BI "      u32 " "thread_switch" ";"
.BI "      u32 " "schedule" ";"
.BI "      u32 " "getid" ";"
.BI "      u32 " "mutex_control" ";"
.BI "      u32 " "arch_syscall0" ";"
.BI "      u32 " "arch_syscall1" ";"
.BI "      u32 " "arch_syscall2" ";"
.BI ""
           /* UTCB address field */
.BI "      u32 " "utcb" ";"
.BI ""
           /* Brief Description of Kernel */
.BI "      struct " "kernel_descriptor kdesc" ";"
.B };

.TP
.fi
.I magic
denotes the magic key of this kernel build.

.TP
.fi
.I version_rsrv
reserved for future use.

.TP
.fi
.I api_subversion
denotes the sub-version of API in use.

.TP
.fi
.I api_version
denotes the version of API in use.

.TP
.fi
.I api_flags
denotes the flags corresponding to this api verison.

.TP
.fi
.I container_control
address of l4_container_control system call.

.TP
.fi
.I time
address of l4_time system call.

.TP
.fi
.I irq_control
address of l4_irq_control system call.

.TP
.fi
.I thread_control
address of l4_thread_control system call.

.TP
.fi
.I ipc_control
address of l4_ipc_control system call.

.TP
.fi
.I map
address of l4_map system call.

.TP
.fi
.I ipc
address of l4_ipc system call.

.TP
.fi
.I capability_control
address of l4_capability_control system call.

.TP
.fi
.I unmap
address of l4_unmap system call.

.TP
.fi
.I exchange_registers
address of l4_exchange_registers system call.

.TP
.fi
.I thread_switch
address of l4_thread_switch system call.

.TP
.fi
.I schedule
address of l4_schedule system call.

.TP
.fi
.I getid
address of l4_getid system call.

.TP
.fi
.I mutex_control
address of l4_mutex_control system call.

.TP
.fi
.I arch_syscall0
address of l4_arch_syscall0 system call, a template for adding new system call to codezero.

.TP
.fi
.I arch_syscall1
address of l4_arch_syscall1 system call, a template for adding new system call to codezero.

.TP
.fi
.I arch_syscall2
address of l4_arch_syscall2 system call, a template for adding new system call to codezero.

.TP
.fi
.I utcb
address of utcb for this thread.

.in 8
.SH L4 USERSPACE LIBRARY
.nf
.BI ""
/* Functions to get the address of kernel interface page */
.BI "static inline void * "
.BI "l4_kernel_interface(unsigned int " "*api_version" ", unsigned int " "*api_flags" ", unsigned int " "*kernel_id" ");"

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.