Commit Graph

6 Commits (jebbatime)

Author SHA1 Message Date
Damien George 4f2c737b0c stm32/mpu: Save and restore the IRQ state when configuring MPU.
In case IRQs are already disabled during the MPU configuration.

Fixes issue #5152.
2019-10-16 23:12:06 +11:00
Damien George 592f68449d stm32/mpu: Include MPU functions when ETH is enabled. 2019-07-03 23:50:34 +10:00
Damien George 8da39fd182 stm32/qspi: Use MPU to allow access to valid memory-mapped QSPI region.
The Cortex-M7 CPU will do speculative loads from any memory location that
is not explicitly forbidden.  This includes the QSPI memory-mapped region
starting at 0x90000000 and with size 256MiB.  Speculative loads to this
QSPI region may 1) interfere with the QSPI peripheral registers (eg the
address register) if the QSPI is not in memory-mapped mode; 2) attempt to
access data outside the configured size of the QSPI flash when it is in
memory-mapped mode.  Both of these scenarios will lead to issues with the
QSPI peripheral (eg Cortex bus lock up in scenario 2).

To prevent such speculative loads from interfering with the peripheral the
MPU is configured in this commit to restrict access to the QSPI mapped
region: when not memory mapped the entire region is forbidden; when memory
mapped only accesses to the valid flash size are permitted.
2019-07-03 01:27:33 +10:00
Damien George eca4115f66 stm32/sdram: Use MPU helper functions to configure MPU for SDRAM use. 2019-07-03 01:27:33 +10:00
Damien George f7eb2c72f7 stm32/eth: Use MPU helper functions to configure MPU for ETH use. 2019-07-03 01:27:33 +10:00
Damien George 8dcf25e1bd stm32/mpu: Add helper functions for configuring MPU. 2019-07-03 01:27:33 +10:00