mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
change(vector.S): port hw stack guard change to p4
This commit is contained in:
parent
ecf1461f1c
commit
fd096c012d
@ -40,7 +40,7 @@
|
||||
.type rtos_int_enter, @function
|
||||
rtos_int_enter:
|
||||
#if CONFIG_IDF_TARGET_ESP32P4
|
||||
/* needs jira for p4 */
|
||||
//TODO: IDF-7861
|
||||
/* preserve the return address */
|
||||
mv t1, ra
|
||||
mv t2, a0
|
||||
@ -106,7 +106,7 @@ rtos_int_enter:
|
||||
|
||||
rtos_enter_end:
|
||||
#if CONFIG_IDF_TARGET_ESP32P4
|
||||
/* needs jira for p4 */
|
||||
//TODO: IDF-7861
|
||||
mv ra, t1
|
||||
#endif
|
||||
ret
|
||||
|
@ -300,6 +300,12 @@ _interrupt_handler:
|
||||
/* Save 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
|
||||
/* If this is a non-nested interrupt, SP now points to the interrupt stack */
|
||||
|
||||
@ -375,6 +381,12 @@ _interrupt_handler:
|
||||
#endif
|
||||
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 */
|
||||
csrw mcause, s1
|
||||
csrw mstatus, s2
|
||||
|
Loading…
x
Reference in New Issue
Block a user