arm64: big-endian: set correct endianess on kernel entry
authorMatthew Leach <matthew.leach@arm.com>
Fri, 11 Oct 2013 13:52:17 +0000 (14:52 +0100)
committerVictor Kamensky <victor.kamensky@linaro.org>
Fri, 14 Mar 2014 01:28:21 +0000 (18:28 -0700)
commitbfe6e4a7171eb42cf20e0c0aca680ea2d42f9cd2
tree0f972cf3b7eafed1a778f89c2535948e6677e996
parentb0d60128f0c6d990f670ad01bdced70676c2137b
arm64: big-endian: set correct endianess on kernel entry

The endianness of memory accesses at EL2 and EL1 are configured by
SCTLR_EL2.EE and SCTLR_EL1.EE respectively. When the kernel is booted,
the state of SCTLR_EL{2,1}.EE is unknown, and thus the kernel must
ensure that they are set before performing any memory accesses.

This patch ensures that SCTLR_EL{2,1} are configured appropriately at
boot for kernels of either endianness.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Matthew Leach <matthew.leach@arm.com>
[catalin.marinas@arm.com: fix SCTLR_EL1.E0E bit setting in head.S]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 9cf71728931a4073b9e3a4bcbf9dada86bc98370)

Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
arch/arm64/kernel/head.S
arch/arm64/mm/proc.S