microblaze: Add custom break vector handler for mb manager
authorAppana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
Mon, 27 Jun 2022 06:40:23 +0000 (12:10 +0530)
committerMichal Simek <michal.simek@amd.com>
Mon, 26 Sep 2022 12:13:28 +0000 (14:13 +0200)
commit88707ebe77e23e856981e597f322cabbf6415662
treec6a93fc52d836473454d1f17619f9a47f3bd050e
parenta5e3aaa654c15760afdfb85d0b6fd825ce068efc
microblaze: Add custom break vector handler for mb manager

When the TMR Manager detects a fault Lockstep state it is signaled to the
MicroBlaze processors by asserting a break signal, When Microblaze gets
a break vector from tmr Microblaze it's needed to clear/block the break
bit in the tmr manager before performing recovery.
In order to perform recovery need to perform the following steps.
1) Store all internal MicroBlaze registers in RAM
2) Execute a suspend instruction which asserts the reset signal
3) Restore all registers from RAM and execute an RTBD instruction to
return from the reset handler, to resume execution at the place
where the break occurred.

This API supports getting called from kernel space only.

Signed-off-by: Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
Link: https://lore.kernel.org/r/20220627064024.771037-3-appana.durga.rao@xilinx.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
arch/microblaze/kernel/asm-offsets.c
arch/microblaze/kernel/entry.S