[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [PATCH v3 23/43] arm64: implement the arm_start_thread
This patch implements the arm_start_thread which is called when a thread is executed at the first time. Signed-off-by: Huang Shijie <shijie.huang@xxxxxxx> --- arch/arm/arm64/arm64.S | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/arm64/arm64.S b/arch/arm/arm64/arm64.S index 5f55f99..93ffc89 100644 --- a/arch/arm/arm64/arm64.S +++ b/arch/arm/arm64/arm64.S @@ -472,3 +472,17 @@ ENTRY(__arch_switch_threads) br x30 ENDPROC(__arch_switch_threads) + +/* + * => sp = thread->sp + * <= x0 -> user data + * x1 -> thread's main function + * + * Get the x0/x1, and set the lr(x30) with exit_thread. + */ +ENTRY(arm_start_thread) + mov x2, sp + ldp x0, x1, [x2] + ldr x30, =exit_thread + br x1 +ENDPROC(arm_start_thread) -- 2.7.4 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |