summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2006-07-20 17:48:41 +0000
committeralc <alc@FreeBSD.org>2006-07-20 17:48:41 +0000
commit004ef88e091610da1220afc72fb1ebd0bf2aae8a (patch)
tree0bfb8a63733288d79b2fd87044d51f9a844a908b /sys/sparc64
parent146016a7bbcca247253eb45157e1454f61dd304a (diff)
downloadFreeBSD-src-004ef88e091610da1220afc72fb1ebd0bf2aae8a.zip
FreeBSD-src-004ef88e091610da1220afc72fb1ebd0bf2aae8a.tar.gz
Add pmap_clear_write() to the interface between the virtual memory
system's machine-dependent and machine-independent layers. Once pmap_clear_write() is implemented on all of our supported architectures, I intend to replace all calls to pmap_page_protect() by calls to pmap_clear_write(). Why? Both the use and implementation of pmap_page_protect() in our virtual memory system has subtle errors, specifically, the management of execute permission is broken on some architectures. The "prot" argument to pmap_page_protect() should behave differently from the "prot" argument to other pmap functions. Instead of meaning, "give the specified access rights to all of the physical page's mappings," it means "don't take away the specified access rights from all of the physical page's mappings, but do take away the ones that aren't specified." However, owing to our i386 legacy, i.e., no support for no-execute rights, all but one invocation of pmap_page_protect() specifies VM_PROT_READ only, when the intent is, in fact, to remove only write permission. Consequently, a faithful implementation of pmap_page_protect(), e.g., ia64, would remove execute permission as well as write permission. On the other hand, some architectures that support execute permission have basically ignored whether or not VM_PROT_EXECUTE is passed to pmap_page_protect(), e.g., amd64 and sparc64. This change represents the first step in replacing pmap_page_protect() by the less subtle pmap_clear_write() that is already implemented on amd64, i386, and sparc64. Discussed with: grehan@ and marcel@
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/include/pmap.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/sys/sparc64/include/pmap.h b/sys/sparc64/include/pmap.h
index e4a158e..3524adf 100644
--- a/sys/sparc64/include/pmap.h
+++ b/sys/sparc64/include/pmap.h
@@ -95,8 +95,6 @@ int pmap_protect_tte(struct pmap *pm1, struct pmap *pm2, struct tte *tp,
void pmap_map_tsb(void);
-void pmap_clear_write(vm_page_t m);
-
#define vtophys(va) pmap_kextract((vm_offset_t)(va))
extern struct pmap kernel_pmap_store;
OpenPOWER on IntegriCloud