armv7: invalidate TLB entries as they are added/modified
The old approach was to invalidate the entire TLB every time we set up a table entry. This worked because we didn't turn the MMU on until after we had set everything up. This patch uses the TLBIMVAA wrapper to invalidate each entry as it's added/modified. Change-Id: I27654a543a2015574d910e15d48b3d3845fdb6d1 Signed-off-by: David Hendricks <dhendrix@chromium.org> Reviewed-on: http://review.coreboot.org/3166 Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Tested-by: build bot (Jenkins)
This commit is contained in:
parent
5c2025c40f
commit
3f39cd2920
|
@ -99,11 +99,10 @@ void mmu_config_range(unsigned long start_mb, unsigned long size_mb,
|
||||||
printk(BIOS_DEBUG, "Setting dcache policy: 0x%08lx:0x%08lx [%s]\n",
|
printk(BIOS_DEBUG, "Setting dcache policy: 0x%08lx:0x%08lx [%s]\n",
|
||||||
start_mb << 20, ((start_mb + size_mb) << 20) - 1, str);
|
start_mb << 20, ((start_mb + size_mb) << 20) - 1, str);
|
||||||
|
|
||||||
for (i = start_mb; i < start_mb + size_mb; i++)
|
for (i = start_mb; i < start_mb + size_mb; i++) {
|
||||||
ttb_entry[i] = (i << 20) | attr;
|
ttb_entry[i] = (i << 20) | attr;
|
||||||
|
tlbimvaa(start_mb);
|
||||||
/* TODO: add helper to invalidate TLB by MVA */
|
}
|
||||||
tlb_invalidate_all();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void mmu_init(void)
|
void mmu_init(void)
|
||||||
|
|
Loading…
Reference in New Issue