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

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [docs/] [man/] [man7/] [kip.7] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
.TH KIP 7 2009-11-07 "Codezero" "Codezero Programmer's Manual"
2
.SH NAME
3
.nf
4
.BR "Kernel Interface Page (KIP)" " - Overview of KIP in Codezero"
5
 
6
.SH SYNOPSIS
7
.nf
8
.B #include 
9
 
10
 
11
.SH DESCRIPTION
12
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.
13
 
14
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:
15
.nf
16
.B struct kip {
17
           /* System descriptions */
18
.BI "      u32 " "magic" ";"
19
.BI "      u16 " "version_rsrv" ";"
20
.BI "      u8  " "api_subversion" ";"
21
.BI "      u8  " "api_version" ";"
22
.BI "      u32 " "api_flags" ";"
23
.BI ""
24
           /* Addresses of various avaiable System calls */
25
.BI "      u32 " "container_control" ";"
26
.BI "      u32 " "time" ";"
27
.BI "      u32 " "irq_control" ";"
28
.BI "      u32 " "thread_control" ";"
29
.BI "      u32 " "ipc_control" ";"
30
.BI "      u32 " "map" ";"
31
.BI "      u32 " "ipc" ";"
32
.BI "      u32 " "capability_control" ";"
33
.BI "      u32 " "unmap" ";"
34
.BI "      u32 " "exchange_registers" ";"
35
.BI "      u32 " "thread_switch" ";"
36
.BI "      u32 " "schedule" ";"
37
.BI "      u32 " "getid" ";"
38
.BI "      u32 " "mutex_control" ";"
39
.BI "      u32 " "arch_syscall0" ";"
40
.BI "      u32 " "arch_syscall1" ";"
41
.BI "      u32 " "arch_syscall2" ";"
42
.BI ""
43
           /* UTCB address field */
44
.BI "      u32 " "utcb" ";"
45
.BI ""
46
           /* Brief Description of Kernel */
47
.BI "      struct " "kernel_descriptor kdesc" ";"
48
.B };
49
 
50
.TP
51
.fi
52
.I magic
53
denotes the magic key of this kernel build.
54
 
55
.TP
56
.fi
57
.I version_rsrv
58
reserved for future use.
59
 
60
.TP
61
.fi
62
.I api_subversion
63
denotes the sub-version of API in use.
64
 
65
.TP
66
.fi
67
.I api_version
68
denotes the version of API in use.
69
 
70
.TP
71
.fi
72
.I api_flags
73
denotes the flags corresponding to this api verison.
74
 
75
.TP
76
.fi
77
.I container_control
78
address of l4_container_control system call.
79
 
80
.TP
81
.fi
82
.I time
83
address of l4_time system call.
84
 
85
.TP
86
.fi
87
.I irq_control
88
address of l4_irq_control system call.
89
 
90
.TP
91
.fi
92
.I thread_control
93
address of l4_thread_control system call.
94
 
95
.TP
96
.fi
97
.I ipc_control
98
address of l4_ipc_control system call.
99
 
100
.TP
101
.fi
102
.I map
103
address of l4_map system call.
104
 
105
.TP
106
.fi
107
.I ipc
108
address of l4_ipc system call.
109
 
110
.TP
111
.fi
112
.I capability_control
113
address of l4_capability_control system call.
114
 
115
.TP
116
.fi
117
.I unmap
118
address of l4_unmap system call.
119
 
120
.TP
121
.fi
122
.I exchange_registers
123
address of l4_exchange_registers system call.
124
 
125
.TP
126
.fi
127
.I thread_switch
128
address of l4_thread_switch system call.
129
 
130
.TP
131
.fi
132
.I schedule
133
address of l4_schedule system call.
134
 
135
.TP
136
.fi
137
.I getid
138
address of l4_getid system call.
139
 
140
.TP
141
.fi
142
.I mutex_control
143
address of l4_mutex_control system call.
144
 
145
.TP
146
.fi
147
.I arch_syscall0
148
address of l4_arch_syscall0 system call, a template for adding new system call to codezero.
149
 
150
.TP
151
.fi
152
.I arch_syscall1
153
address of l4_arch_syscall1 system call, a template for adding new system call to codezero.
154
 
155
.TP
156
.fi
157
.I arch_syscall2
158
address of l4_arch_syscall2 system call, a template for adding new system call to codezero.
159
 
160
.TP
161
.fi
162
.I utcb
163
address of utcb for this thread.
164
 
165
.in 8
166
.SH L4 USERSPACE LIBRARY
167
.nf
168
.BI ""
169
/* Functions to get the address of kernel interface page */
170
.BI "static inline void * "
171
.BI "l4_kernel_interface(unsigned int " "*api_version" ", unsigned int " "*api_flags" ", unsigned int " "*kernel_id" ");"
172
 

powered by: WebSVN 2.1.0

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