arch/armv8-m/up_blocktask.c : Fix wrong tcb for saving secure context
To make context switching, we should save the secure context into current running tcb, not to be blocked one.
So change tcb to rtcb.
@@ -144,7 +144,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
if (switch_needed) {
#ifdef CONFIG_ARMV8M_TRUSTZONE
if (tcb->tz_context) {
- TZ_StoreContext_S(tcb->tz_context);
+ TZ_StoreContext_S(rtcb->tz_context);
}
#endif
/* Are we in an interrupt handler? */
