arch: arm: mpu: force outstanding transactions before MPU disabling
The ARMv8-M Memory Protection Unit document indicates that a DMB instruction must be used before disabling the MPU in order to force outstanding memory transactions. The ARMv7-M documentation is less clear about that, and only specifies that a DSB instruction followed by a ISB instruction must be used before enabling the MPU, which is already the case. The ARMv7-M and ARMv8-M MPU are relatively similar to believe the same sequence should be used for disabling it. This patch therefore adds a DMB instruction before disabling the MPU. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
1397269335
commit
828ae6b8bc
1 changed files with 3 additions and 0 deletions
|
@ -72,6 +72,9 @@ void arm_core_mpu_enable(void)
|
|||
*/
|
||||
void arm_core_mpu_disable(void)
|
||||
{
|
||||
/* Force any outstanding transfers to complete before disabling MPU */
|
||||
__DMB();
|
||||
|
||||
/* Disable MPU */
|
||||
MPU->CTRL = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue