CVSROOT: /cvs Module name: src Changes by: kette...@cvs.openbsd.org 2017/07/25 13:37:27
Modified files: sys/arch/armv7/armv7: locore0.S Log message: The Cortex-A17 TRM explicitly says that there is an intermediate table walk cache and that its cache entries are associated with an ASID. Our armv7 pmap doesn't use ASIDs and we only ever insert "global" page table entries which match (and get flushed) regardless of the ASID. The current ASID is specified vy the CONTEXTIDR register, which is initialized to some "unknown" value. And on my hardware that value isn't zero! So the intermediate table walk cache entries are tagged with this unknown value. But our TLB flushes are done with ASID 0. This means that the intermediate table walk cache entries are never flushed because the ASID doesn't match. As a result the hardware may look at the wrong page table page when looking up a translation. So initialize CONTEXTIDR to zero before we initialize the first level page table pointer, flush the TLB and enable the MMU. Fixes the hangs previously seen on Cortex-A12/A17. ok patrick@