Skip to content

Commit

Permalink
core: riscv: Register thread_vector_table in primary CPU initialization
Browse files Browse the repository at this point in the history
When primary CPU has initialized everything, it registers the address
of thread_vector_table into higher privileged software via a1 register.

Signed-off-by: Alvin Chang <alvinga@andestech.com>
  • Loading branch information
gagachang committed Oct 2, 2023
1 parent a78b640 commit d44e61e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/arch/riscv/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
#include <platform_config.h>
#include <riscv.h>
#include <riscv_macros.S>
#include <tee/optee_abi.h>
#include <tee/teeabi_opteed.h>
#include <tee/teeabi_opteed_macros.h>

.section .data
.balign 4
Expand Down Expand Up @@ -219,7 +222,10 @@ UNWIND( .cantunwind)
wait_secondary

jal thread_clr_boot_thread
j mu_service

li a0, TEEABI_OPTEED_RETURN_ENTRY_DONE
la a1, thread_vector_table
j teeabi_return_to_ree
END_FUNC reset_primary

LOCAL_FUNC reset_secondary , : , .identity_map
Expand Down

0 comments on commit d44e61e

Please sign in to comment.