]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ARM: 7501/1: decompressor: reset ttbcr for VMSA ARMv7 cores
authorWill Deacon <will.deacon@arm.com>
Fri, 24 Aug 2012 14:20:59 +0000 (15:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Oct 2012 17:38:59 +0000 (10:38 -0700)
commit0b8bc8a2d1e5f5fcd19c90aece2712bdd86b5c2d
treecb7ccd8ce676cddb15afe77f8a0e9cac25ce2e86
parent868e5529c2686befc556cca687069bea4d426326
ARM: 7501/1: decompressor: reset ttbcr for VMSA ARMv7 cores

commit dbece45894d3ab1baac15a96dc4e1e8e23f64a93 upstream.

When enabling the MMU for ARMv7 CPUs, the decompressor does not touch
the ttbcr register, assuming that it will be zeroed (N == 0, EAE == 0).
Given that only EAE is defined as 0 for non-secure copies of the
register (and a bootloader such as kexec may leave it set to 1 anyway),
we should ensure that we reset the register ourselves before turning on
the MMU.

This patch zeroes TTBCR.EAE and TTBCR.N prior to enabling the MMU for
ARMv7 cores in the decompressor, configuring us exclusively for 32-bit
translation tables via TTBR0.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Matthew Leach <matthew.leach@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/boot/compressed/head.S