aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/amd64/amd64/pmap.c6
-rw-r--r--sys/include/vm/pmap.h5
-rw-r--r--sys/vm/vm_init.c4
3 files changed, 15 insertions, 0 deletions
diff --git a/sys/arch/amd64/amd64/pmap.c b/sys/arch/amd64/amd64/pmap.c
index 54d4ca3..8af6d39 100644
--- a/sys/arch/amd64/amd64/pmap.c
+++ b/sys/arch/amd64/amd64/pmap.c
@@ -257,3 +257,9 @@ pmap_read_vas(void)
vas.lock.lock = 0;
return vas;
}
+
+int
+pmap_init(struct vm_ctx *ctx)
+{
+ return 0;
+}
diff --git a/sys/include/vm/pmap.h b/sys/include/vm/pmap.h
index 3380199..faad0fb 100644
--- a/sys/include/vm/pmap.h
+++ b/sys/include/vm/pmap.h
@@ -99,4 +99,9 @@ int pmap_free_vas(struct vm_ctx *, struct vas);
* Unmap a page.
*/
int pmap_unmap(struct vm_ctx *, struct vas, vaddr_t);
+
+/*
+ * Architecture specific init code for pmap
+ */
+int pmap_init(struct vm_ctx *);
#endif /* _VM_PMAP_H_ */
diff --git a/sys/vm/vm_init.c b/sys/vm/vm_init.c
index 6096059..3087e6e 100644
--- a/sys/vm/vm_init.c
+++ b/sys/vm/vm_init.c
@@ -29,6 +29,7 @@
#include <vm/vm.h>
#include <vm/physseg.h>
+#include <vm/pmap.h>
#include <sys/panic.h>
#include <assert.h>
@@ -74,6 +75,9 @@ vm_init(void)
void *pool_va;
kernel_vas = pmap_read_vas();
+ if (pmap_init(vm_get_ctx()) != 0) {
+ panic("Failed to init pmap layer\n");
+ }
/* Setup virtual memory context */
bsp_vm_ctx.dynalloc_pool_sz = DYNALLOC_POOL_SZ;