summaryrefslogtreecommitdiff
path: root/libcpu
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2019-05-09 12:57:47 +0800
committerGitHub <[email protected]>2019-05-09 12:57:47 +0800
commit2bf9ba0675dd7a6ab84f79abf2abfd8096710013 (patch)
tree70d1a96ac794a686007dbdcbfb10537dcf5fbc5b /libcpu
parentfa2d77ac72533f4b8bdcbdd4a48a562abe525edd (diff)
parent43c1236ec9fd0d8530714370b7a664efd6d9bf3a (diff)
Merge pull request #2661 from BernardXiong/pre-release_v4.0.1
Pre-release for v4.0.1
Diffstat (limited to 'libcpu')
-rw-r--r--libcpu/arm/cortex-a/context_gcc.S14
1 files changed, 8 insertions, 6 deletions
diff --git a/libcpu/arm/cortex-a/context_gcc.S b/libcpu/arm/cortex-a/context_gcc.S
index b009630fa8..af5c516e4d 100644
--- a/libcpu/arm/cortex-a/context_gcc.S
+++ b/libcpu/arm/cortex-a/context_gcc.S
@@ -34,8 +34,9 @@ rt_hw_interrupt_enable:
bx lr
/*
- * void rt_hw_context_switch_to(rt_uint32 to);
- * r0 --> to
+ * void rt_hw_context_switch_to(rt_uint32 to, struct rt_thread *to_thread);
+ * r0 --> to (thread stack)
+ * r1 --> to_thread
*/
.globl rt_hw_context_switch_to
rt_hw_context_switch_to:
@@ -64,9 +65,10 @@ _guest_switch_lvl:
.section .text.isr, "ax"
/*
- * void rt_hw_context_switch(rt_uint32 from, rt_uint32 to);
- * r0 --> from
- * r1 --> to
+ * void rt_hw_context_switch(rt_uint32 from, rt_uint32 to, struct rt_thread *to_thread);
+ * r0 --> from (from_thread stack)
+ * r1 --> to (to_thread stack)
+ * r2 --> to_thread
*/
.globl rt_hw_context_switch
rt_hw_context_switch:
@@ -158,7 +160,7 @@ rt_hw_context_switch_interrupt:
bl rt_cpus_lock_status_restore
#ifdef RT_USING_LWP
- ldmfd sp, {r13,r14}^ @pop usr_sp usr_lr
+ ldmfd sp, {r13,r14}^ @pop usr_sp usr_lr
add sp, #8
#endif