Skip to content

Commit

Permalink
to-be-squashed
Browse files Browse the repository at this point in the history
  • Loading branch information
pussuw committed Sep 27, 2024
1 parent 0e0620d commit 76cae8a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions arch/arm64/src/common/arm64_syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,8 @@ uint64_t *arm64_syscall(uint64_t *regs)
/* Restore the cpu lock */

restore_critical_section(tcb, cpu);
//regs[REG_SP_EL0]=read_sysreg(sp_el0);

Check failure on line 366 in arch/arm64/src/common/arm64_syscall.c

View workflow job for this annotation

GitHub Actions / check

C++ style comment

Check failure on line 366 in arch/arm64/src/common/arm64_syscall.c

View workflow job for this annotation

GitHub Actions / check

Operator/assignment must be preceded with whitespace

Check failure on line 366 in arch/arm64/src/common/arm64_syscall.c

View workflow job for this annotation

GitHub Actions / check

Operator/assignment must be followed with whitespace
write_sysreg(ret_regs[REG_SP_EL0], sp_el0);
}

return ret_regs;
Expand Down
8 changes: 4 additions & 4 deletions arch/arm64/src/common/arm64_vector_table.S
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@
#endif
stp \xreg0, \xreg1, [sp, #8 * REG_ELR]

mrs x0, sp_el0
mrs x1, tpidrro_el0
stp x0, x1, [sp, #8 * REG_SP_EL0]
mrs \xreg0, sp_el0
mrs \xreg1, tpidrro_el0
stp \xreg0, \xreg1, [sp, #8 * REG_SP_EL0]

/* Increment exception depth */

Expand Down Expand Up @@ -268,7 +268,7 @@ SECTION_FUNC(text, arm64_exit_exception)
#endif

ldp x0, x1, [sp, #8 * REG_SP_EL0]
msr sp_el0, x0
#msr sp_el0, x0
msr tpidrro_el0, x1

/* decrement exception depth */
Expand Down
2 changes: 2 additions & 0 deletions arch/arm64/src/common/arm64_vectors.S
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ SECTION_FUNC(text, arm64_jump_to_user)
and x0, x0, #~SPSR_MODE_MASK
#orr x0, x0, #SPSR_MODE_EL0T # EL0T=0x00, out of range for orr
str x0, [sp, #8 * REG_SPSR]
mov x0, sp
b arm64_exit_exception
#endif

Expand Down Expand Up @@ -177,6 +178,7 @@ SECTION_FUNC(text, arm64_sync_exc)
/* Save the return value into the user context */

str x0, [sp, #8 * REG_X0]
mov sp, x0

/* Return from exception */

Expand Down

0 comments on commit 76cae8a

Please sign in to comment.