This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM64X: Spinlock and Warm Reset

Part Number: PROCESSOR-SDK-AM64X

Hello,

we once had the issue that Spinlocks will not reset properly after a "warm" reset, mentioned here: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1008815/processor-sdk-am64x-ccs-cpu-reset-does-not-reset-spinlocks/3728731?tisearch=e2e-sitesearch&keymatch=%25252525252520user%2525252525253A453845#3728731

So we need to manually reset them.

Now the following scenario: We are locking a Spinlock and another core triggers a warm reset of all 4 R5F-Cores (so no SBL involved). After the reset the lock is still active and no core can get the lock again.
We do not know which core will be first and sharing the information about who is first and shall reset the Spinlock is some overhead. We are also not starting our SBL, which can of course reset the Spinlocks, because it would be the only application running at this time.

So a warm reset can lead to a deadlock of the Spinlocks in the worst case, because the lock is still active. What happens if every core tries to reset the Spinlocks? Would this be at least a workaround or even a viable solution?

Best regards

Felix

  • Hi Felix,

    I believe you don't need to reset the spinlock but just release the lock after all four cores undergoes CPU reset (please note, warm reset is partial device reset where peripherals also undergo reset.  I believe when you mentioned warm reset, you meant CPU resets).

    To avoid each core releasing the lock or resetting the spinlock, you can designate one core (R5 SS0 core 0) to implement some static init check to detect core/CPU reset vs power on reset. All other cores can wait till they receive init time notification to proceed.

    As mentioned in the TRM section system bug recovery, you can check for lock being taken before releasing the lock instead of doing the SW reset.

    Regards,

    Prasad