This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push: new f6cfcfa39f armv6-m: fix the incorrect stub-function entry address of svc call f6cfcfa39f is described below commit f6cfcfa39fa951387e9805b0ee0f536c76383a43 Author: guoshichao <guoshic...@xiaomi.com> AuthorDate: Thu Nov 21 14:42:25 2024 +0800 armv6-m: fix the incorrect stub-function entry address of svc call the stub-function entry address is stored in r4, we should branch to the stub-function with blx r4, not r5 Signed-off-by: guoshichao <guoshic...@xiaomi.com> --- arch/arm/src/armv6-m/arm_svcall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/src/armv6-m/arm_svcall.c b/arch/arm/src/armv6-m/arm_svcall.c index 411138b3e1..1f0e1c4eb6 100644 --- a/arch/arm/src/armv6-m/arm_svcall.c +++ b/arch/arm/src/armv6-m/arm_svcall.c @@ -92,7 +92,7 @@ static void dispatch_syscall(void) " ldr r4, =g_stublookup\n" /* R4=The base of the stub lookup table */ " lsl r0, r0, #2\n" /* R0=Offset of the stub for this syscall */ " ldr r4, [r4, r0]\n" /* R4=Address of the stub for this syscall */ - " blx r5\n" /* Call the stub (modifies lr) */ + " blx r4\n" /* Call the stub (modifies lr) */ " mov lr, r5\n" /* Restore lr */ " add sp, sp, #12\n" /* Destroy the stack frame */ " pop {r4, r5}\n" /* Recover R4 and R5 */