mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-03 20:54:32 +02:00
change(vector.S): port hw stack guard change to p4
This commit is contained in:
committed by
Armando (Dou Yiwen)
parent
ecf1461f1c
commit
fd096c012d
@@ -40,7 +40,7 @@
|
|||||||
.type rtos_int_enter, @function
|
.type rtos_int_enter, @function
|
||||||
rtos_int_enter:
|
rtos_int_enter:
|
||||||
#if CONFIG_IDF_TARGET_ESP32P4
|
#if CONFIG_IDF_TARGET_ESP32P4
|
||||||
/* needs jira for p4 */
|
//TODO: IDF-7861
|
||||||
/* preserve the return address */
|
/* preserve the return address */
|
||||||
mv t1, ra
|
mv t1, ra
|
||||||
mv t2, a0
|
mv t2, a0
|
||||||
@@ -106,7 +106,7 @@ rtos_int_enter:
|
|||||||
|
|
||||||
rtos_enter_end:
|
rtos_enter_end:
|
||||||
#if CONFIG_IDF_TARGET_ESP32P4
|
#if CONFIG_IDF_TARGET_ESP32P4
|
||||||
/* needs jira for p4 */
|
//TODO: IDF-7861
|
||||||
mv ra, t1
|
mv ra, t1
|
||||||
#endif
|
#endif
|
||||||
ret
|
ret
|
||||||
|
@@ -300,6 +300,12 @@ _interrupt_handler:
|
|||||||
/* Save SP */
|
/* Save SP */
|
||||||
sw t0, RV_STK_SP(sp)
|
sw t0, RV_STK_SP(sp)
|
||||||
|
|
||||||
|
#if CONFIG_IDF_TARGET_ESP32P4
|
||||||
|
//TODO: IDF-7861
|
||||||
|
/* Before doing anythig preserve the stack pointer */
|
||||||
|
/* It will be saved in current TCB, if needed */
|
||||||
|
mv a0, sp
|
||||||
|
#endif //#if CONFIG_IDF_TARGET_ESP32P4
|
||||||
call rtos_int_enter
|
call rtos_int_enter
|
||||||
/* If this is a non-nested interrupt, SP now points to the interrupt stack */
|
/* If this is a non-nested interrupt, SP now points to the interrupt stack */
|
||||||
|
|
||||||
@@ -375,6 +381,12 @@ _interrupt_handler:
|
|||||||
#endif
|
#endif
|
||||||
call rtos_int_exit
|
call rtos_int_exit
|
||||||
|
|
||||||
|
#if CONFIG_IDF_TARGET_ESP32P4
|
||||||
|
//TODO: IDF-7861
|
||||||
|
/* The next (or current) stack pointer is returned in a0 */
|
||||||
|
mv sp, a0
|
||||||
|
#endif //#if CONFIG_IDF_TARGET_ESP32P4
|
||||||
|
|
||||||
/* restore the rest of the registers */
|
/* restore the rest of the registers */
|
||||||
csrw mcause, s1
|
csrw mcause, s1
|
||||||
csrw mstatus, s2
|
csrw mstatus, s2
|
||||||
|
Reference in New Issue
Block a user