bugfix(freertos): CPU switch from kernel to user mode

This commit is contained in:
Dong Heng
2018-07-18 10:26:15 +08:00
parent aee25e9e53
commit 627452e85c

View File

@ -1521,9 +1521,15 @@ _xt_ext_panic:
*
* Todo: Close NMI
*/
rsil a0, XCHAL_EXCM_LEVEL
rsil a0, PS_INTLEVEL(5)
wsr a0, EXCSAVE_2
/*
* CPU must switch from kernel mode to user mode
*/
movi a0, PS_INTLEVEL(5) | PS_UM
wsr a0, PS
/* Allocate exception frame and save minimal context. */
mov a0, sp
movi sp, _chip_interrupt_tmp