reset_primary()- Zero .bss section.
set_tp()- Set
$tptothread_core_local[hartid]. - Save current hart ID to
thread_core_local[hartid].hart_id. thread_init_thread_core_local()- Set
thread_core_local.curr_threadtoTHREAD_ID_INVALIDfor all cores (CFG_TEE_CORE_NB_CORE). - Set
thread_core_local.flagtoTHREAD_CLF_TMPto 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_endtostack_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
$satptocore_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_threadtoTHREAD_ID_INVALID. - thread_return_to_udomain()
- Before calling:
$a0is set toTEEABI_OPTEED_RETURN_ENTRY_DONE.$a1is set tothread_vector_table.$a3~$a5are set to 0.- This will eventually set
entry_vector_tablein OpenSBI.
reset_primary()c
Loading...