Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: riscv: Modify S-mode boot flow to compatible with M-mode firmware
In system of S-mode OP-TEE, M-mode firmware transfers control flow to OP-TEE during boot. M-mode runs one hart, which called boot hart, to executes system initialization and jumps into OP-TEE. However, the ID of boot hart might not be always zero. That is, M-mode firmware may choose a hart, whose ID is non-zero, to jump into OP-TEE "_start" symbol to do OP-TEE initialization. Therefore, it is not feasible to let all harts enter "_start" symbol, and judge whether current hart is primary boot hart, by checking ID is zero or not. Fix it by letting non-boot hart enter "reset_secondary", in S-mode OP-TEE. So that all the harts can do their right things regardless of their hart ID. Only OP-TEE runs in M-mode will judge primary hart by checking whether the hart ID is zero. Signed-off-by: Alvin Chang <[email protected]>
- Loading branch information