diff --git a/arch/arm64/src/common/arm64_vector_table.S b/arch/arm64/src/common/arm64_vector_table.S index e7b1eb0056..d438634a3b 100644 --- a/arch/arm64/src/common/arm64_vector_table.S +++ b/arch/arm64/src/common/arm64_vector_table.S @@ -143,7 +143,7 @@ SECTION_SUBSEC_FUNC(exc_vector_table,_vector_table_section,_vector_table) /* Current EL with SP0 / Synchronous */ .align 7 - arm64_enter_exception x0, x1 + arm64_enter_exception x9, x10 b arm64_sync_exc /* Current EL with SP0 / IRQ */ @@ -167,7 +167,7 @@ SECTION_SUBSEC_FUNC(exc_vector_table,_vector_table_section,_vector_table) /* Current EL with SPx / Synchronous */ .align 7 - arm64_enter_exception x0, x1 + arm64_enter_exception x9, x10 b arm64_sync_exc /* Current EL with SPx / IRQ */ @@ -191,7 +191,7 @@ SECTION_SUBSEC_FUNC(exc_vector_table,_vector_table_section,_vector_table) /* Lower EL using AArch64 / Synchronous */ .align 7 - arm64_enter_exception x0, x1 + arm64_enter_exception x9, x10 b arm64_sync_exc /* Lower EL using AArch64 / IRQ */ diff --git a/arch/arm64/src/common/arm64_vectors.S b/arch/arm64/src/common/arm64_vectors.S index 799b533ff2..3a4ce2f74c 100644 --- a/arch/arm64/src/common/arm64_vectors.S +++ b/arch/arm64/src/common/arm64_vectors.S @@ -187,18 +187,18 @@ SECTION_FUNC(text, arm64_sync_exc) /* checking the EC value to see which exception need to be handle */ #if CONFIG_ARCH_ARM64_EXCEPTION_LEVEL == 3 - mrs x0, esr_el3 + mrs x9, esr_el3 #else - mrs x0, esr_el1 + mrs x9, esr_el1 #endif - lsr x1, x0, #26 + lsr x10, x9, #26 #ifdef CONFIG_ARCH_FPU /* fpu trap */ - cmp x1, #0x07 /*Access to SIMD or floating-point */ + cmp x10, #0x07 /* Access to SIMD or floating-point */ bne 1f - mov x0, sp + mov x0, sp /* x0 = context */ bl arm64_fpu_trap /* when the fpu trap is handled */ @@ -208,7 +208,7 @@ SECTION_FUNC(text, arm64_sync_exc) #endif /* 0x15 = SVC system call */ - cmp x1, #0x15 + cmp x10, #0x15 /* if this is a svc call ?*/ @@ -248,6 +248,7 @@ SECTION_FUNC(text, arm64_sync_exc) */ mov x0, sp /* x0 = reg frame */ + /* Call arm64_syscall() on the user stack */ bl arm64_syscall /* Call the handler */