Changes in contrib/arch/kernel/kernel.adl [6d4c549:8c52f66] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
contrib/arch/kernel/kernel.adl
r6d4c549 r8c52f66 3 3 *****************************/ 4 4 5 interface sys_klog {5 interface kernel_klog { 6 6 /* Print using kernel facility */ 7 7 unative_t sys_klog(int fd, const void *buf, size_t size); … … 10 10 }; 11 11 12 interface sys_console {12 interface kernel_console { 13 13 /* Enable kernel console */ 14 u native_t sys_debug_enable_console(void);14 uintptr_t sys_debug_enable_console(void); 15 15 16 16 /* Disable kernel console */ 17 unative_t sys_debug_disable_console(void); 18 protocol: 19 ( 20 ?sys_debug_enable_console + 21 ?sys_debug_disable_console 22 )* 23 }; 24 25 interface sys_tls { 17 uintptr_t sys_debug_disable_console(void); 18 protocol: 19 (?sys_debug_enable_console + ?sys_debug_disable_console)* 20 }; 21 22 interface kernel_tls { 26 23 /* Set thread-local storage pointer (on architectures where kernel mode is required) */ 27 24 unative_t sys_tls_set(unative_t addr); … … 30 27 }; 31 28 32 interface sys_thread {29 interface kernel_thread { 33 30 /* Create new thread */ 34 31 unative_t sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name, size_t name_len, thread_id_t *uspace_thread_id); … … 40 37 unative_t sys_thread_get_id(thread_id_t *uspace_thread_id); 41 38 protocol: 42 ( 43 ?sys_thread_create + 44 ?sys_thread_get_id + 45 ?sys_thread_exit 46 )* 47 }; 48 49 interface sys_task { 39 (?sys_thread_create + ?sys_thread_get_id)* ; ?sys_thread_exit 40 }; 41 42 interface kernel_task { 50 43 /* Set name fo the current task */ 51 44 unative_t sys_task_set_name(const char *uspace_name, size_t name_len); … … 54 47 unative_t sys_task_get_id(task_id_t *uspace_task_id); 55 48 protocol: 56 ( 57 ?sys_task_set_name + 58 ?sys_task_get_id 59 )* 60 }; 61 62 interface sys_program { 49 (?sys_task_set_name + ?sys_task_get_id)* 50 }; 51 52 interface kernel_program { 63 53 /* Spawn a new instance of clonable loader service */ 64 54 unative_t sys_program_spawn_loader(char *uspace_name, size_t name_len); … … 67 57 }; 68 58 69 interface sys_futex {59 interface kernel_futex { 70 60 /* Sleep in a futex wait queue */ 71 61 unative_t sys_futex_sleep_timeout(uintptr_t uaddr, uint32_t usec, int flags); … … 74 64 unative_t sys_futex_wakeup(uintptr_t uaddr); 75 65 protocol: 76 ( 77 ?sys_futex_sleep_timeout + 78 ?sys_futex_wakeup 79 )* 80 }; 81 82 interface sys_smc { 66 (?sys_futex_sleep_timeout + ?sys_futex_wakeup)* 67 }; 68 69 interface kernel_smc { 83 70 /* Enforce self-modifying code cache coherency */ 84 71 unative_t sys_smc_coherence(uintptr_t va, size_t size); … … 87 74 }; 88 75 89 interface sys_as {76 interface kernel_as { 90 77 /* Create new address space area */ 91 78 unative_t sys_as_area_create(uintptr_t address, size_t size, int flags); … … 100 87 unative_t sys_as_area_destroy(uintptr_t address); 101 88 protocol: 102 ( 103 ?sys_as_area_create + 104 ?sys_as_area_resize + 105 ?sys_as_area_change_flags + 106 ?sys_as_area_destroy 107 )* 108 }; 109 110 interface sys_ipc { 89 (?sys_as_area_create + ?sys_as_area_resize + ?sys_as_area_change_flags + ?sys_as_area_destroy)* 90 }; 91 92 interface kernel_ipc { 111 93 /* Fast synchronous IPC call */ 112 94 unative_t sys_ipc_call_sync_fast(unative_t phoneid, unative_t method, unative_t arg1, unative_t arg2, unative_t arg3, ipc_data_t *data); … … 142 124 unative_t sys_ipc_poke(void); 143 125 protocol: 144 ( 145 ?sys_ipc_call_sync_fast + 146 ?sys_ipc_call_sync_slow + 147 ?sys_ipc_call_async_fast + 148 ?sys_ipc_call_async_slow + 149 ?sys_ipc_forward_fast + 150 ?sys_ipc_forward_slow + 151 ?sys_ipc_answer_fast + 152 ?sys_ipc_answer_slow + 153 ?sys_ipc_hangup + 154 ?sys_ipc_wait_for_call + 155 ?sys_ipc_poke 156 )* 157 }; 158 159 interface sys_event { 126 (?sys_ipc_call_sync_fast + ?sys_ipc_call_sync_slow + ?sys_ipc_call_async_fast + ?sys_ipc_call_async_slow + ?sys_ipc_forward_fast + ?sys_ipc_forward_slow + ?sys_ipc_answer_fast + ?sys_ipc_answer_slow + ?sys_ipc_hangup + ?sys_ipc_wait_for_call + ?sys_ipc_poke)* 127 }; 128 129 interface kernel_event { 160 130 /* Subscribe to kernel event notifications */ 161 131 unative_t sys_event_subscribe(unative_t evno, unative_t method); … … 164 134 }; 165 135 166 interface sys_cap {136 interface kernel_cap { 167 137 /* Grant capabilities to a task */ 168 138 unative_t sys_cap_grant(sysarg64_t *uspace_taskid_arg, cap_t caps); … … 171 141 unative_t sys_cap_revoke(sysarg64_t *uspace_taskid_arg, cap_t caps); 172 142 protocol: 173 ( 174 ?sys_cap_grant + 175 ?sys_cap_rewoke 176 )* 177 }; 178 179 interface sys_ddi { 143 (?sys_cap_grant + ?sys_cap_rewoke)* 144 }; 145 146 interface kernel_ddi { 180 147 /* Enable access I/O address space for the current task */ 181 148 unative_t sys_enable_iospace(ddi_ioarg_t *uspace_io_arg); … … 196 163 unative_t sys_ipc_unregister_irq(inr_t inr, devno_t devno); 197 164 protocol: 198 ( 199 ?sys_enable_iospace + 200 ?sys_physmem_map + 201 ?sys_device_assign_devno + 202 ?sys_preempt_control + 203 ?sys_ipc_register_irq + 204 ?sys_ipc_unregister_irq 205 )* 206 }; 207 208 interface sys_sysinfo { 165 (?sys_enable_iospace + ?sys_physmem_map + ?sys_device_assign_devno + ?sys_preempt_control + ?sys_ipc_register_irq + ?sys_ipc_unregister_irq)* 166 }; 167 168 interface kernel_sysinfo { 209 169 /* Check for sysinfo key validity */ 210 170 unative_t sys_sysinfo_valid(unative_t ptr, unative_t len); … … 213 173 unative_t sys_sysinfo_value(unatice_t ptr, unative_t len); 214 174 protocol: 215 ( 216 ?sys_sysinfo_valid + 217 ?sys_sysinfo_value 218 )* 219 }; 220 221 interface sys_debug { 175 (?sys_sysinfo_valid + ?sys_sysinfo_value)* 176 }; 177 178 interface kernel_debug { 222 179 /* Connect to the kernel debugging answerbox of a given task */ 223 180 unative_t sys_ipc_connect_kbox(sysarg64_t *uspace_taskid_arg); … … 231 188 *****************************************************/ 232 189 233 frame sys_console {234 provides: 235 sys_klog sys_klog;236 sys_console sys_console;237 }; 238 239 frame sys_proc {240 provides: 241 sys_tls sys_tls;242 sys_thread sys_thread;243 sys_task sys_task;244 sys_program sys_program;245 }; 246 247 frame sys_synch {248 provides: 249 sys_futex sys_futex;250 sys_smc sys_smc;251 }; 252 253 frame sys_mm {254 provides: 255 sys_as sys_as;256 }; 257 258 frame sys_ipc {259 provides: 260 sys_ipc sys_ipc;261 sys_event sys_event;262 }; 263 264 frame sys_security {265 provides: 266 sys_cap sys_cap;267 }; 268 269 frame sys_ddi {270 provides: 271 sys_ddi sys_ddi;272 }; 273 274 frame sys_sysinfo {275 provides: 276 sys_sysinfo sys_sysinfo;277 }; 278 279 frame sys_debug {280 provides: 281 sys_debug sys_debug;190 frame kernel_console { 191 provides: 192 kernel_klog kernel_klog; 193 kernel_console kernel_console; 194 }; 195 196 frame kernel_proc { 197 provides: 198 kernel_tls kernel_tls; 199 kernel_thread kernel_thread; 200 kernel_task kernel_task; 201 kernel_program kernel_program; 202 }; 203 204 frame kernel_synch { 205 provides: 206 kernel_futex kernel_futex; 207 kernel_smc kernel_smc; 208 }; 209 210 frame kernel_mm { 211 provides: 212 kernel_as kernel_as; 213 }; 214 215 frame kernel_ipc { 216 provides: 217 kernel_ipc kernel_ipc; 218 kernel_event kernel_event; 219 }; 220 221 frame kernel_security { 222 provides: 223 kernel_cap kernel_cap; 224 }; 225 226 frame kernel_ddi { 227 provides: 228 kernel_ddi kernel_ddi; 229 }; 230 231 frame kernel_sysinfo { 232 provides: 233 kernel_sysinfo kernel_sysinfo; 234 }; 235 236 frame kernel_debug { 237 provides: 238 kernel_debug kernel_debug; 282 239 }; 283 240 … … 288 245 289 246 architecture kernel { 290 inst sys_console sys_console;291 inst sys_proc sys_proc;292 inst sys_synch sys_synch;293 inst sys_mm sys_mm;294 inst sys_ipc sys_ipc;295 inst sys_security sys_security;296 inst sys_ddi sys_ddi;297 inst sys_sysinfo sys_sysinfo;298 inst sys_debug sys_debug;247 inst kernel_console kernel_console; 248 inst kernel_proc kernel_proc; 249 inst kernel_synch kernel_synch; 250 inst kernel_mm kernel_mm; 251 inst kernel_ipc kernel_ipc; 252 inst kernel_security kernel_security; 253 inst kernel_ddi kernel_ddi; 254 inst kernel_sysinfo kernel_sysinfo; 255 inst kernel_debug kernel_debug; 299 256 300 delegate sys_klog to sys_console:sys_klog;301 delegate sys_console to sys_console:sys_console;302 delegate sys_tls to sys_proc:sys_tls;303 delegate sys_thread to sys_proc:sys_thread;304 delegate sys_task to sys_proc:sys_task;305 delegate sys_program to sys_proc:sys_program;306 delegate sys_futex to sys_synch:sys_futex;307 delegate sys_smc to sys_synch:sys_smc;308 delegate sys_as to sys_mm:sys_as;309 delegate sys_ipc to sys_ipc:sys_ipc;310 delegate sys_event to sys_ipc:sys_event;311 delegate sys_cap to sys_security:sys_cap;312 delegate sys_ddi to sys_ddi:sys_ddi;313 delegate sys_sysinfo to sys_sysinfo:sys_sysinfo;314 delegate sys_debug to sys_debug:sys_debug;315 }; 257 delegate kernel_klog to kernel_console:kernel_klog; 258 delegate kernel_console to kernel_console:kernel_console; 259 delegate kernel_tls to kernel_proc:kernel_tls; 260 delegate kernel_thread to kernel_proc:kernel_thread; 261 delegate kernel_task to kernel_proc:kernel_task; 262 delegate kernel_program to kernel_proc:kernel_program; 263 delegate kernel_futex to kernel_synch:kernel_futex; 264 delegate kernel_smc to kernel_synch:kernel_smc; 265 delegate kernel_as to kernel_mm:kernel_as; 266 delegate kernel_ipc to kernel_ipc:kernel_sys; 267 delegate kernel_event to kernel_ipc:kernel_event; 268 delegate kernel_cap to kernel_security:kernel_cap; 269 delegate kernel_ddi to kernel_ddi:kernel_ddi; 270 delegate kernel_sysinfo to kernel_sysinfo:kernel_sysinfo; 271 delegate kernel_debug to kernel_debug:kernel_debug; 272 };
Note:
See TracChangeset
for help on using the changeset viewer.