Skip to content

Commit

Permalink
enter exception save sp_sl0,exit exception restroe sp_el0
Browse files Browse the repository at this point in the history
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
  • Loading branch information
lipengfei28 committed Sep 18, 2024
1 parent ba3f92b commit 1e1c326
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/arm64/src/common/arm64_vector_table.S
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@
#endif
stp x0, x1, [sp, #8 * REG_ELR]

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

/* Increment exception depth */

mrs x0, tpidrro_el0
Expand Down Expand Up @@ -262,6 +266,10 @@ SECTION_FUNC(text, arm64_exit_exception)
msr spsr_el1, x1
#endif

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

/* decrement exception depth */

mrs x0, tpidrro_el0
Expand Down

0 comments on commit 1e1c326

Please sign in to comment.