Lines Matching refs:frame

47 arm_push_iframe(struct iframe_stack *stack, struct iframe *frame)  in arm_push_iframe()  argument
50 stack->frames[stack->index++] = frame; in arm_push_iframe()
199 iframe frame = {}; in arch_thread_enter_userspace() local
200 frame.r0 = (uint32)args1; in arch_thread_enter_userspace()
201 frame.r1 = (uint32)args2; in arch_thread_enter_userspace()
202 frame.usr_sp = stackTop; in arch_thread_enter_userspace()
203 frame.usr_lr = ((addr_t*)commPageAddress)[COMMPAGE_ENTRY_ARM_THREAD_EXIT] in arch_thread_enter_userspace()
205 frame.pc = entry; in arch_thread_enter_userspace()
208 arch_return_to_userland(&frame); in arch_thread_enter_userspace()
218 struct iframe* frame = thread->arch_info.userFrame; in arch_on_signal_stack() local
219 if (frame == NULL) { in arch_on_signal_stack()
224 return frame->usr_sp >= thread->signal_stack_base in arch_on_signal_stack()
225 && frame->usr_sp < thread->signal_stack_base in arch_on_signal_stack()
231 get_signal_stack(Thread* thread, struct iframe* frame, in get_signal_stack() argument
236 && (frame->usr_sp < thread->signal_stack_base in get_signal_stack()
237 || frame->usr_sp >= thread->signal_stack_base + thread->signal_stack_size)) { in get_signal_stack()
242 return (uint8*)ROUNDDOWN(frame->usr_sp - spaceNeeded, 16); in get_signal_stack()
250 iframe* frame = thread->arch_info.userFrame; in arch_setup_signal_frame() local
251 if (frame == NULL) { in arch_setup_signal_frame()
257 signalFrameData->context.uc_mcontext.r0 = frame->r0; in arch_setup_signal_frame()
258 signalFrameData->context.uc_mcontext.r1 = frame->r1; in arch_setup_signal_frame()
259 signalFrameData->context.uc_mcontext.r2 = frame->r2; in arch_setup_signal_frame()
260 signalFrameData->context.uc_mcontext.r3 = frame->r3; in arch_setup_signal_frame()
261 signalFrameData->context.uc_mcontext.r4 = frame->r4; in arch_setup_signal_frame()
262 signalFrameData->context.uc_mcontext.r5 = frame->r5; in arch_setup_signal_frame()
263 signalFrameData->context.uc_mcontext.r6 = frame->r6; in arch_setup_signal_frame()
264 signalFrameData->context.uc_mcontext.r7 = frame->r7; in arch_setup_signal_frame()
265 signalFrameData->context.uc_mcontext.r8 = frame->r8; in arch_setup_signal_frame()
266 signalFrameData->context.uc_mcontext.r9 = frame->r9; in arch_setup_signal_frame()
267 signalFrameData->context.uc_mcontext.r10 = frame->r10; in arch_setup_signal_frame()
268 signalFrameData->context.uc_mcontext.r11 = frame->r11; in arch_setup_signal_frame()
269 signalFrameData->context.uc_mcontext.r12 = frame->r12; in arch_setup_signal_frame()
270 signalFrameData->context.uc_mcontext.r13 = frame->usr_sp; in arch_setup_signal_frame()
271 signalFrameData->context.uc_mcontext.r14 = frame->usr_lr; in arch_setup_signal_frame()
272 signalFrameData->context.uc_mcontext.r15 = frame->pc; in arch_setup_signal_frame()
273 signalFrameData->context.uc_mcontext.cpsr = frame->spsr; in arch_setup_signal_frame()
278 signal_get_user_stack(frame->usr_sp, &signalFrameData->context.uc_stack); in arch_setup_signal_frame()
284 uint8* userStack = get_signal_stack(thread, frame, sa, in arch_setup_signal_frame()
301 frame->usr_lr = frame->pc; in arch_setup_signal_frame()
302 frame->usr_sp = (addr_t)userStack; in arch_setup_signal_frame()
303 frame->pc = signalHandlerAddr; in arch_setup_signal_frame()
304 frame->r0 = frame->usr_sp; in arch_setup_signal_frame()
313 iframe* frame = thread_get_current_thread()->arch_info.userFrame; in arch_restore_signal_frame() local
314 if (frame == NULL) { in arch_restore_signal_frame()
322 frame->r0 = signalFrameData->context.uc_mcontext.r0; in arch_restore_signal_frame()
323 frame->r1 = signalFrameData->context.uc_mcontext.r1; in arch_restore_signal_frame()
324 frame->r2 = signalFrameData->context.uc_mcontext.r2; in arch_restore_signal_frame()
325 frame->r3 = signalFrameData->context.uc_mcontext.r3; in arch_restore_signal_frame()
326 frame->r4 = signalFrameData->context.uc_mcontext.r4; in arch_restore_signal_frame()
327 frame->r5 = signalFrameData->context.uc_mcontext.r5; in arch_restore_signal_frame()
328 frame->r6 = signalFrameData->context.uc_mcontext.r6; in arch_restore_signal_frame()
329 frame->r7 = signalFrameData->context.uc_mcontext.r7; in arch_restore_signal_frame()
330 frame->r8 = signalFrameData->context.uc_mcontext.r8; in arch_restore_signal_frame()
331 frame->r9 = signalFrameData->context.uc_mcontext.r9; in arch_restore_signal_frame()
332 frame->r10 = signalFrameData->context.uc_mcontext.r10; in arch_restore_signal_frame()
333 frame->r11 = signalFrameData->context.uc_mcontext.r11; in arch_restore_signal_frame()
334 frame->r12 = signalFrameData->context.uc_mcontext.r12; in arch_restore_signal_frame()
335 frame->usr_sp = signalFrameData->context.uc_mcontext.r13; in arch_restore_signal_frame()
336 frame->usr_lr = signalFrameData->context.uc_mcontext.r14; in arch_restore_signal_frame()
337 frame->pc = signalFrameData->context.uc_mcontext.r15; in arch_restore_signal_frame()
338 frame->spsr = signalFrameData->context.uc_mcontext.cpsr; in arch_restore_signal_frame()
342 return frame->r0; in arch_restore_signal_frame()
353 struct iframe* frame = thread_get_current_thread()->arch_info.userFrame; in arch_store_fork_frame() local
354 if (frame == NULL) { in arch_store_fork_frame()
358 arg->frame = *frame; in arch_store_fork_frame()
359 arg->frame.r0 = 0; // fork return value in arch_store_fork_frame()
374 arch_return_to_userland(&arg->frame); in arch_restore_fork_frame()