Lines Matching refs:frame
124 iframe frame; in arch_thread_enter_userspace() local
125 memset(&frame, 0, sizeof(frame)); in arch_thread_enter_userspace()
131 frame.status = status.val; in arch_thread_enter_userspace()
132 frame.epc = entry; in arch_thread_enter_userspace()
133 frame.a0 = (addr_t)arg1; in arch_thread_enter_userspace()
134 frame.a1 = (addr_t)arg2; in arch_thread_enter_userspace()
135 frame.ra = threadExitAddr; in arch_thread_enter_userspace()
136 frame.sp = thread->user_stack_base + thread->user_stack_size; in arch_thread_enter_userspace()
137 frame.tp = thread->user_local_storage; in arch_thread_enter_userspace()
139 arch_load_user_iframe(stackHeader, &frame); in arch_thread_enter_userspace()
149 struct iframe* frame = thread->arch_info.userFrame; in arch_on_signal_stack() local
150 if (frame == NULL) { in arch_on_signal_stack()
155 return frame->sp >= thread->signal_stack_base in arch_on_signal_stack()
156 && frame->sp < thread->signal_stack_base in arch_on_signal_stack()
162 get_signal_stack(Thread* thread, struct iframe* frame, in get_signal_stack() argument
169 frame->sp < thread->signal_stack_base || in get_signal_stack()
170 frame->sp >= thread->signal_stack_base + thread->signal_stack_size in get_signal_stack()
177 return (uint8*)ROUNDDOWN(frame->sp - spaceNeeded, 16); in get_signal_stack()
186 iframe* frame = thread->arch_info.userFrame; in arch_setup_signal_frame() local
189 signalFrameData->context.uc_mcontext.x[ 0] = frame->ra; in arch_setup_signal_frame()
190 signalFrameData->context.uc_mcontext.x[ 1] = frame->sp; in arch_setup_signal_frame()
191 signalFrameData->context.uc_mcontext.x[ 2] = frame->gp; in arch_setup_signal_frame()
192 signalFrameData->context.uc_mcontext.x[ 3] = frame->tp; in arch_setup_signal_frame()
193 signalFrameData->context.uc_mcontext.x[ 4] = frame->t0; in arch_setup_signal_frame()
194 signalFrameData->context.uc_mcontext.x[ 5] = frame->t1; in arch_setup_signal_frame()
195 signalFrameData->context.uc_mcontext.x[ 6] = frame->t2; in arch_setup_signal_frame()
196 signalFrameData->context.uc_mcontext.x[ 7] = frame->fp; in arch_setup_signal_frame()
197 signalFrameData->context.uc_mcontext.x[ 8] = frame->s1; in arch_setup_signal_frame()
198 signalFrameData->context.uc_mcontext.x[ 9] = frame->a0; in arch_setup_signal_frame()
199 signalFrameData->context.uc_mcontext.x[10] = frame->a1; in arch_setup_signal_frame()
200 signalFrameData->context.uc_mcontext.x[11] = frame->a2; in arch_setup_signal_frame()
201 signalFrameData->context.uc_mcontext.x[12] = frame->a3; in arch_setup_signal_frame()
202 signalFrameData->context.uc_mcontext.x[13] = frame->a4; in arch_setup_signal_frame()
203 signalFrameData->context.uc_mcontext.x[14] = frame->a5; in arch_setup_signal_frame()
204 signalFrameData->context.uc_mcontext.x[15] = frame->a6; in arch_setup_signal_frame()
205 signalFrameData->context.uc_mcontext.x[16] = frame->a7; in arch_setup_signal_frame()
206 signalFrameData->context.uc_mcontext.x[17] = frame->s2; in arch_setup_signal_frame()
207 signalFrameData->context.uc_mcontext.x[18] = frame->s3; in arch_setup_signal_frame()
208 signalFrameData->context.uc_mcontext.x[19] = frame->s4; in arch_setup_signal_frame()
209 signalFrameData->context.uc_mcontext.x[20] = frame->s5; in arch_setup_signal_frame()
210 signalFrameData->context.uc_mcontext.x[21] = frame->s6; in arch_setup_signal_frame()
211 signalFrameData->context.uc_mcontext.x[22] = frame->s7; in arch_setup_signal_frame()
212 signalFrameData->context.uc_mcontext.x[23] = frame->s8; in arch_setup_signal_frame()
213 signalFrameData->context.uc_mcontext.x[24] = frame->s9; in arch_setup_signal_frame()
214 signalFrameData->context.uc_mcontext.x[25] = frame->s10; in arch_setup_signal_frame()
215 signalFrameData->context.uc_mcontext.x[26] = frame->s11; in arch_setup_signal_frame()
216 signalFrameData->context.uc_mcontext.x[27] = frame->t3; in arch_setup_signal_frame()
217 signalFrameData->context.uc_mcontext.x[28] = frame->t4; in arch_setup_signal_frame()
218 signalFrameData->context.uc_mcontext.x[29] = frame->t5; in arch_setup_signal_frame()
219 signalFrameData->context.uc_mcontext.x[30] = frame->t6; in arch_setup_signal_frame()
220 signalFrameData->context.uc_mcontext.pc = frame->epc; in arch_setup_signal_frame()
225 signal_get_user_stack(frame->sp, &signalFrameData->context.uc_stack); in arch_setup_signal_frame()
238 uint8* userStack = get_signal_stack(thread, frame, sa, in arch_setup_signal_frame()
254 frame->ra = frame->epc; in arch_setup_signal_frame()
255 frame->sp = (addr_t)userStack; in arch_setup_signal_frame()
256 frame->epc = signalHandlerAddr; in arch_setup_signal_frame()
257 frame->a0 = frame->sp; in arch_setup_signal_frame()
269 iframe* frame = thread_get_current_thread()->arch_info.userFrame; in arch_restore_signal_frame() local
274 frame->ra = signalFrameData->context.uc_mcontext.x[ 0]; in arch_restore_signal_frame()
275 frame->sp = signalFrameData->context.uc_mcontext.x[ 1]; in arch_restore_signal_frame()
276 frame->gp = signalFrameData->context.uc_mcontext.x[ 2]; in arch_restore_signal_frame()
277 frame->tp = signalFrameData->context.uc_mcontext.x[ 3]; in arch_restore_signal_frame()
278 frame->t0 = signalFrameData->context.uc_mcontext.x[ 4]; in arch_restore_signal_frame()
279 frame->t1 = signalFrameData->context.uc_mcontext.x[ 5]; in arch_restore_signal_frame()
280 frame->t2 = signalFrameData->context.uc_mcontext.x[ 6]; in arch_restore_signal_frame()
281 frame->fp = signalFrameData->context.uc_mcontext.x[ 7]; in arch_restore_signal_frame()
282 frame->s1 = signalFrameData->context.uc_mcontext.x[ 8]; in arch_restore_signal_frame()
283 frame->a0 = signalFrameData->context.uc_mcontext.x[ 9]; in arch_restore_signal_frame()
284 frame->a1 = signalFrameData->context.uc_mcontext.x[10]; in arch_restore_signal_frame()
285 frame->a2 = signalFrameData->context.uc_mcontext.x[11]; in arch_restore_signal_frame()
286 frame->a3 = signalFrameData->context.uc_mcontext.x[12]; in arch_restore_signal_frame()
287 frame->a4 = signalFrameData->context.uc_mcontext.x[13]; in arch_restore_signal_frame()
288 frame->a5 = signalFrameData->context.uc_mcontext.x[14]; in arch_restore_signal_frame()
289 frame->a6 = signalFrameData->context.uc_mcontext.x[15]; in arch_restore_signal_frame()
290 frame->a7 = signalFrameData->context.uc_mcontext.x[16]; in arch_restore_signal_frame()
291 frame->s2 = signalFrameData->context.uc_mcontext.x[17]; in arch_restore_signal_frame()
292 frame->s3 = signalFrameData->context.uc_mcontext.x[18]; in arch_restore_signal_frame()
293 frame->s4 = signalFrameData->context.uc_mcontext.x[19]; in arch_restore_signal_frame()
294 frame->s5 = signalFrameData->context.uc_mcontext.x[20]; in arch_restore_signal_frame()
295 frame->s6 = signalFrameData->context.uc_mcontext.x[21]; in arch_restore_signal_frame()
296 frame->s7 = signalFrameData->context.uc_mcontext.x[22]; in arch_restore_signal_frame()
297 frame->s8 = signalFrameData->context.uc_mcontext.x[23]; in arch_restore_signal_frame()
298 frame->s9 = signalFrameData->context.uc_mcontext.x[24]; in arch_restore_signal_frame()
299 frame->s10 = signalFrameData->context.uc_mcontext.x[25]; in arch_restore_signal_frame()
300 frame->s11 = signalFrameData->context.uc_mcontext.x[26]; in arch_restore_signal_frame()
301 frame->t3 = signalFrameData->context.uc_mcontext.x[27]; in arch_restore_signal_frame()
302 frame->t4 = signalFrameData->context.uc_mcontext.x[28]; in arch_restore_signal_frame()
303 frame->t5 = signalFrameData->context.uc_mcontext.x[29]; in arch_restore_signal_frame()
304 frame->t6 = signalFrameData->context.uc_mcontext.x[30]; in arch_restore_signal_frame()
305 frame->epc = signalFrameData->context.uc_mcontext.pc; in arch_restore_signal_frame()
308 return frame->a0; in arch_restore_signal_frame()
326 memcpy(&arg->frame, thread_get_current_thread()->arch_info.userFrame, in arch_store_fork_frame()
328 arg->frame.a0 = 0; // fork return value in arch_store_fork_frame()
356 arg->frame.status = status.val; in arch_restore_fork_frame()
357 arch_load_user_iframe(stackHeader, &arg->frame); in arch_restore_fork_frame()