diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/sys/include/vm/vm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sys/include/vm/vm.h b/src/sys/include/vm/vm.h index f5f7b16..59cd4bc 100644 --- a/src/sys/include/vm/vm.h +++ b/src/sys/include/vm/vm.h @@ -32,12 +32,15 @@ #include <sys/types.h> #include <sys/queue.h> +#include <sys/param.h> #include <sys/bootvars.h> #define VM_HIGHER_HALF (get_kernel_base()) #define PHYS_TO_VIRT(PHYS) (void *)((uintptr_t)(PHYS) + VM_HIGHER_HALF) #define VIRT_TO_PHYS(VIRT) ((uintptr_t)(VIRT) - VM_HIGHER_HALF) + #define DEFAULT_PAGESIZE 4096 +#define BYTES_TO_PAGES(N) (ALIGN_UP((N), DEFAULT_PAGESIZE) / DEFAULT_PAGESIZE) /* Physical/virtual address */ typedef uintptr_t vaddr_t; |