Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: support fault mitigations in non-threaded code
Fault mitigation won't work in non-threaded code due to the following error: assertion 'ct >= 0 && ct < CFG_NUM_THREADS' failed at core/arch/arm/kernel /thread.c:799 <thread_get_id> The problem is in __ftmn_get_tsd_func_arg_pp which calls thread_get_tsd which thread_get_id. The reason is that the interrupt handler is not associated with any thread, so the ct (current_thread_id) value is -1 which would cause an assert problem. The fix is to add ftmn_arg to thread_core_local and the new variable would be used when the current thread is < 0. Signed-off-by: Sichun Qin <sichun.qin@amlogic.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
- Loading branch information