stm32f7:Support CONFIG_MPU_RESET and CONFIG_ARM_MPU_EARLY_RESET

This commit is contained in:
David Sidrane
2021-09-22 10:48:09 -07:00
committed by Xiang Xiao
parent fd2c1cb216
commit e66423229a
3 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ ifeq ($(CONFIG_ARMV7M_ITMSYSLOG),y)
CMN_CSRCS += arm_itm_syslog.c CMN_CSRCS += arm_itm_syslog.c
endif endif
ifeq ($(CONFIG_ARM_MPU),y) ifneq ($(filter y,$(CONFIG_ARM_MPU) $(CONFIG_ARM_MPU_EARLY_RESET)),)
CMN_CSRCS += arm_mpu.c CMN_CSRCS += arm_mpu.c
endif endif
+4
View File
@@ -70,6 +70,10 @@ void stm32_mpuinitialize(void)
mpu_showtype(); mpu_showtype();
/* Reset MPU if enabled */
mpu_reset();
/* Configure user flash space */ /* Configure user flash space */
mpu_user_flash(USERSPACE->us_textstart, mpu_user_flash(USERSPACE->us_textstart,
+5
View File
@@ -35,6 +35,7 @@
#include "arm_arch.h" #include "arm_arch.h"
#include "arm_internal.h" #include "arm_internal.h"
#include "nvic.h" #include "nvic.h"
#include "mpu.h"
#include "barriers.h" #include "barriers.h"
#include "stm32_rcc.h" #include "stm32_rcc.h"
@@ -261,6 +262,10 @@ void __start(void)
"r"(CONFIG_IDLETHREAD_STACKSIZE - 64) :); "r"(CONFIG_IDLETHREAD_STACKSIZE - 64) :);
#endif #endif
/* If enabled reset the MPU */
mpu_early_reset();
/* Clear .bss. We'll do this inline (vs. calling memset) just to be /* Clear .bss. We'll do this inline (vs. calling memset) just to be
* certain that there are no issues with the state of global variables. * certain that there are no issues with the state of global variables.
*/ */