boards: stm32: Turn hardware stack protection on by default

Enable HW stack protection by default on all STM32 when possible.
This excludes all series based on M0(FO) and M0+(G0/L0).
Also this is made only on boards with enabled MPU (SRAM > 64K).

Cf similar change on nRF boards: #28470

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2020-09-21 16:53:25 +02:00 committed by Kumar Gala
parent 762b806c3d
commit 3ab5ac81ca
60 changed files with 180 additions and 0 deletions

View file

@ -9,6 +9,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=168000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
CONFIG_SERIAL=y
# console

View file

@ -9,6 +9,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=84000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable uart driver
CONFIG_SERIAL=y

View file

@ -6,6 +6,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=209000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable GPIO
CONFIG_GPIO=y

View file

@ -9,6 +9,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=84000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
CONFIG_SERIAL=y
# console

View file

@ -9,6 +9,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=84000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable uart driver
CONFIG_SERIAL=y

View file

@ -9,6 +9,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=84000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
CONFIG_SERIAL=y
# console

View file

@ -6,6 +6,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=32000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable uart driver
CONFIG_SERIAL=y

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=168000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
CONFIG_SERIAL=y
# console

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=168000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# Enable UART
CONFIG_SERIAL=y

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=168000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# Enable UART
CONFIG_SERIAL=y

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=96000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# Serial Drivers
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y

View file

@ -44,3 +44,6 @@ CONFIG_UART_CONSOLE=y
# enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y

View file

@ -7,6 +7,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=168000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
CONFIG_SERIAL=y
# console

View file

@ -9,6 +9,9 @@ CONFIG_SERIAL=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

View file

@ -10,6 +10,9 @@ CONFIG_SERIAL=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=84000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
CONFIG_SERIAL=y
# console

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=96000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
CONFIG_SERIAL=y
# console

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=96000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
CONFIG_SERIAL=y
# console

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=96000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
CONFIG_SERIAL=y
# console

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=168000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
CONFIG_SERIAL=y
# console

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=96000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
CONFIG_SERIAL=y
# console

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# Enable UART
CONFIG_SERIAL=y

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# Enable UART
CONFIG_SERIAL=y

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# Enable UART
CONFIG_SERIAL=y

View file

@ -55,3 +55,6 @@ CONFIG_UART_CONSOLE=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y

View file

@ -55,3 +55,6 @@ CONFIG_UART_CONSOLE=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=96000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# Enable UART
CONFIG_SERIAL=y

View file

@ -10,6 +10,9 @@ CONFIG_BOARD_NUCLEO_H745ZI_Q_M7=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# Enable UART ( disable to assign to M4 core)
CONFIG_SERIAL=y

View file

@ -9,6 +9,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=32000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable uart driver
CONFIG_SERIAL=y
# enable console

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=80000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable uart driver
CONFIG_SERIAL=y

View file

@ -11,6 +11,9 @@ CONFIG_SERIAL=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable pinmux
CONFIG_PINMUX=y

View file

@ -11,6 +11,9 @@ CONFIG_SERIAL=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable pinmux
CONFIG_PINMUX=y

View file

@ -39,3 +39,6 @@ CONFIG_PWM=y
#enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y

View file

@ -36,3 +36,6 @@ CONFIG_UART_CONSOLE=y
#enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y

View file

@ -55,3 +55,6 @@ CONFIG_UART_CONSOLE=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y

View file

@ -40,3 +40,6 @@ CONFIG_UART_CONSOLE=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y

View file

@ -31,3 +31,6 @@ CONFIG_UART_CONSOLE=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=168000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
CONFIG_SERIAL=y
# console

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=168000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
CONFIG_SERIAL=y
# console

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=168000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
CONFIG_SERIAL=y
# console

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable uart driver
CONFIG_SERIAL=y

View file

@ -57,3 +57,6 @@ CONFIG_UART_CONSOLE=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y

View file

@ -12,6 +12,9 @@ CONFIG_FPU=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# General Kernel Options
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000

View file

@ -14,6 +14,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable uart driver
CONFIG_SERIAL=y

View file

@ -9,6 +9,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable uart driver
CONFIG_SERIAL=y

View file

@ -11,6 +11,9 @@ CONFIG_FPU=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable uart driver
CONFIG_SERIAL=y

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=96000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# Serial Drivers
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=100000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
CONFIG_SERIAL=y
# console

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=168000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
CONFIG_SERIAL=y
# console

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=180000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
CONFIG_SERIAL=y
# console

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=168000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
CONFIG_SERIAL=y
# console

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=216000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
CONFIG_SERIAL=y
# console

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=216000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
CONFIG_SERIAL=y
# console

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=216000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
CONFIG_SERIAL=y
# console

View file

@ -18,6 +18,9 @@ CONFIG_CLOCK_CONTROL=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# By default SERIAL peripherals are assigned to m7
# enable uart driver

View file

@ -33,6 +33,9 @@ CONFIG_CLOCK_STM32_PLL_R_DIVISOR=2
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# Disable following to assign serial ports to m4 core
# enable uart driver

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=80000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable uart driver
CONFIG_SERIAL=y

View file

@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=80000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable uart driver
CONFIG_SERIAL=y

View file

@ -9,6 +9,9 @@ CONFIG_GPIO=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable uart driver
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y

View file

@ -10,6 +10,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=24000000
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable uart driver
CONFIG_SERIAL=y