Flush the correct number pf PTEs from cache after mapping a big framebuffer.
Essential for 4K displays. Thanks to Bakul Shah for finding this.
Reference: /n/sources/patch/bcm-mmukmap-bug
Date: Tue Jul 8 10:29:59 CES 2014
Signed-off-by:
mil...@hamnavoe.com
--- /sys/src/9/bcm/mmu.c Tue Jul 8 10:28:13 2014
+++ /sys/src/9/bcm/mmu.c Tue Jul 8 10:28:10 2014
@@ -304,7 +304,7 @@
*pte++ = (pa+n)|Dom0|L1AP(Krw)|Section;
mmuinvalidateaddr(va+n);
}
- cachedwbse(pte0, pte - pte0);
+ cachedwbse(pte0, (uintptr)pte - (uintptr)pte0);
return va + o;
}