Skip to content
Commit be49df62 authored by Aurelien Jarno's avatar Aurelien Jarno Committed by Kumar Gala
Browse files

arch: arm: cortex_m: z_arm_mpu_init: fix D-Cache invalidation



In case CONFIG_NOCACHE_MEMORY=y, the D-Cache need to be clean and
invalidated before enabling the MPU to make sure no data from a
__nocache__ region is present in the D-Cache.

If the D-Cache is disabled, SCB_CleanInvalidateDCache() shall not be
used as it might contains random data for random addresses, and this
might just create a bus fault.

Signed-off-by: default avatarAurelien Jarno <aurelien@aurel32.net>
parent 1a583e44
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment