reset_primary()
- Zero .bss section.
set_tp()
- Set
$tp
tothread_core_local[hartid]
. - Save current hart ID to
thread_core_local[hartid].hart_id
. thread_init_thread_core_local()
- Set
thread_core_local.curr_thread
toTHREAD_ID_INVALID
for all cores (CFG_TEE_CORE_NB_CORE
). - Set
thread_core_local.flag
toTHREAD_CLF_TMP
to indicate that it’s using the temporary stack for all cores (CFG_TEE_CORE_NB_CORE
). - Set first core’s
thread_core_local[0].tmp_stack_va_end
tostack_tmp[0]
. plat_primary_init_early()
- Do nothing right now.
console_init()
- In Andes’ demo, semihosting is used to print out the console.
core_init_mmu_map()
set_satp()
- Set
$satp
tocore_mmu_config.satp[hartid]
. core_mmu_config.satp[]
is configured incore_init_mmu_map()
.boot_init_primary_early()
boot_init_primary_late()
- Sync boot core and secondary cores.
thread_clr_boot_thread()
- Set current thread (
l->curr_thread
)’s state toTHREAD_STATE_FREE
. - Set
l->curr_thread
toTHREAD_ID_INVALID
. - thread_return_to_udomain()
- Before calling:
$a0
is set toTEEABI_OPTEED_RETURN_ENTRY_DONE
.$a1
is set tothread_vector_table
.$a3
~$a5
are set to 0.- This will eventually set
entry_vector_table
in OpenSBI.
reset_primary()c
Loading...