Skip to content

Commit f059db8

Browse files
committed
soc: nordic: vpr: align ESF_SW_IRQ_SIZEOF with new exception debug
There is new exception debugging mechanism for RISCV which needs additional data in arch_esf structure. Since VPRs need to know size of the part stacked by sw, ESF_SW_IRQ_SIZEOF needs to be aligned. This ensures hardware stacking works correctly. Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
1 parent 869881e commit f059db8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

soc/nordic/common/vpr/soc_isr_stacking.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,11 @@
9292
* Size of the SW managed part of the ESF in case of interrupt
9393
* sizeof(__padding) + ... + sizeof(soc_context)
9494
*/
95+
#ifdef CONFIG_EXCEPTION_DEBUG
96+
#define ESF_SW_IRQ_SIZEOF (0x10 + __callee_saved_t_SIZEOF)
97+
#else
9598
#define ESF_SW_IRQ_SIZEOF (0x10)
99+
#endif
96100

97101
/*
98102
* VPR needs aligned(8) SP when doing HW stacking, if this condition is not fulfilled it will move

0 commit comments

Comments
 (0)