- move VADDR_TO_* to headers

- move part of mmu handling to mmu-dependant files and extend ops
- implemented 040 mmu init. doing so I spotted a bug in ARAnyM which ignored [ID]TT0. Linux likely doesn't use them but I was too lazy touse temporary page tables. I also noticed bitfields were in wrong order, to be fixed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26527 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol
2008-07-20 20:31:48 +00:00
parent 7c730d1ed4
commit 74c5e8bd10
7 changed files with 241 additions and 93 deletions
@@ -194,4 +194,9 @@ typedef uint64 page_indirect_entry_scalar;
#define PIE_TO_PO(e) ((((uint32 *)(&(e)))[1]) & ((1<<12)-(1<<2)))
#define TA_TO_PIEA(a) ((a) >> 2)
/* 7/7/6 split */
#define VADDR_TO_PRENT(va) (((va) / B_PAGE_SIZE) / (64*128))
#define VADDR_TO_PDENT(va) ((((va) / B_PAGE_SIZE) / 64) % 128)
#define VADDR_TO_PTENT(va) (((va) / B_PAGE_SIZE) % 64)
#endif /* _KERNEL_ARCH_M68K_030_MMU_H */
@@ -195,4 +195,9 @@ typedef uint64 page_indirect_entry_scalar;
#define PIE_TO_PO(e) ((((uint32 *)(&(e)))[1]) & ((1<<12)-(1<<2)))
#define TA_TO_PIEA(a) ((a) >> 2)
/* 7/7/6 split */
#define VADDR_TO_PRENT(va) (((va) / B_PAGE_SIZE) / (64*128))
#define VADDR_TO_PDENT(va) ((((va) / B_PAGE_SIZE) / 64) % 128)
#define VADDR_TO_PTENT(va) (((va) / B_PAGE_SIZE) % 64)
#endif /* _KERNEL_ARCH_M68K_040_MMU_H */