components/bt: Disable exception mode after saving special registers

To store some registers first, avoid stuck due to live lock after disabling exception mode
This commit is contained in:
baohongde 2020-05-30 17:29:25 +08:00 committed by maojianxin
parent 5e6824e3ea
commit 44985f00d3

View File

@ -39,11 +39,6 @@ _l4_save_ctx:
.type xt_highint4,@function
.align 4
xt_highint4:
/* disable exception mode, window overflow */
movi a0, PS_INTLEVEL(5) | PS_EXCM /*TOCHECK*/
wsr a0, PS
rsync
movi a0, _l4_save_ctx
/* save 4 lower registers */
s32i a1, a0, 4
@ -69,6 +64,11 @@ xt_highint4:
rsr a2, EPC1
s32i a2, a0, 24
/* disable exception mode, window overflow */
movi a0, PS_INTLEVEL(5) | PS_EXCM /*TOCHECK*/
wsr a0, PS
rsync
/* Save the remaining physical registers.
* 4 registers are already saved, which leaves 60 registers to save.
* (FIXME: consider the case when the CPU is configured with physical 32 registers)