diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-07-09 18:06:09 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-07-09 18:06:09 +0000 |
commit | 8a7b4415a64b99dd17ac556c971ed42a24c21e0c (patch) | |
tree | b9321d0e669960be138895fdd5e935a25b27fc4d /sys/arch/sparc | |
parent | 2621c6ba13ef1435846b92dbb93788c7ef4a07ea (diff) |
When building ptes manually for pmap_zero_page4m and pmap_copy_page4m
use explicit PPROT_N_RX and PPROT_N_RWX, don't treat the pte permissions
as bitmasks (they aren't).
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r-- | sys/arch/sparc/sparc/pmap.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c index c2357420d17..a1989a26ac2 100644 --- a/sys/arch/sparc/sparc/pmap.c +++ b/sys/arch/sparc/sparc/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.123 2002/04/18 05:44:35 deraadt Exp $ */ +/* $OpenBSD: pmap.c,v 1.124 2002/07/09 18:06:08 art Exp $ */ /* $NetBSD: pmap.c,v 1.118 1998/05/19 19:00:18 thorpej Exp $ */ /* @@ -5957,8 +5957,8 @@ pmap_zero_page4m(pa) pv_flushcache(pv); } - pte = (SRMMU_TEPTE | PPROT_S | PPROT_WRITE | - (atop(pa) << SRMMU_PPNSHIFT)); + pte = (SRMMU_TEPTE | (atop(pa) << SRMMU_PPNSHIFT) | PPROT_N_RWX); + if (cpuinfo.flags & CPUFLG_CACHE_MANDATORY) pte |= SRMMU_PG_C; else @@ -5998,15 +5998,14 @@ pmap_copy_page4m(src, dst) if (pv && CACHEINFO.c_vactype == VAC_WRITEBACK) pv_flushcache(pv); - spte = SRMMU_TEPTE | SRMMU_PG_C | PPROT_S | - (atop(src) << SRMMU_PPNSHIFT); + spte = SRMMU_TEPTE | SRMMU_PG_C | (atop(src) << SRMMU_PPNSHIFT) | + PPROT_N_RX; pv = pvhead(atop(dst)); if (pv && CACHEINFO.c_vactype != VAC_NONE) pv_flushcache(pv); - dpte = (SRMMU_TEPTE | PPROT_S | PPROT_WRITE | - (atop(dst) << SRMMU_PPNSHIFT)); + dpte = (SRMMU_TEPTE | (atop(dst) << SRMMU_PPNSHIFT) | PPROT_N_RWX); if (cpuinfo.flags & CPUFLG_CACHE_MANDATORY) dpte |= SRMMU_PG_C; else |