[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [PATCH 21/40] 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.

Change-Id: I18dac6cbdc9771248bc27ee437313dd8dfb04765
Jira: ENTOS-247
Signed-off-by: Huang Shijie <shijie.huang@xxxxxxx>
---
 arch/arm/arm64/arm64.S | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/arm64/arm64.S b/arch/arm/arm64/arm64.S
index 6dab875..f63a1be 100644
--- a/arch/arm/arm64/arm64.S
+++ b/arch/arm/arm64/arm64.S
@@ -520,3 +520,15 @@ ENTRY(__arch_switch_threads)
     mov   sp,  x4
     ret
 ENDPROC(__arch_switch_threads)
+
+/*
+ * => sp = thread->sp
+ * <= x0 -> user data
+ *    x1 -> thread's main function
+ */
+ENTRY(arm_start_thread)
+    add  x2, sp, #(CALLEE_SAVED_REGISTERS * 8)
+    ldp  x0, x1, [x2]
+    ldr  x30, =exit_thread
+    blr  x1
+ENDPROC(arm_start_thread)
-- 
2.7.4


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.