diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2012-01-09 06:24:47 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-13 03:56:41 -0500 |
commit | 294064f58953f9964e5945424b09c51800330a83 (patch) | |
tree | b0593f1aaa41a96e23140934c1e54cc97020e9a2 /arch | |
parent | e37051dc7f35de5ce3f64c40852365ff24f2436c (diff) |
ARM: 7275/1: LPAE: Check the CPU support for the long descriptor format
This patch adds a check for the presence of the LPAE feature during the
CPU initialisation. If not present, it reports an error when
CONFIG_DEBUG_LL is enabled.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kernel/head.S | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 14e277d2ff9..6d579114406 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -99,6 +99,14 @@ ENTRY(stext) | |||
99 | THUMB( it eq ) @ force fixup-able long branch encoding | 99 | THUMB( it eq ) @ force fixup-able long branch encoding |
100 | beq __error_p @ yes, error 'p' | 100 | beq __error_p @ yes, error 'p' |
101 | 101 | ||
102 | #ifdef CONFIG_ARM_LPAE | ||
103 | mrc p15, 0, r3, c0, c1, 4 @ read ID_MMFR0 | ||
104 | and r3, r3, #0xf @ extract VMSA support | ||
105 | cmp r3, #5 @ long-descriptor translation table format? | ||
106 | THUMB( it lo ) @ force fixup-able long branch encoding | ||
107 | blo __error_p @ only classic page table format | ||
108 | #endif | ||
109 | |||
102 | #ifndef CONFIG_XIP_KERNEL | 110 | #ifndef CONFIG_XIP_KERNEL |
103 | adr r3, 2f | 111 | adr r3, 2f |
104 | ldmia r3, {r4, r8} | 112 | ldmia r3, {r4, r8} |