summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Hendricks <dhendrix@chromium.org>2013-04-30 16:01:50 -0700
committerDavid Hendricks <dhendrix@chromium.org>2013-05-01 23:57:16 +0200
commit3f39cd2920ccc3286cda152f7abc08590ae49f66 (patch)
tree00b7f1bd9271b02a4bde11b62d9ba8d4476825f1
parent5c2025c40f747c383e6106799f06c4a92cd07201 (diff)
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)
-rw-r--r--src/arch/armv7/lib/mmu.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/arch/armv7/lib/mmu.c b/src/arch/armv7/lib/mmu.c
index 82c735818e..d4e08f7050 100644
--- a/src/arch/armv7/lib/mmu.c
+++ b/src/arch/armv7/lib/mmu.c
@@ -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",
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;
-
- /* TODO: add helper to invalidate TLB by MVA */
- tlb_invalidate_all();
+ tlbimvaa(start_mb);
+ }
}
void mmu_init(void)