Changes in contrib/arch/kernel/kernel.adl [8c52f66:6d4c549] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
contrib/arch/kernel/kernel.adl
r8c52f66 r6d4c549 3 3 *****************************/ 4 4 5 interface kernel_klog {5 interface sys_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 kernel_console {12 interface sys_console { 13 13 /* Enable kernel console */ 14 u intptr_t sys_debug_enable_console(void);14 unative_t sys_debug_enable_console(void); 15 15 16 16 /* Disable kernel console */ 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 { 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 { 23 26 /* Set thread-local storage pointer (on architectures where kernel mode is required) */ 24 27 unative_t sys_tls_set(unative_t addr); … … 27 30 }; 28 31 29 interface kernel_thread {32 interface sys_thread { 30 33 /* Create new thread */ 31 34 unative_t sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name, size_t name_len, thread_id_t *uspace_thread_id); … … 37 40 unative_t sys_thread_get_id(thread_id_t *uspace_thread_id); 38 41 protocol: 39 (?sys_thread_create + ?sys_thread_get_id)* ; ?sys_thread_exit 40 }; 41 42 interface kernel_task { 42 ( 43 ?sys_thread_create + 44 ?sys_thread_get_id + 45 ?sys_thread_exit 46 )* 47 }; 48 49 interface sys_task { 43 50 /* Set name fo the current task */ 44 51 unative_t sys_task_set_name(const char *uspace_name, size_t name_len); … … 47 54 unative_t sys_task_get_id(task_id_t *uspace_task_id); 48 55 protocol: 49 (?sys_task_set_name + ?sys_task_get_id)* 50 }; 51 52 interface kernel_program { 56 ( 57 ?sys_task_set_name + 58 ?sys_task_get_id 59 )* 60 }; 61 62 interface sys_program { 53 63 /* Spawn a new instance of clonable loader service */ 54 64 unative_t sys_program_spawn_loader(char *uspace_name, size_t name_len); … … 57 67 }; 58 68 59 interface kernel_futex {69 interface sys_futex { 60 70 /* Sleep in a futex wait queue */ 61 71 unative_t sys_futex_sleep_timeout(uintptr_t uaddr, uint32_t usec, int flags); … … 64 74 unative_t sys_futex_wakeup(uintptr_t uaddr); 65 75 protocol: 66 (?sys_futex_sleep_timeout + ?sys_futex_wakeup)* 67 }; 68 69 interface kernel_smc { 76 ( 77 ?sys_futex_sleep_timeout + 78 ?sys_futex_wakeup 79 )* 80 }; 81 82 interface sys_smc { 70 83 /* Enforce self-modifying code cache coherency */ 71 84 unative_t sys_smc_coherence(uintptr_t va, size_t size); … … 74 87 }; 75 88 76 interface kernel_as {89 interface sys_as { 77 90 /* Create new address space area */ 78 91 unative_t sys_as_area_create(uintptr_t address, size_t size, int flags); … … 87 100 unative_t sys_as_area_destroy(uintptr_t address); 88 101 protocol: 89 (?sys_as_area_create + ?sys_as_area_resize + ?sys_as_area_change_flags + ?sys_as_area_destroy)* 90 }; 91 92 interface kernel_ipc { 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 { 93 111 /* Fast synchronous IPC call */ 94 112 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); … … 124 142 unative_t sys_ipc_poke(void); 125 143 protocol: 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 { 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 { 130 160 /* Subscribe to kernel event notifications */ 131 161 unative_t sys_event_subscribe(unative_t evno, unative_t method); … … 134 164 }; 135 165 136 interface kernel_cap {166 interface sys_cap { 137 167 /* Grant capabilities to a task */ 138 168 unative_t sys_cap_grant(sysarg64_t *uspace_taskid_arg, cap_t caps); … … 141 171 unative_t sys_cap_revoke(sysarg64_t *uspace_taskid_arg, cap_t caps); 142 172 protocol: 143 (?sys_cap_grant + ?sys_cap_rewoke)* 144 }; 145 146 interface kernel_ddi { 173 ( 174 ?sys_cap_grant + 175 ?sys_cap_rewoke 176 )* 177 }; 178 179 interface sys_ddi { 147 180 /* Enable access I/O address space for the current task */ 148 181 unative_t sys_enable_iospace(ddi_ioarg_t *uspace_io_arg); … … 163 196 unative_t sys_ipc_unregister_irq(inr_t inr, devno_t devno); 164 197 protocol: 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 { 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 { 169 209 /* Check for sysinfo key validity */ 170 210 unative_t sys_sysinfo_valid(unative_t ptr, unative_t len); … … 173 213 unative_t sys_sysinfo_value(unatice_t ptr, unative_t len); 174 214 protocol: 175 (?sys_sysinfo_valid + ?sys_sysinfo_value)* 176 }; 177 178 interface kernel_debug { 215 ( 216 ?sys_sysinfo_valid + 217 ?sys_sysinfo_value 218 )* 219 }; 220 221 interface sys_debug { 179 222 /* Connect to the kernel debugging answerbox of a given task */ 180 223 unative_t sys_ipc_connect_kbox(sysarg64_t *uspace_taskid_arg); … … 188 231 *****************************************************/ 189 232 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;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; 239 282 }; 240 283 … … 245 288 246 289 architecture kernel { 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;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; 256 299 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 }; 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 };
Note:
See TracChangeset
for help on using the changeset viewer.