]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ARM: mpu: add early bring-up code for the ARMv7 PMSA-compliant MPU
authorJonathan Austin <jonathan.austin@arm.com>
Fri, 22 Feb 2013 17:48:56 +0000 (17:48 +0000)
committerJonathan Austin <jonathan.austin@arm.com>
Fri, 7 Jun 2013 16:02:51 +0000 (17:02 +0100)
commit67c9845beab16a0c97b9c07f72a4b36b7175bb86
treeeb1346cee133ca027d874b1dfb9fc0f98504587a
parenta2b45b0da8bbb98cb2f062cf16c6fdebab4243a1
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>
arch/arm/include/asm/mpu.h
arch/arm/kernel/head-nommu.S