kern
diff src/vm.h @ 18:096807345aa2
fixed the stupid mistake. forgot to page-align the page directory
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 27 Mar 2011 06:28:26 +0300 |
parents | 098b1cb5eeaa |
children | 7ece008f09c5 |
line diff
1.1 --- a/src/vm.h Sat Mar 26 21:39:14 2011 +0200 1.2 +++ b/src/vm.h Sun Mar 27 06:28:26 2011 +0300 1.3 @@ -20,6 +20,7 @@ 1.4 #define PGSIZE 4096 1.5 #define PGOFFS_MASK 0xfff 1.6 #define PGNUM_MASK 0xfffff000 1.7 +#define PGENT_ADDR_MASK PGNUM_MASK 1.8 1.9 #define ADDR_TO_PAGE(x) ((uint32_t)(x) >> 12) 1.10 #define PAGE_TO_ADDR(x) ((uint32_t)(x) << 12) 1.11 @@ -39,4 +40,6 @@ 1.12 1.13 void map_mem_range(uint32_t vaddr, size_t sz, uint32_t paddr, unsigned int attr); 1.14 1.15 +uint32_t virt_to_phys(uint32_t vaddr); 1.16 + 1.17 #endif /* VM_H_ */