ARM: 8713/1: NOMMU: Support MPU in XIP configuration
authorVladimir Murzin <vladimir.murzin@arm.com>
Mon, 16 Oct 2017 12:00:45 +0000 (13:00 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Mon, 23 Oct 2017 15:59:31 +0000 (16:59 +0100)
commit216218308cfb0939aeecb246b34faf6e179c8d57
treeac012bba6a2ab6728d7747b57cbf7fdc4a892912
parent5c9d9a1b3a540779ba3f2d5e81150b2d92dcb74a
ARM: 8713/1: NOMMU: Support MPU in XIP configuration

Currently, there is assumption in early MPU setup code that kernel
image is located in RAM, which is obviously not true for XIP. To run
code from ROM we need to make sure that it is covered by MPU. However,
due to we allocate regions (semi-)dynamically we can run into issue of
trimming region we are running from in case ROM spawns several MPU
regions. To help deal with that we enforce minimum alignments for start
end end of XIP address space as 1MB and 128Kb correspondingly.

Tested-by: Alexandre TORGUE <alexandre.torgue@st.com>
Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
arch/arm/Kconfig-nommu
arch/arm/include/asm/mpu.h
arch/arm/kernel/head-nommu.S
arch/arm/kernel/vmlinux-xip.lds.S
arch/arm/mm/pmsa-v7.c