Each section is 1MiB, so we have to shift by 20 to get the ttb entry corresponding to a section. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- arch/arm/cpu/mmu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index 1f62d61..2f754c8 100644 --- a/arch/arm/cpu/mmu.c +++ b/arch/arm/cpu/mmu.c @@ -65,7 +65,7 @@ static u32 *arm_create_pte(unsigned long virt) table = memalign(0x400, 0x400); - ttb[virt] = (unsigned long)table | PMD_TYPE_TABLE; + ttb[virt >> 20] = (unsigned long)table | PMD_TYPE_TABLE; for (i = 0; i < 256; i++) { table[i] = virt | PTE_TYPE_SMALL | PTE_FLAGS_UNCACHED; -- 1.7.5.4 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox