Skip to content
Snippets Groups Projects
Commit 50a4886b authored by Simon Glass's avatar Simon Glass
Browse files

arm: Disable LPAE if not enabled


If CONFIG_ARMV7_LPAE is not defined we should make sure that the feature
is disabled. This can happen if U-Boot is chain-loaded from another boot
loader which does enable LPAE.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent 10d602ac
No related branches found
No related tags found
No related merge requests found
......@@ -172,6 +172,15 @@ static inline void mmu_setup(void)
: : "r" (MEMORY_ATTRIBUTES) : "memory");
}
#elif defined(CONFIG_CPU_V7)
if (is_hyp()) {
/* Set HTCR to disable LPAE */
asm volatile("mcr p15, 4, %0, c2, c0, 2"
: : "r" (0) : "memory");
} else {
/* Set TTBCR to disable LPAE */
asm volatile("mcr p15, 0, %0, c2, c0, 2"
: : "r" (0) : "memory");
}
/* Set TTBR0 */
reg = gd->arch.tlb_addr & TTBR0_BASE_ADDR_MASK;
#if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment