Changeset e39d7b8 in mainline
- Timestamp:
- 2019-06-17T15:12:44Z (6 years ago)
- Children:
- 64b7854
- Parents:
- ef705e14
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-06-16 17:59:34)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-06-17 15:12:44)
- Files:
-
- 55 edited
Legend:
- Unmodified
- Added
- Removed
-
.gitignore
ref705e14 re39d7b8 421 421 uspace/srv/volsrv/test-volsrv 422 422 uspace/srv/volsrv/volsrv 423 uspace/drv/block/virtio-blk/virtio-blk -
abi/include/_bits/native.h
ref705e14 re39d7b8 56 56 typedef intptr_t native_t; 57 57 58 #ifdef KERNEL 59 60 typedef sysarg_t uspace_addr_t; 61 /* We might implement a way to check validity of the type some day. */ 62 #define uspace_ptr(type) uspace_addr_t 63 #define USPACE_NULL 0 64 65 #else /* !KERNEL */ 66 67 typedef void *uspace_addr_t; 68 #define uspace_ptr(type) type * 69 70 #endif 71 58 72 __HELENOS_DECLS_END; 59 73 -
abi/include/abi/proc/uarg.h
ref705e14 re39d7b8 37 37 38 38 #include <stddef.h> 39 #include <_bits/native.h> 40 41 typedef void (uspace_thread_function_t)(void *); 39 42 40 43 /** Structure passed to uinit kernel thread as argument. */ 41 44 typedef struct uspace_arg { 42 void *uspace_entry;43 void *uspace_stack;45 uspace_addr_t uspace_entry; 46 uspace_addr_t uspace_stack; 44 47 size_t uspace_stack_size; 45 48 46 void (*uspace_thread_function)(void *);47 void *uspace_thread_arg;49 uspace_ptr(uspace_thread_function_t) uspace_thread_function; 50 uspace_addr_t uspace_thread_arg; 48 51 49 struct uspace_arg *uspace_uarg;52 uspace_ptr(struct uspace_arg) uspace_uarg; 50 53 } uspace_arg_t; 51 54 -
kernel/arch/abs32le/src/abs32le.c
ref705e14 re39d7b8 126 126 } 127 127 128 uintptr_t memcpy_from_uspace(void *dst, const void *uspace_src, size_t size)128 uintptr_t memcpy_from_uspace(void *dst, uspace_addr_t uspace_src, size_t size) 129 129 { 130 130 return 0; 131 131 } 132 132 133 uintptr_t memcpy_to_uspace( void *uspace_dst, const void *src, size_t size)133 uintptr_t memcpy_to_uspace(uspace_addr_t uspace_dst, const void *src, size_t size) 134 134 { 135 135 return 0; -
kernel/arch/amd64/src/debug/stacktrace.c
ref705e14 re39d7b8 69 69 bool uspace_frame_pointer_prev(stack_trace_context_t *ctx, uintptr_t *prev) 70 70 { 71 return !copy_from_uspace( (void *)prev,72 (uint64_t *) ctx->fp +FRAME_OFFSET_FP_PREV, sizeof(*prev));71 return !copy_from_uspace(prev, 72 ctx->fp + sizeof(uintptr_t) * FRAME_OFFSET_FP_PREV, sizeof(*prev)); 73 73 } 74 74 75 75 bool uspace_return_address_get(stack_trace_context_t *ctx, uintptr_t *ra) 76 76 { 77 return !copy_from_uspace( (void *)ra,78 (uint64_t *) ctx->fp +FRAME_OFFSET_RA, sizeof(*ra));77 return !copy_from_uspace(ra, 78 ctx->fp + sizeof(uintptr_t) * FRAME_OFFSET_RA, sizeof(*ra)); 79 79 } 80 80 -
kernel/arch/amd64/src/userspace.c
ref705e14 re39d7b8 66 66 "iretq\n" 67 67 :: [udata_des] "i" (GDT_SELECTOR(UDATA_DES) | PL_USER), 68 [stack_top] "r" ( (uint8_t *)kernel_uarg->uspace_stack +68 [stack_top] "r" (kernel_uarg->uspace_stack + 69 69 kernel_uarg->uspace_stack_size), 70 70 [rflags] "r" (rflags), -
kernel/arch/arm32/src/debug/stacktrace.c
ref705e14 re39d7b8 68 68 bool uspace_frame_pointer_prev(stack_trace_context_t *ctx, uintptr_t *prev) 69 69 { 70 return !copy_from_uspace( (void *)prev,71 (uint32_t *) ctx->fp +FRAME_OFFSET_FP_PREV, sizeof(*prev));70 return !copy_from_uspace(prev, 71 ctx->fp + sizeof(uintptr_t) * FRAME_OFFSET_FP_PREV, sizeof(*prev)); 72 72 } 73 73 74 74 bool uspace_return_address_get(stack_trace_context_t *ctx, uintptr_t *ra) 75 75 { 76 return !copy_from_uspace( (void *)ra,77 (uint32_t *) ctx->fp +FRAME_OFFSET_RA, sizeof(*ra));76 return !copy_from_uspace(ra, 77 ctx->fp + sizeof(uintptr_t) * FRAME_OFFSET_RA, sizeof(*ra)); 78 78 } 79 79 -
kernel/arch/arm32/src/userspace.c
ref705e14 re39d7b8 71 71 72 72 /* set first parameter */ 73 ustate.r0 = (uintptr_t)kernel_uarg->uspace_uarg;73 ustate.r0 = kernel_uarg->uspace_uarg; 74 74 75 75 /* %r1 is defined to hold pcb_ptr - set it to 0 */ … … 93 93 94 94 /* set user stack */ 95 ustate.sp = ((uint32_t) kernel_uarg->uspace_stack)+95 ustate.sp = kernel_uarg->uspace_stack + 96 96 kernel_uarg->uspace_stack_size; 97 97 98 98 /* set where uspace execution starts */ 99 ustate.pc = (uintptr_t)kernel_uarg->uspace_entry;99 ustate.pc = kernel_uarg->uspace_entry; 100 100 101 101 /* status register in user mode */ -
kernel/arch/arm64/src/arm64.c
ref705e14 re39d7b8 156 156 157 157 /* Set program entry. */ 158 ELR_EL1_write( (uint64_t)kernel_uarg->uspace_entry);158 ELR_EL1_write(kernel_uarg->uspace_entry); 159 159 160 160 /* Set user stack. */ 161 SP_EL0_write( ((uint64_t)kernel_uarg->uspace_stack +162 kernel_uarg->uspace_stack_size) );161 SP_EL0_write(kernel_uarg->uspace_stack + 162 kernel_uarg->uspace_stack_size); 163 163 164 164 /* Clear Thread ID register. */ -
kernel/arch/arm64/src/debug/stacktrace.c
ref705e14 re39d7b8 68 68 bool uspace_frame_pointer_prev(stack_trace_context_t *ctx, uintptr_t *prev) 69 69 { 70 return !copy_from_uspace( (void *)prev,71 (uint64_t *) ctx->fp +FRAME_OFFSET_FP_PREV, sizeof(*prev));70 return !copy_from_uspace(prev, 71 ctx->fp + sizeof(uintptr_t) * FRAME_OFFSET_FP_PREV, sizeof(*prev)); 72 72 } 73 73 74 74 bool uspace_return_address_get(stack_trace_context_t *ctx, uintptr_t *ra) 75 75 { 76 return !copy_from_uspace( (void *)ra,77 (uint64_t *) ctx->fp +FRAME_OFFSET_RA, sizeof(*ra));76 return !copy_from_uspace(ra, 77 ctx->fp + sizeof(uintptr_t) * FRAME_OFFSET_RA, sizeof(*ra)); 78 78 } 79 79 -
kernel/arch/ia32/src/debug/stacktrace.c
ref705e14 re39d7b8 67 67 bool uspace_frame_pointer_prev(stack_trace_context_t *ctx, uintptr_t *prev) 68 68 { 69 return !copy_from_uspace( (void *)prev,70 (uint32_t *) ctx->fp +FRAME_OFFSET_FP_PREV, sizeof(*prev));69 return !copy_from_uspace(prev, 70 ctx->fp + sizeof(uintptr_t) * FRAME_OFFSET_FP_PREV, sizeof(*prev)); 71 71 } 72 72 73 73 bool uspace_return_address_get(stack_trace_context_t *ctx, uintptr_t *ra) 74 74 { 75 return !copy_from_uspace( (void *)ra,76 (uint32_t *) ctx->fp +FRAME_OFFSET_RA, sizeof(*ra));75 return !copy_from_uspace(ra, 76 ctx->fp + sizeof(uintptr_t) * FRAME_OFFSET_RA, sizeof(*ra)); 77 77 } 78 78 -
kernel/arch/ia32/src/userspace.c
ref705e14 re39d7b8 70 70 : [eflags_mask] "i" (~EFLAGS_NT), 71 71 [udata_des] "i" (GDT_SELECTOR(UDATA_DES) | PL_USER), 72 [stack_top] "r" ( (uint8_t *)kernel_uarg->uspace_stack +72 [stack_top] "r" (kernel_uarg->uspace_stack + 73 73 kernel_uarg->uspace_stack_size), 74 74 [eflags] "r" ((eflags & ~(EFLAGS_NT)) | EFLAGS_IF), -
kernel/arch/ia64/src/ia64.c
ref705e14 re39d7b8 244 244 * uspace_stack_size / 2 bytes. 245 245 */ 246 switch_to_userspace( (uintptr_t)kernel_uarg->uspace_entry,247 ((uintptr_t) kernel_uarg->uspace_stack)+246 switch_to_userspace(kernel_uarg->uspace_entry, 247 kernel_uarg->uspace_stack + 248 248 kernel_uarg->uspace_stack_size / 2 - 249 249 ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT), 250 ((uintptr_t) kernel_uarg->uspace_stack)+250 kernel_uarg->uspace_stack + 251 251 kernel_uarg->uspace_stack_size / 2, 252 (uintptr_t)kernel_uarg->uspace_uarg, psr.value, rsc.value);252 kernel_uarg->uspace_uarg, psr.value, rsc.value); 253 253 254 254 while (true) -
kernel/arch/mips32/src/mips32.c
ref705e14 re39d7b8 171 171 cp0_status_write(cp0_status_read() | (cp0_status_exl_exception_bit | 172 172 cp0_status_um_bit | cp0_status_ie_enabled_bit)); 173 cp0_epc_write( (uintptr_t)kernel_uarg->uspace_entry);174 userspace_asm( ((uintptr_t)kernel_uarg->uspace_stack +175 kernel_uarg->uspace_stack_size ),176 (uintptr_t)kernel_uarg->uspace_uarg,177 (uintptr_t)kernel_uarg->uspace_entry);173 cp0_epc_write(kernel_uarg->uspace_entry); 174 userspace_asm(kernel_uarg->uspace_stack + 175 kernel_uarg->uspace_stack_size, 176 kernel_uarg->uspace_uarg, 177 kernel_uarg->uspace_entry); 178 178 179 179 while (true) -
kernel/arch/ppc32/src/debug/stacktrace.c
ref705e14 re39d7b8 67 67 bool uspace_frame_pointer_prev(stack_trace_context_t *ctx, uintptr_t *prev) 68 68 { 69 return !copy_from_uspace( (void *)prev,70 (uint32_t *) ctx->fp +FRAME_OFFSET_FP_PREV, sizeof(*prev));69 return !copy_from_uspace(prev, 70 ctx->fp + sizeof(uintptr_t) * FRAME_OFFSET_FP_PREV, sizeof(*prev)); 71 71 } 72 72 73 73 bool uspace_return_address_get(stack_trace_context_t *ctx, uintptr_t *ra) 74 74 { 75 return !copy_from_uspace( (void *)ra,76 (uint32_t *) ctx->fp +FRAME_OFFSET_RA, sizeof(*ra));75 return !copy_from_uspace(ra, 76 ctx->fp + sizeof(uintptr_t) * FRAME_OFFSET_RA, sizeof(*ra)); 77 77 } 78 78 -
kernel/arch/ppc32/src/ppc32.c
ref705e14 re39d7b8 292 292 void userspace(uspace_arg_t *kernel_uarg) 293 293 { 294 userspace_asm( (uintptr_t)kernel_uarg->uspace_uarg,295 (uintptr_t)kernel_uarg->uspace_stack +294 userspace_asm(kernel_uarg->uspace_uarg, 295 kernel_uarg->uspace_stack + 296 296 kernel_uarg->uspace_stack_size - SP_DELTA, 297 (uintptr_t)kernel_uarg->uspace_entry);297 kernel_uarg->uspace_entry); 298 298 299 299 unreachable(); -
kernel/arch/riscv64/src/riscv64.c
ref705e14 re39d7b8 143 143 } 144 144 145 uintptr_t memcpy_from_uspace(void *dst, const void *uspace_src, size_t size)145 uintptr_t memcpy_from_uspace(void *dst, uspace_addr_t uspace_src, size_t size) 146 146 { 147 147 return 0; 148 148 } 149 149 150 uintptr_t memcpy_to_uspace( void *uspace_dst, const void *src, size_t size)150 uintptr_t memcpy_to_uspace(uspace_addr_t uspace_dst, const void *src, size_t size) 151 151 { 152 152 return 0; -
kernel/arch/sparc64/src/sun4u/sparc64.c
ref705e14 re39d7b8 163 163 { 164 164 (void) interrupts_disable(); 165 switch_to_userspace( (uintptr_t)kernel_uarg->uspace_entry,166 ((uintptr_t) kernel_uarg->uspace_stack)+165 switch_to_userspace(kernel_uarg->uspace_entry, 166 kernel_uarg->uspace_stack + 167 167 kernel_uarg->uspace_stack_size - 168 168 (ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT) + STACK_BIAS), 169 (uintptr_t)kernel_uarg->uspace_uarg);169 kernel_uarg->uspace_uarg); 170 170 171 171 /* Not reached */ -
kernel/arch/sparc64/src/sun4v/sparc64.c
ref705e14 re39d7b8 161 161 { 162 162 (void) interrupts_disable(); 163 switch_to_userspace( (uintptr_t)kernel_uarg->uspace_entry,164 ((uintptr_t) kernel_uarg->uspace_stack)+163 switch_to_userspace(kernel_uarg->uspace_entry, 164 kernel_uarg->uspace_stack + 165 165 kernel_uarg->uspace_stack_size - 166 166 (ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT) + STACK_BIAS), 167 (uintptr_t)kernel_uarg->uspace_uarg);167 kernel_uarg->uspace_uarg); 168 168 169 169 /* Not reached */ -
kernel/generic/include/console/console.h
ref705e14 re39d7b8 71 71 extern wchar_t getc(indev_t *indev); 72 72 extern size_t gets(indev_t *indev, char *buf, size_t buflen); 73 extern sys_errno_t sys_kio(int cmd, const void *buf, size_t size);73 extern sys_errno_t sys_kio(int cmd, uspace_ptr(void) buf, size_t size); 74 74 75 75 extern void grab_console(void); -
kernel/generic/include/ddi/ddi.h
ref705e14 re39d7b8 63 63 extern void pio_unmap(void *, void *, size_t); 64 64 65 extern sys_errno_t sys_physmem_map(uintptr_t, size_t, unsigned int, void *,65 extern sys_errno_t sys_physmem_map(uintptr_t, size_t, unsigned int, uspace_ptr(void), 66 66 uintptr_t); 67 67 extern sys_errno_t sys_physmem_unmap(uintptr_t); 68 68 69 extern sys_errno_t sys_dmamem_map(size_t, unsigned int, unsigned int, void *,70 void *, uintptr_t);69 extern sys_errno_t sys_dmamem_map(size_t, unsigned int, unsigned int, uspace_ptr(void), 70 uspace_ptr(void), uintptr_t); 71 71 extern sys_errno_t sys_dmamem_unmap(uintptr_t, size_t, unsigned int); 72 72 73 extern sys_errno_t sys_iospace_enable( ddi_ioarg_t *);74 extern sys_errno_t sys_iospace_disable( ddi_ioarg_t *);73 extern sys_errno_t sys_iospace_enable(uspace_ptr(ddi_ioarg_t)); 74 extern sys_errno_t sys_iospace_disable(uspace_ptr(ddi_ioarg_t)); 75 75 76 76 /* -
kernel/generic/include/ipc/irq.h
ref705e14 re39d7b8 50 50 extern void ipc_irq_top_half_handler(irq_t *); 51 51 52 extern errno_t ipc_irq_subscribe(answerbox_t *, inr_t, sysarg_t, irq_code_t *,53 cap_irq_handle_t *);52 extern errno_t ipc_irq_subscribe(answerbox_t *, inr_t, sysarg_t, uspace_ptr(irq_code_t), 53 uspace_ptr(cap_irq_handle_t)); 54 54 extern errno_t ipc_irq_unsubscribe(answerbox_t *, cap_irq_handle_t); 55 55 -
kernel/generic/include/ipc/sysipc.h
ref705e14 re39d7b8 44 44 extern sys_errno_t sys_ipc_call_async_fast(cap_phone_handle_t, sysarg_t, 45 45 sysarg_t, sysarg_t, sysarg_t, sysarg_t); 46 extern sys_errno_t sys_ipc_call_async_slow(cap_phone_handle_t, ipc_data_t *,46 extern sys_errno_t sys_ipc_call_async_slow(cap_phone_handle_t, uspace_ptr(ipc_data_t), 47 47 sysarg_t); 48 48 extern sys_errno_t sys_ipc_answer_fast(cap_call_handle_t, sysarg_t, sysarg_t, 49 49 sysarg_t, sysarg_t, sysarg_t); 50 extern sys_errno_t sys_ipc_answer_slow(cap_call_handle_t, ipc_data_t *);51 extern sys_errno_t sys_ipc_wait_for_call( ipc_data_t *, uint32_t, unsigned int);50 extern sys_errno_t sys_ipc_answer_slow(cap_call_handle_t, uspace_ptr(ipc_data_t)); 51 extern sys_errno_t sys_ipc_wait_for_call(uspace_ptr(ipc_data_t), uint32_t, unsigned int); 52 52 extern sys_errno_t sys_ipc_poke(void); 53 53 extern sys_errno_t sys_ipc_forward_fast(cap_call_handle_t, cap_phone_handle_t, 54 54 sysarg_t, sysarg_t, sysarg_t, unsigned int); 55 55 extern sys_errno_t sys_ipc_forward_slow(cap_call_handle_t, cap_phone_handle_t, 56 ipc_data_t *, unsigned int);56 uspace_ptr(ipc_data_t), unsigned int); 57 57 extern sys_errno_t sys_ipc_hangup(cap_phone_handle_t); 58 58 59 extern sys_errno_t sys_ipc_irq_subscribe(inr_t, sysarg_t, irq_code_t *,60 cap_irq_handle_t *);59 extern sys_errno_t sys_ipc_irq_subscribe(inr_t, sysarg_t, uspace_ptr(irq_code_t), 60 uspace_ptr(cap_irq_handle_t)); 61 61 extern sys_errno_t sys_ipc_irq_unsubscribe(cap_irq_handle_t); 62 62 63 extern sys_errno_t sys_ipc_connect_kbox( task_id_t *, cap_phone_handle_t *);63 extern sys_errno_t sys_ipc_connect_kbox(uspace_ptr(task_id_t), uspace_ptr(cap_phone_handle_t)); 64 64 65 65 #endif -
kernel/generic/include/log.h
ref705e14 re39d7b8 52 52 _HELENOS_PRINTF_ATTRIBUTE(3, 4); 53 53 54 extern sys_errno_t sys_klog(sysarg_t, void *buf, size_t size,55 sysarg_t level, size_t *uspace_nread);54 extern sys_errno_t sys_klog(sysarg_t, uspace_ptr(void) buf, size_t size, 55 sysarg_t level, uspace_ptr(size_t) uspace_nread); 56 56 57 57 #endif /* KERN_LOG_H_ */ -
kernel/generic/include/mm/as.h
ref705e14 re39d7b8 373 373 /* Address space area related syscalls. */ 374 374 extern sysarg_t sys_as_area_create(uintptr_t, size_t, unsigned int, uintptr_t, 375 as_area_pager_info_t *);375 uspace_ptr(as_area_pager_info_t)); 376 376 extern sys_errno_t sys_as_area_resize(uintptr_t, size_t, unsigned int); 377 377 extern sys_errno_t sys_as_area_change_flags(uintptr_t, unsigned int); 378 extern sys_errno_t sys_as_area_get_info(uintptr_t, as_area_info_t *);378 extern sys_errno_t sys_as_area_get_info(uintptr_t, uspace_ptr(as_area_info_t)); 379 379 extern sys_errno_t sys_as_area_destroy(uintptr_t); 380 380 -
kernel/generic/include/mm/page.h
ref705e14 re39d7b8 68 68 69 69 extern errno_t page_find_mapping(uintptr_t, uintptr_t *); 70 extern sys_errno_t sys_page_find_mapping(uintptr_t, u intptr_t *);70 extern sys_errno_t sys_page_find_mapping(uintptr_t, uspace_ptr(uintptr_t)); 71 71 72 72 #endif -
kernel/generic/include/proc/program.h
ref705e14 re39d7b8 55 55 extern void *program_loader; 56 56 57 extern errno_t program_create(as_t *, u intptr_t, char *, program_t *);57 extern errno_t program_create(as_t *, uspace_addr_t, char *, program_t *); 58 58 extern errno_t program_create_from_image(void *, char *, program_t *); 59 59 extern errno_t program_create_loader(program_t *, char *); 60 60 extern void program_ready(program_t *); 61 61 62 extern sys_errno_t sys_program_spawn_loader( char *, size_t);62 extern sys_errno_t sys_program_spawn_loader(uspace_ptr(char), size_t); 63 63 64 64 #endif -
kernel/generic/include/proc/task.h
ref705e14 re39d7b8 164 164 165 165 #ifdef __32_BITS__ 166 extern sys_errno_t sys_task_get_id( sysarg64_t *);166 extern sys_errno_t sys_task_get_id(uspace_ptr(sysarg64_t)); 167 167 #endif 168 168 … … 171 171 #endif 172 172 173 extern sys_errno_t sys_task_set_name( const char *, size_t);174 extern sys_errno_t sys_task_kill( task_id_t *);173 extern sys_errno_t sys_task_set_name(uspace_ptr(const char), size_t); 174 extern sys_errno_t sys_task_kill(uspace_ptr(task_id_t)); 175 175 extern sys_errno_t sys_task_exit(sysarg_t); 176 176 -
kernel/generic/include/proc/thread.h
ref705e14 re39d7b8 265 265 266 266 /* Thread syscall prototypes. */ 267 extern sys_errno_t sys_thread_create(uspace_ arg_t *, char *, size_t,268 thread_id_t *);267 extern sys_errno_t sys_thread_create(uspace_ptr(uspace_arg_t), uspace_ptr(char), size_t, 268 uspace_ptr(thread_id_t)); 269 269 extern sys_errno_t sys_thread_exit(int); 270 extern sys_errno_t sys_thread_get_id( thread_id_t *);270 extern sys_errno_t sys_thread_get_id(uspace_ptr(thread_id_t)); 271 271 extern sys_errno_t sys_thread_usleep(uint32_t); 272 272 extern sys_errno_t sys_thread_udelay(uint32_t); -
kernel/generic/include/security/perm.h
ref705e14 re39d7b8 75 75 #ifdef __32_BITS__ 76 76 77 extern sys_errno_t sys_perm_grant( sysarg64_t *, perm_t);78 extern sys_errno_t sys_perm_revoke( sysarg64_t *, perm_t);77 extern sys_errno_t sys_perm_grant(uspace_ptr(sysarg64_t), perm_t); 78 extern sys_errno_t sys_perm_revoke(uspace_ptr(sysarg64_t), perm_t); 79 79 80 80 #endif /* __32_BITS__ */ -
kernel/generic/include/synch/syswaitq.h
ref705e14 re39d7b8 43 43 extern void sys_waitq_task_cleanup(void); 44 44 45 extern sys_errno_t sys_waitq_create( cap_waitq_handle_t *);45 extern sys_errno_t sys_waitq_create(uspace_ptr(cap_waitq_handle_t)); 46 46 extern sys_errno_t sys_waitq_sleep(cap_waitq_handle_t, uint32_t, unsigned int); 47 47 extern sys_errno_t sys_waitq_wakeup(cap_waitq_handle_t); -
kernel/generic/include/syscall/copy.h
ref705e14 re39d7b8 44 44 extern char memcpy_to_uspace_failover_address; 45 45 46 extern errno_t copy_from_uspace(void *dst, const void *uspace_src, size_t size);47 extern errno_t copy_to_uspace( void *dst_uspace, const void *src, size_t size);46 extern errno_t copy_from_uspace(void *dst, uspace_addr_t uspace_src, size_t size); 47 extern errno_t copy_to_uspace(uspace_addr_t dst_uspace, const void *src, size_t size); 48 48 49 49 /* … … 51 51 * The functions return zero on failure and nonzero on success. 52 52 */ 53 extern uintptr_t memcpy_from_uspace(void *dst, const void *uspace_src, size_t size);54 extern uintptr_t memcpy_to_uspace( void *uspace_dst, const void *src, size_t size);53 extern uintptr_t memcpy_from_uspace(void *dst, uspace_addr_t uspace_src, size_t size); 54 extern uintptr_t memcpy_to_uspace(uspace_addr_t uspace_dst, const void *src, size_t size); 55 55 56 56 #endif -
kernel/generic/include/sysinfo/sysinfo.h
ref705e14 re39d7b8 162 162 extern void sysinfo_dump(sysinfo_item_t *); 163 163 164 extern sys_errno_t sys_sysinfo_get_keys_size( void *, size_t, void *);165 extern sys_errno_t sys_sysinfo_get_keys( void *, size_t, void *, size_t, size_t *);166 extern sysarg_t sys_sysinfo_get_val_type( void *, size_t);167 extern sys_errno_t sys_sysinfo_get_value( void *, size_t, void *);168 extern sys_errno_t sys_sysinfo_get_data_size( void *, size_t, void *);169 extern sys_errno_t sys_sysinfo_get_data( void *, size_t, void *, size_t, size_t *);164 extern sys_errno_t sys_sysinfo_get_keys_size(uspace_ptr(void), size_t, uspace_ptr(void)); 165 extern sys_errno_t sys_sysinfo_get_keys(uspace_ptr(void), size_t, uspace_ptr(void), size_t, uspace_ptr(size_t)); 166 extern sysarg_t sys_sysinfo_get_val_type(uspace_ptr(void), size_t); 167 extern sys_errno_t sys_sysinfo_get_value(uspace_ptr(void), size_t, uspace_ptr(void)); 168 extern sys_errno_t sys_sysinfo_get_data_size(uspace_ptr(void), size_t, uspace_ptr(void)); 169 extern sys_errno_t sys_sysinfo_get_data(uspace_ptr(void), size_t, uspace_ptr(void), size_t, uspace_ptr(size_t)); 170 170 171 171 #endif -
kernel/generic/include/udebug/udebug_ops.h
ref705e14 re39d7b8 55 55 errno_t udebug_regs_read(thread_t *t, void **buffer); 56 56 57 errno_t udebug_mem_read( sysarg_tuspace_addr, size_t n, void **buffer);57 errno_t udebug_mem_read(uspace_ptr(void) uspace_addr, size_t n, void **buffer); 58 58 59 59 #endif -
kernel/generic/src/console/console.c
ref705e14 re39d7b8 395 395 * 396 396 */ 397 sys_errno_t sys_kio(int cmd, const void *buf, size_t size)397 sys_errno_t sys_kio(int cmd, uspace_ptr(void) buf, size_t size) 398 398 { 399 399 char *data; -
kernel/generic/src/ddi/ddi.c
ref705e14 re39d7b8 248 248 */ 249 249 sys_errno_t sys_physmem_map(uintptr_t phys, size_t pages, unsigned int flags, 250 void *virt_ptr, uintptr_t bound)250 uspace_ptr(void) virt_ptr, uintptr_t bound) 251 251 { 252 252 uintptr_t virt; … … 262 262 rc = copy_to_uspace(virt_ptr, &virt, sizeof(virt)); 263 263 if (rc != EOK) { 264 physmem_unmap( (uintptr_t)virt);264 physmem_unmap(virt); 265 265 return rc; 266 266 } … … 393 393 * 394 394 */ 395 sys_errno_t sys_iospace_enable( ddi_ioarg_t *uspace_io_arg)395 sys_errno_t sys_iospace_enable(uspace_ptr(ddi_ioarg_t) uspace_io_arg) 396 396 { 397 397 ddi_ioarg_t arg; … … 404 404 } 405 405 406 sys_errno_t sys_iospace_disable( ddi_ioarg_t *uspace_io_arg)406 sys_errno_t sys_iospace_disable(uspace_ptr(ddi_ioarg_t) uspace_io_arg) 407 407 { 408 408 ddi_ioarg_t arg; … … 465 465 466 466 sys_errno_t sys_dmamem_map(size_t size, unsigned int map_flags, unsigned int flags, 467 void *phys_ptr, void *virt_ptr, uintptr_t bound)467 uspace_ptr(void) phys_ptr, uspace_ptr(void) virt_ptr, uintptr_t bound) 468 468 { 469 469 if ((flags & DMAMEM_FLAGS_ANONYMOUS) == 0) { … … 473 473 474 474 uintptr_t phys; 475 errno_t rc = dmamem_map( (uintptr_t)virt_ptr, size, map_flags,475 errno_t rc = dmamem_map(virt_ptr, size, map_flags, 476 476 flags, &phys); 477 477 … … 481 481 rc = copy_to_uspace(phys_ptr, &phys, sizeof(phys)); 482 482 if (rc != EOK) { 483 dmamem_unmap( (uintptr_t)virt_ptr, size);483 dmamem_unmap(virt_ptr, size); 484 484 return rc; 485 485 } … … 508 508 rc = copy_to_uspace(phys_ptr, &phys, sizeof(phys)); 509 509 if (rc != EOK) { 510 dmamem_unmap_anonymous( (uintptr_t)virt);510 dmamem_unmap_anonymous(virt); 511 511 return rc; 512 512 } … … 514 514 rc = copy_to_uspace(virt_ptr, &virt, sizeof(virt)); 515 515 if (rc != EOK) { 516 dmamem_unmap_anonymous( (uintptr_t)virt);516 dmamem_unmap_anonymous(virt); 517 517 return rc; 518 518 } -
kernel/generic/src/ipc/irq.c
ref705e14 re39d7b8 223 223 * 224 224 */ 225 static irq_code_t *code_from_uspace( irq_code_t *ucode)225 static irq_code_t *code_from_uspace(uspace_ptr(irq_code_t) ucode) 226 226 { 227 227 irq_pio_range_t *ranges = NULL; … … 242 242 if (!ranges) 243 243 goto error; 244 rc = copy_from_uspace(ranges, code->ranges,244 rc = copy_from_uspace(ranges, (uintptr_t) code->ranges, 245 245 sizeof(code->ranges[0]) * code->rangecount); 246 246 if (rc != EOK) … … 250 250 if (!cmds) 251 251 goto error; 252 rc = copy_from_uspace(cmds, code->cmds,252 rc = copy_from_uspace(cmds, (uintptr_t) code->cmds, 253 253 sizeof(code->cmds[0]) * code->cmdcount); 254 254 if (rc != EOK) … … 323 323 */ 324 324 errno_t ipc_irq_subscribe(answerbox_t *box, inr_t inr, sysarg_t imethod, 325 irq_code_t *ucode, cap_irq_handle_t *uspace_handle)325 uspace_ptr(irq_code_t) ucode, uspace_ptr(cap_irq_handle_t) uspace_handle) 326 326 { 327 327 if ((inr < 0) || (inr > last_inr)) -
kernel/generic/src/ipc/ops/dataread.c
ref705e14 re39d7b8 63 63 if (!ipc_get_retval(&answer->data)) { 64 64 /* The recipient agreed to send data. */ 65 u intptr_t src = ipc_get_arg1(&answer->data);66 u intptr_t dst = ipc_get_arg1(olddata);65 uspace_addr_t src = ipc_get_arg1(&answer->data); 66 uspace_addr_t dst = ipc_get_arg1(olddata); 67 67 size_t max_size = ipc_get_arg2(olddata); 68 68 size_t size = ipc_get_arg2(&answer->data); … … 81 81 } 82 82 errno_t rc = copy_from_uspace(answer->buffer, 83 (void *)src, size);83 src, size); 84 84 if (rc) { 85 85 ipc_set_retval(&answer->data, rc); … … 103 103 { 104 104 if (answer->buffer) { 105 u intptr_t dst = ipc_get_arg1(&answer->data);105 uspace_addr_t dst = ipc_get_arg1(&answer->data); 106 106 size_t size = ipc_get_arg2(&answer->data); 107 107 errno_t rc; 108 108 109 rc = copy_to_uspace( (void *)dst, answer->buffer, size);109 rc = copy_to_uspace(dst, answer->buffer, size); 110 110 if (rc) 111 111 ipc_set_retval(&answer->data, rc); -
kernel/generic/src/ipc/ops/datawrite.c
ref705e14 re39d7b8 43 43 static errno_t request_preprocess(call_t *call, phone_t *phone) 44 44 { 45 u intptr_t src = ipc_get_arg1(&call->data);45 uspace_addr_t src = ipc_get_arg1(&call->data); 46 46 size_t size = ipc_get_arg2(&call->data); 47 47 … … 59 59 if (!call->buffer) 60 60 return ENOMEM; 61 errno_t rc = copy_from_uspace(call->buffer, (void *)src, size);61 errno_t rc = copy_from_uspace(call->buffer, src, size); 62 62 if (rc != EOK) { 63 63 /* … … 77 77 if (!ipc_get_retval(&answer->data)) { 78 78 /* The recipient agreed to receive data. */ 79 u intptr_t dst = (uintptr_t)ipc_get_arg1(&answer->data);80 size_t size = (size_t)ipc_get_arg2(&answer->data);81 size_t max_size = (size_t)ipc_get_arg2(olddata);79 uspace_addr_t dst = ipc_get_arg1(&answer->data); 80 size_t size = ipc_get_arg2(&answer->data); 81 size_t max_size = ipc_get_arg2(olddata); 82 82 83 83 if (size <= max_size) { 84 errno_t rc = copy_to_uspace( (void *)dst,84 errno_t rc = copy_to_uspace(dst, 85 85 answer->buffer, size); 86 86 if (rc) -
kernel/generic/src/ipc/ops/debug.c
ref705e14 re39d7b8 47 47 { 48 48 if (answer->buffer) { 49 u intptr_t dst = ipc_get_arg1(&answer->data);49 uspace_addr_t dst = ipc_get_arg1(&answer->data); 50 50 size_t size = ipc_get_arg2(&answer->data); 51 51 errno_t rc; 52 52 53 rc = copy_to_uspace( (void *)dst, answer->buffer, size);53 rc = copy_to_uspace(dst, answer->buffer, size); 54 54 if (rc) 55 55 ipc_set_retval(&answer->data, rc); -
kernel/generic/src/ipc/ops/shareout.c
ref705e14 re39d7b8 70 70 71 71 if (rc == EOK) { 72 rc = copy_to_uspace( (void *)ipc_get_arg2(&answer->data),72 rc = copy_to_uspace(ipc_get_arg2(&answer->data), 73 73 &dst_base, sizeof(dst_base)); 74 74 } -
kernel/generic/src/ipc/sysipc.c
ref705e14 re39d7b8 419 419 * 420 420 */ 421 sys_errno_t sys_ipc_call_async_slow(cap_phone_handle_t handle, ipc_data_t *data,421 sys_errno_t sys_ipc_call_async_slow(cap_phone_handle_t handle, uspace_ptr(ipc_data_t) data, 422 422 sysarg_t label) 423 423 { … … 437 437 } 438 438 439 errno_t rc = copy_from_uspace(&call->data.args, &data->args,439 errno_t rc = copy_from_uspace(&call->data.args, data + offsetof(ipc_data_t, args), 440 440 sizeof(call->data.args)); 441 441 if (rc != EOK) { … … 623 623 */ 624 624 sys_errno_t sys_ipc_forward_slow(cap_call_handle_t chandle, 625 cap_phone_handle_t phandle, ipc_data_t *data, unsigned int mode)625 cap_phone_handle_t phandle, uspace_ptr(ipc_data_t) data, unsigned int mode) 626 626 { 627 627 ipc_data_t newdata; 628 errno_t rc = copy_from_uspace(&newdata.args, &data->args,628 errno_t rc = copy_from_uspace(&newdata.args, data + offsetof(ipc_data_t, args), 629 629 sizeof(newdata.args)); 630 630 if (rc != EOK) … … 700 700 * 701 701 */ 702 sys_errno_t sys_ipc_answer_slow(cap_call_handle_t chandle, ipc_data_t *data)702 sys_errno_t sys_ipc_answer_slow(cap_call_handle_t chandle, uspace_ptr(ipc_data_t) data) 703 703 { 704 704 kobject_t *kobj = cap_unpublish(TASK, chandle, KOBJECT_TYPE_CALL); … … 718 718 saved = false; 719 719 720 errno_t rc = copy_from_uspace(&call->data.args, &data->args,720 errno_t rc = copy_from_uspace(&call->data.args, data + offsetof(ipc_data_t, args), 721 721 sizeof(call->data.args)); 722 722 if (rc != EOK) { … … 766 766 * @return An error code on error. 767 767 */ 768 sys_errno_t sys_ipc_wait_for_call( ipc_data_t *calldata, uint32_t usec,768 sys_errno_t sys_ipc_wait_for_call(uspace_ptr(ipc_data_t) calldata, uint32_t usec, 769 769 unsigned int flags) 770 770 { … … 888 888 */ 889 889 sys_errno_t sys_ipc_irq_subscribe(inr_t inr, sysarg_t imethod, 890 irq_code_t *ucode, cap_irq_handle_t *uspace_handle)890 uspace_ptr(irq_code_t) ucode, uspace_ptr(cap_irq_handle_t) uspace_handle) 891 891 { 892 892 if (!(perm_get(TASK) & PERM_IRQ_REG)) … … 918 918 * 919 919 */ 920 sys_errno_t sys_ipc_connect_kbox( task_id_t *uspace_taskid,921 cap_phone_handle_t *uspace_phone)920 sys_errno_t sys_ipc_connect_kbox(uspace_ptr(task_id_t) uspace_taskid, 921 uspace_ptr(cap_phone_handle_t) uspace_phone) 922 922 { 923 923 #ifdef CONFIG_UDEBUG -
kernel/generic/src/log/log.c
ref705e14 re39d7b8 295 295 * 296 296 */ 297 sys_errno_t sys_klog(sysarg_t operation, void *buf, size_t size,298 sysarg_t level, size_t *uspace_nread)297 sys_errno_t sys_klog(sysarg_t operation, uspace_ptr(void) buf, size_t size, 298 sysarg_t level, uspace_ptr(size_t) uspace_nread) 299 299 { 300 300 char *data; -
kernel/generic/src/main/uinit.c
ref705e14 re39d7b8 70 70 #endif 71 71 72 uspace_arg_t *uarg = (uspace_arg_t *)arg;72 uspace_arg_t *uarg = arg; 73 73 uspace_arg_t local_uarg; 74 74 … … 77 77 local_uarg.uspace_stack_size = uarg->uspace_stack_size; 78 78 local_uarg.uspace_uarg = uarg->uspace_uarg; 79 local_uarg.uspace_thread_function = NULL;80 local_uarg.uspace_thread_arg = NULL;79 local_uarg.uspace_thread_function = USPACE_NULL; 80 local_uarg.uspace_thread_arg = USPACE_NULL; 81 81 82 82 free(uarg); -
kernel/generic/src/mm/as.c
ref705e14 re39d7b8 2092 2092 2093 2093 sysarg_t sys_as_area_create(uintptr_t base, size_t size, unsigned int flags, 2094 uintptr_t bound, as_area_pager_info_t *pager_info)2094 uintptr_t bound, uspace_ptr(as_area_pager_info_t) pager_info) 2095 2095 { 2096 2096 uintptr_t virt = base; … … 2098 2098 mem_backend_data_t backend_data; 2099 2099 2100 if ( pager_info == AS_AREA_UNPAGED)2100 if (!pager_info) 2101 2101 backend = &anon_backend; 2102 2102 else { … … 2125 2125 } 2126 2126 2127 sys_errno_t sys_as_area_get_info(uintptr_t address, as_area_info_t *dest)2127 sys_errno_t sys_as_area_get_info(uintptr_t address, uspace_ptr(as_area_info_t) dest) 2128 2128 { 2129 2129 as_area_t *area; … … 2136 2136 } 2137 2137 2138 dest->start_addr = area->base; 2139 dest->size = P2SZ(area->pages); 2140 dest->flags = area->flags; 2138 as_area_info_t info = { 2139 .start_addr = area->base, 2140 .size = P2SZ(area->pages), 2141 .flags = area->flags, 2142 }; 2141 2143 2142 2144 mutex_unlock(&area->lock); 2143 2145 mutex_unlock(&AS->lock); 2146 2147 copy_to_uspace(dest, &info, sizeof(info)); 2144 2148 return EOK; 2145 2149 } -
kernel/generic/src/mm/page.c
ref705e14 re39d7b8 215 215 * 216 216 */ 217 sys_errno_t sys_page_find_mapping(uintptr_t virt, u intptr_t *phys_ptr)217 sys_errno_t sys_page_find_mapping(uintptr_t virt, uspace_ptr(uintptr_t) phys_ptr) 218 218 { 219 219 uintptr_t phys; -
kernel/generic/src/proc/program.c
ref705e14 re39d7b8 69 69 * 70 70 */ 71 errno_t program_create(as_t *as, u intptr_t entry_addr, char *name, program_t *prg)71 errno_t program_create(as_t *as, uspace_addr_t entry_addr, char *name, program_t *prg) 72 72 { 73 73 uspace_arg_t *kernel_uarg = (uspace_arg_t *) … … 86 86 * Create the stack address space area. 87 87 */ 88 uintptr_t virt = (uintptr_t) -1;88 uintptr_t virt = (uintptr_t) AS_AREA_ANY; 89 89 uintptr_t bound = USER_ADDRESS_SPACE_END - (STACK_SIZE_USER - 1); 90 90 … … 103 103 } 104 104 105 kernel_uarg->uspace_entry = (void *)entry_addr;106 kernel_uarg->uspace_stack = (void *)virt;105 kernel_uarg->uspace_entry = entry_addr; 106 kernel_uarg->uspace_stack = virt; 107 107 kernel_uarg->uspace_stack_size = STACK_SIZE_USER; 108 kernel_uarg->uspace_thread_function = NULL;109 kernel_uarg->uspace_thread_arg = NULL;110 kernel_uarg->uspace_uarg = NULL;108 kernel_uarg->uspace_thread_function = USPACE_NULL; 109 kernel_uarg->uspace_thread_arg = USPACE_NULL; 110 kernel_uarg->uspace_uarg = USPACE_NULL; 111 111 112 112 /* … … 218 218 * 219 219 */ 220 sys_errno_t sys_program_spawn_loader( char *uspace_name, size_t name_len)220 sys_errno_t sys_program_spawn_loader(uspace_ptr(char) uspace_name, size_t name_len) 221 221 { 222 222 /* Cap length of name and copy it from userspace. */ -
kernel/generic/src/proc/task.c
ref705e14 re39d7b8 323 323 * 324 324 */ 325 sys_errno_t sys_task_get_id( sysarg64_t *uspace_taskid)325 sys_errno_t sys_task_get_id(uspace_ptr(sysarg64_t) uspace_taskid) 326 326 { 327 327 /* … … 363 363 * 364 364 */ 365 sys_errno_t sys_task_set_name(const char *uspace_name, size_t name_len)365 sys_errno_t sys_task_set_name(const uspace_ptr(char) uspace_name, size_t name_len) 366 366 { 367 367 char namebuf[TASK_NAME_BUFLEN]; … … 404 404 * 405 405 */ 406 sys_errno_t sys_task_kill( task_id_t *uspace_taskid)406 sys_errno_t sys_task_kill(uspace_ptr(task_id_t) uspace_taskid) 407 407 { 408 408 task_id_t taskid; -
kernel/generic/src/proc/thread.c
ref705e14 re39d7b8 998 998 * 999 999 */ 1000 sys_errno_t sys_thread_create(uspace_ arg_t *uspace_uarg, char *uspace_name,1001 size_t name_len, thread_id_t *uspace_thread_id)1000 sys_errno_t sys_thread_create(uspace_ptr(uspace_arg_t) uspace_uarg, uspace_ptr(char) uspace_name, 1001 size_t name_len, uspace_ptr(thread_id_t) uspace_thread_id) 1002 1002 { 1003 1003 if (name_len > THREAD_NAME_BUFLEN - 1) … … 1029 1029 THREAD_FLAG_USPACE | THREAD_FLAG_NOATTACH, namebuf); 1030 1030 if (thread) { 1031 if (uspace_thread_id != NULL) {1031 if (uspace_thread_id) { 1032 1032 rc = copy_to_uspace(uspace_thread_id, &thread->tid, 1033 1033 sizeof(thread->tid)); … … 1088 1088 * 1089 1089 */ 1090 sys_errno_t sys_thread_get_id( thread_id_t *uspace_thread_id)1090 sys_errno_t sys_thread_get_id(uspace_ptr(thread_id_t) uspace_thread_id) 1091 1091 { 1092 1092 /* -
kernel/generic/src/security/perm.c
ref705e14 re39d7b8 158 158 * 159 159 */ 160 sys_errno_t sys_perm_grant( sysarg64_t *uspace_taskid, perm_t perms)160 sys_errno_t sys_perm_grant(uspace_ptr(sysarg64_t) uspace_taskid, perm_t perms) 161 161 { 162 162 sysarg64_t taskid; … … 179 179 * 180 180 */ 181 sys_errno_t sys_perm_revoke( sysarg64_t *uspace_taskid, perm_t perms)181 sys_errno_t sys_perm_revoke(uspace_ptr(sysarg64_t) uspace_taskid, perm_t perms) 182 182 { 183 183 sysarg64_t taskid; -
kernel/generic/src/synch/syswaitq.c
ref705e14 re39d7b8 88 88 * @return Error code. 89 89 */ 90 sys_errno_t sys_waitq_create( cap_waitq_handle_t *whandle)90 sys_errno_t sys_waitq_create(uspace_ptr(cap_waitq_handle_t) whandle) 91 91 { 92 92 waitq_t *wq = slab_alloc(waitq_cache, FRAME_ATOMIC); -
kernel/generic/src/syscall/copy.c
ref705e14 re39d7b8 59 59 * @return EOK on success or an error code from @ref errno.h. 60 60 */ 61 errno_t copy_from_uspace(void *dst, const void *uspace_src, size_t size)61 errno_t copy_from_uspace(void *dst, uspace_addr_t uspace_src, size_t size) 62 62 { 63 63 ipl_t ipl; … … 68 68 69 69 if (!KERNEL_ADDRESS_SPACE_SHADOWED) { 70 if (overlaps( (uintptr_t)uspace_src, size,70 if (overlaps(uspace_src, size, 71 71 KERNEL_ADDRESS_SPACE_START, 72 72 KERNEL_ADDRESS_SPACE_END - KERNEL_ADDRESS_SPACE_START)) { … … 82 82 * Check whether the address is outside the address space hole. 83 83 */ 84 if (overlaps( (uintptr_t)uspace_src, size, ADDRESS_SPACE_HOLE_START,84 if (overlaps(uspace_src, size, ADDRESS_SPACE_HOLE_START, 85 85 ADDRESS_SPACE_HOLE_END - ADDRESS_SPACE_HOLE_START)) 86 86 return EPERM; … … 110 110 * @return 0 on success or an error code from @ref errno.h. 111 111 */ 112 errno_t copy_to_uspace( void *uspace_dst, const void *src, size_t size)112 errno_t copy_to_uspace(uspace_addr_t uspace_dst, const void *src, size_t size) 113 113 { 114 114 ipl_t ipl; … … 119 119 120 120 if (!KERNEL_ADDRESS_SPACE_SHADOWED) { 121 if (overlaps( (uintptr_t)uspace_dst, size,121 if (overlaps(uspace_dst, size, 122 122 KERNEL_ADDRESS_SPACE_START, 123 123 KERNEL_ADDRESS_SPACE_END - KERNEL_ADDRESS_SPACE_START)) { … … 133 133 * Check whether the address is outside the address space hole. 134 134 */ 135 if (overlaps( (uintptr_t)uspace_dst, size, ADDRESS_SPACE_HOLE_START,135 if (overlaps(uspace_dst, size, ADDRESS_SPACE_HOLE_START, 136 136 ADDRESS_SPACE_HOLE_END - ADDRESS_SPACE_HOLE_START)) 137 137 return EPERM; -
kernel/generic/src/sysinfo/sysinfo.c
ref705e14 re39d7b8 677 677 * 678 678 */ 679 _NO_TRACE static sysinfo_return_t sysinfo_get_item_uspace( void *ptr, size_t size,679 _NO_TRACE static sysinfo_return_t sysinfo_get_item_uspace(uspace_ptr(void) ptr, size_t size, 680 680 bool dry_run) 681 681 { … … 786 786 * 787 787 */ 788 _NO_TRACE static sysinfo_return_t sysinfo_get_keys_uspace( void *ptr, size_t size,788 _NO_TRACE static sysinfo_return_t sysinfo_get_keys_uspace(uspace_ptr(void) ptr, size_t size, 789 789 bool dry_run) 790 790 { … … 831 831 * 832 832 */ 833 sys_errno_t sys_sysinfo_get_keys_size( void *path_ptr, size_t path_size,834 void *size_ptr)833 sys_errno_t sys_sysinfo_get_keys_size(uspace_ptr(void) path_ptr, size_t path_size, 834 uspace_ptr(void) size_ptr) 835 835 { 836 836 errno_t rc; … … 879 879 * 880 880 */ 881 sys_errno_t sys_sysinfo_get_keys( void *path_ptr, size_t path_size,882 void *buffer_ptr, size_t buffer_size, size_t *size_ptr)881 sys_errno_t sys_sysinfo_get_keys(uspace_ptr(void) path_ptr, size_t path_size, 882 uspace_ptr(void) buffer_ptr, size_t buffer_size, uspace_ptr(size_t) size_ptr) 883 883 { 884 884 errno_t rc; … … 914 914 * 915 915 */ 916 sysarg_t sys_sysinfo_get_val_type( void *path_ptr, size_t path_size)916 sysarg_t sys_sysinfo_get_val_type(uspace_ptr(void) path_ptr, size_t path_size) 917 917 { 918 918 /* … … 950 950 * 951 951 */ 952 sys_errno_t sys_sysinfo_get_value( void *path_ptr, size_t path_size,953 void *value_ptr)952 sys_errno_t sys_sysinfo_get_value(uspace_ptr(void) path_ptr, size_t path_size, 953 uspace_ptr(void) value_ptr) 954 954 { 955 955 errno_t rc; … … 986 986 * 987 987 */ 988 sys_errno_t sys_sysinfo_get_data_size( void *path_ptr, size_t path_size,989 void *size_ptr)988 sys_errno_t sys_sysinfo_get_data_size(uspace_ptr(void) path_ptr, size_t path_size, 989 uspace_ptr(void) size_ptr) 990 990 { 991 991 errno_t rc; … … 1036 1036 * 1037 1037 */ 1038 sys_errno_t sys_sysinfo_get_data( void *path_ptr, size_t path_size,1039 void *buffer_ptr, size_t buffer_size, size_t *size_ptr)1038 sys_errno_t sys_sysinfo_get_data(uspace_ptr(void) path_ptr, size_t path_size, 1039 uspace_ptr(void) buffer_ptr, size_t buffer_size, uspace_ptr(size_t) size_ptr) 1040 1040 { 1041 1041 errno_t rc; -
kernel/generic/src/udebug/udebug_ipc.c
ref705e14 re39d7b8 398 398 static void udebug_receive_mem_read(call_t *call) 399 399 { 400 sysarg_tuspace_dst;401 sysarg_tuspace_src;400 uspace_ptr(void) uspace_dst; 401 uspace_ptr(void) uspace_src; 402 402 unsigned size; 403 403 void *buffer = NULL; -
kernel/generic/src/udebug/udebug_ops.c
ref705e14 re39d7b8 548 548 * 549 549 */ 550 errno_t udebug_mem_read( sysarg_t uspace_addr, size_t n, void **buffer)550 errno_t udebug_mem_read(uspace_addr_t uspace_addr, size_t n, void **buffer) 551 551 { 552 552 /* Verify task state */ … … 569 569 * 570 570 */ 571 errno_t rc = copy_from_uspace(data_buffer, (void *)uspace_addr, n);571 errno_t rc = copy_from_uspace(data_buffer, uspace_addr, n); 572 572 mutex_unlock(&TASK->udebug.lock); 573 573
Note:
See TracChangeset
for help on using the changeset viewer.