aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm
diff options
context:
space:
mode:
authorJonathan Austin <jonathan.austin@arm.com>2013-02-22 17:48:56 +0000
committerJonathan Austin <jonathan.austin@arm.com>2013-06-07 17:02:51 +0100
commit67c9845beab16a0c97b9c07f72a4b36b7175bb86 (patch)
treeeb1346cee133ca027d874b1dfb9fc0f98504587a /arch/arm/include/asm
parentARM: mpu: add header for MPU register layouts and region data (diff)
downloadlinux-dev-67c9845beab16a0c97b9c07f72a4b36b7175bb86.tar.xz
linux-dev-67c9845beab16a0c97b9c07f72a4b36b7175bb86.zip
ARM: mpu: add early bring-up code for the ARMv7 PMSA-compliant MPU
This patch adds initial support for using the MPU, which is necessary for SMP operation on PMSAv7 processors because it is the only way to ensure memory is shared. This is an initial patch and full SMP support is added later in this series. The setup of the MPU is performed in a way analagous to that for the MMU: Very early initialisation before the C environment is brought up, followed by a sanity check and more complete initialisation in C. This patch provides the simplest possible memory region configuration: MPU_PROBE_REGION: Reserved for probing MPU details, not enabled MPU_BG_REGION: A 'background' region that specifies all memory strongly ordered MPU_RAM_REGION: A single shared, cacheable, normal region for the valid RAM. In this early initialisation code we simply map the whole of the address space with the BG_REGION and (at least) the kernel with the RAM_REGION. The MPU has region alignment constraints that require us to round past the end of the kernel. As region 2 has a higher priority than region 1, it overrides the strongly- ordered behaviour for RAM only. Subsequent patches will add more complete initialisation from the C-world and support for bringing up secondary CPUs. Signed-off-by: Jonathan Austin <jonathan.austin@arm.com> Reviewed-by: Will Deacon <will.deacon@arm.com> CC: Hyok S. Choi <hyok.choi@samsung.com>
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r--arch/arm/include/asm/mpu.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/include/asm/mpu.h b/arch/arm/include/asm/mpu.h
index bd48c0cb544e..001483465aa4 100644
--- a/arch/arm/include/asm/mpu.h
+++ b/arch/arm/include/asm/mpu.h
@@ -50,6 +50,9 @@
/* Maximum number of regions Linux is interested in */
#define MPU_MAX_REGIONS 16
+#define MPU_DATA_SIDE 0
+#define MPU_INSTR_SIDE 1
+
#ifndef __ASSEMBLY__
struct mpu_rgn {