Merge pull request #14821 from bergzand/pr/cortexm_common/enable_mpu_after_config
cortexm_common: Enable MPU after configuring regions
This commit is contained in:
commit
659c351c02
@ -140,10 +140,6 @@ void reset_handler_default(void)
|
|||||||
}
|
}
|
||||||
#endif /* CPU_HAS_BACKUP_RAM */
|
#endif /* CPU_HAS_BACKUP_RAM */
|
||||||
|
|
||||||
#if defined(MODULE_MPU_STACK_GUARD) || defined(MODULE_MPU_NOEXEC_RAM)
|
|
||||||
mpu_enable();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef MODULE_MPU_NOEXEC_RAM
|
#ifdef MODULE_MPU_NOEXEC_RAM
|
||||||
/* Mark the RAM non executable. This is a protection mechanism which
|
/* Mark the RAM non executable. This is a protection mechanism which
|
||||||
* makes exploitation of buffer overflows significantly harder.
|
* makes exploitation of buffer overflows significantly harder.
|
||||||
@ -169,6 +165,10 @@ void reset_handler_default(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(MODULE_MPU_STACK_GUARD) || defined(MODULE_MPU_NOEXEC_RAM)
|
||||||
|
mpu_enable();
|
||||||
|
#endif
|
||||||
|
|
||||||
post_startup();
|
post_startup();
|
||||||
|
|
||||||
/* initialize the board (which also initiates CPU initialization) */
|
/* initialize the board (which also initiates CPU initialization) */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user