]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix a problem where kernel text could become unmapped when clearing out all
authorJake Burkholder <jake@FreeBSD.org>
Sun, 17 Mar 2002 01:51:32 +0000 (01:51 +0000)
committerJake Burkholder <jake@FreeBSD.org>
Sun, 17 Mar 2002 01:51:32 +0000 (01:51 +0000)
commitbfd501b637f8c02a7e59bc95341cd5802cdc4b62
tree98af833252b8e2ffd1f2092cbf3a608d97b5d0d1
parent2f3e2b87956ae0fab828ce3109219043bb3afd88
Fix a problem where kernel text could become unmapped when clearing out all
the user mappings from the tlb due to the context numbers rolling over.  The
store to the internal mmu register must be followed by a membar #Sync before
much else happens to "avoid data corruption", so we use special inlines which
both disable interrupts and ensure that the compiler will not insert extra
instructions between the two.  Also, load the tte tag and check if the context
is nucleus context, rather than relying on the priviledged bit which doesn't
actually serve any purpose in our design, and check the lock bit too for
sanity.
sys/sparc64/sparc64/pmap.c