Skip to content

Commit

Permalink
arch: arm: Don't use STKALIGN mask on ARMv8-M Baseline
Browse files Browse the repository at this point in the history
The STKALIGN mask is not present for CONFIG_ARMV8_M_BASELINE as
well as CONFIG_ARMV8_M_MAINLINE. So filter out that check when
setting the sp for ARM core dumps.

Signed-off-by: Mark Holden <[email protected]>
  • Loading branch information
mrkhldn committed Nov 14, 2024
1 parent 40cd35e commit 06da9a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/include/cortex_m/exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ static ALWAYS_INLINE void z_arm_set_fault_sp(const struct arch_esf *esf, uint32_
}
#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */

#ifndef CONFIG_ARMV8_M_MAINLINE
#if !(defined(CONFIG_ARMV8_M_MAINLINE) || defined(CONFIG_ARMV8_M_BASELINE))
if ((esf->basic.xpsr & SCB_CCR_STKALIGN_Msk) == SCB_CCR_STKALIGN_Msk) {
/* Adjust stack alignment after PSR bit[9] detected */
z_arm_coredump_fault_sp |= 0x4;
Expand Down

0 comments on commit 06da9a7

Please sign in to comment.