summaryrefslogtreecommitdiff
path: root/os/pc/mmu.c
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2007-04-07 12:52:27 +0000
committerCharles.Forsyth <devnull@localhost>2007-04-07 12:52:27 +0000
commite1bd49a1e1823eab71c293efd1bd0c9b83c350c9 (patch)
treea9424cde16004cb9e591045225bc61beed339dd5 /os/pc/mmu.c
parent15345f9c75c069d3e2e362af5d6f931eef7772ef (diff)
20070407-1350 more updates from plan 9 pc kernel, and a few unreachable fixes(!)
Diffstat (limited to 'os/pc/mmu.c')
-rw-r--r--os/pc/mmu.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/os/pc/mmu.c b/os/pc/mmu.c
index 6bd4ddfb..6a9e8089 100644
--- a/os/pc/mmu.c
+++ b/os/pc/mmu.c
@@ -319,3 +319,19 @@ mmukmap(ulong pa, ulong va, int size)
return pa;
}
+
+void*
+vmap(ulong pa, int size)
+{
+ pa = upamalloc(pa, size, 0);
+ if(pa == 0)
+ return nil;
+ return KADDR(pa);
+}
+
+void
+vunmap(void *va, int size)
+{
+ if(va != nil)
+ upafree(PADDR(va), size);
+}