tfm_svcall_psa_get() receives 0 signal in doorbell scenario
Closed, ResolvedPublic

Description

We have a doorbell_test which panics.

In one of the psa_get() it gets to this panic in tfm_svcall_psa_get():

/*
 * It is a fatal error if the caller call psa_get() when no message has
 * been set. The caller must call this function after a RoT Service signal
 * is returned by psa_wait().
 */
if (partition->signals == 0) {
    tfm_panic();
}
mikisch81 created this task.Mar 4 2019, 2:00 PM

Hi @mikisch81 ,
We have spotted this issue, and now thinking the best solution for it. Please ping me if you have any updates for this task, thanks!

Can you elaborate on the root cause?

Can you elaborate on the root cause?

It was caused by the event status is not aligned with signal status. The DOORBELL is cleared in psa_clear, in that case, the related event needs to be set as WAITED since it does not have any signals anymore -- but actually, event status is not changed. We are thingking if we need to abstract the signal type into a dedicated sync type instead of relying on the event.

i can confirm that the patch is working on mbed-os with NXP LPC55S69

KenLSoft closed this task as Resolved.Mar 30 2019, 10:05 AM