summaryrefslogtreecommitdiff
path: root/vm
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-06-25 00:16:26 +0200
committerRichard Braun <rbraun@sceen.net>2017-06-25 00:16:26 +0200
commit9e1c5185ee157f4b0b155c0a788bcd0557c44623 (patch)
treea46c9e4d6b63ec4c1e30f31c69ce1270de54439c /vm
parent9fb3131dbde508526dcbec29aac166ca425cd352 (diff)
Remove the param module
Move the page properties into the new x86/page module, and the virtual memory layout macros into the x86/pmap module.
Diffstat (limited to 'vm')
-rw-r--r--vm/vm_kmem.c2
-rw-r--r--vm/vm_kmem.h6
-rw-r--r--vm/vm_map.c6
-rw-r--r--vm/vm_page.c2
-rw-r--r--vm/vm_page.h10
5 files changed, 13 insertions, 13 deletions
diff --git a/vm/vm_kmem.c b/vm/vm_kmem.c
index 8139ddb..488ae30 100644
--- a/vm/vm_kmem.c
+++ b/vm/vm_kmem.c
@@ -26,7 +26,7 @@
#include <kern/init.h>
#include <kern/macros.h>
#include <kern/panic.h>
-#include <kern/param.h>
+#include <machine/page.h>
#include <machine/pmap.h>
#include <machine/types.h>
#include <vm/vm_adv.h>
diff --git a/vm/vm_kmem.h b/vm/vm_kmem.h
index 30c7cd3..3628a69 100644
--- a/vm/vm_kmem.h
+++ b/vm/vm_kmem.h
@@ -20,16 +20,16 @@
#include <stdint.h>
-#include <kern/param.h>
+#include <machine/pmap.h>
#include <machine/types.h>
/*
* The kernel space is required not to start at address 0, which is used to
* report allocation errors.
*/
-#if VM_MIN_KMEM_ADDRESS == 0
+#if PMAP_MIN_KMEM_ADDRESS == 0
#error "kernel space must not start at address 0"
-#endif /* VM_MIN_KMEM_ADDRESS == 0 */
+#endif /* PMAP_MIN_KMEM_ADDRESS == 0 */
/*
* Special kernel addresses.
diff --git a/vm/vm_map.c b/vm/vm_map.c
index abe2aa8..389678b 100644
--- a/vm/vm_map.c
+++ b/vm/vm_map.c
@@ -31,10 +31,10 @@
#include <kern/macros.h>
#include <kern/mutex.h>
#include <kern/panic.h>
-#include <kern/param.h>
#include <kern/rbtree.h>
#include <kern/shell.h>
#include <kern/task.h>
+#include <machine/page.h>
#include <machine/pmap.h>
#include <vm/vm_adv.h>
#include <vm/vm_inherit.h>
@@ -734,7 +734,7 @@ void __init
vm_map_setup(void)
{
vm_map_init(kernel_map, kernel_pmap,
- VM_MIN_KMEM_ADDRESS, VM_MAX_KMEM_ADDRESS);
+ PMAP_MIN_KMEM_ADDRESS, PMAP_MAX_KMEM_ADDRESS);
kmem_cache_init(&vm_map_entry_cache, "vm_map_entry",
sizeof(struct vm_map_entry), 0, NULL,
KMEM_CACHE_PAGE_ONLY);
@@ -763,7 +763,7 @@ vm_map_create(struct vm_map **mapp)
goto error_pmap;
}
- vm_map_init(map, pmap, VM_MIN_ADDRESS, VM_MAX_ADDRESS);
+ vm_map_init(map, pmap, PMAP_MIN_ADDRESS, PMAP_MAX_ADDRESS);
*mapp = map;
return 0;
diff --git a/vm/vm_page.c b/vm/vm_page.c
index 2c48a0d..caa8c98 100644
--- a/vm/vm_page.c
+++ b/vm/vm_page.c
@@ -41,10 +41,10 @@
#include <kern/macros.h>
#include <kern/mutex.h>
#include <kern/panic.h>
-#include <kern/param.h>
#include <kern/shell.h>
#include <kern/thread.h>
#include <machine/cpu.h>
+#include <machine/page.h>
#include <machine/pmem.h>
#include <machine/types.h>
#include <vm/vm_page.h>
diff --git a/vm/vm_page.h b/vm/vm_page.h
index 86ab527..026c118 100644
--- a/vm/vm_page.h
+++ b/vm/vm_page.h
@@ -28,7 +28,7 @@
#include <kern/list.h>
#include <kern/log2.h>
#include <kern/macros.h>
-#include <kern/param.h>
+#include <machine/page.h>
#include <machine/pmap.h>
#include <machine/pmem.h>
#include <machine/types.h>
@@ -107,15 +107,15 @@ static inline uintptr_t
vm_page_direct_va(phys_addr_t pa)
{
assert(pa < PMEM_DIRECTMAP_LIMIT);
- return ((uintptr_t)pa + VM_MIN_DIRECTMAP_ADDRESS);
+ return ((uintptr_t)pa + PMAP_MIN_DIRECTMAP_ADDRESS);
}
static inline phys_addr_t
vm_page_direct_pa(uintptr_t va)
{
- assert(va >= VM_MIN_DIRECTMAP_ADDRESS);
- assert(va < VM_MAX_DIRECTMAP_ADDRESS);
- return (va - VM_MIN_DIRECTMAP_ADDRESS);
+ assert(va >= PMAP_MIN_DIRECTMAP_ADDRESS);
+ assert(va < PMAP_MAX_DIRECTMAP_ADDRESS);
+ return (va - PMAP_MIN_DIRECTMAP_ADDRESS);
}
static inline void *