Skip to content

Commit

Permalink
core: riscv: Apply SM-based boot flow for secondary harts
Browse files Browse the repository at this point in the history
When the system adopts M-mode secure monitor based solution, the
secondary harts need to hand over the control back to the secure
monitor after the initial boot sequence. Add related code for this
purpose.

Signed-off-by: Alvin Chang <alvinga@andestech.com>
  • Loading branch information
gagachang committed Mar 2, 2024
1 parent b54d6b7 commit 631ee90
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/arch/riscv/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,11 @@ UNWIND( .cantunwind)
cpu_is_ready

jal boot_init_secondary
#ifdef CFG_RISCV_WITH_M_MODE_SM
/* Return to untrusted domain */
li a0, TEEABI_OPTEED_RETURN_ON_DONE
j thread_return_to_udomain
#endif
j .
END_FUNC reset_secondary

Expand Down

0 comments on commit 631ee90

Please sign in to comment.