18 lines
515 B
C
18 lines
515 B
C
#ifndef _BOOT_VMM_CONSTS_H
|
|
#define _BOOT_VMM_CONSTS_H
|
|
|
|
#define VMM_LV0_ENTITY_COUNT (256)
|
|
#define VMM_LV1_ENTITY_COUNT (4096)
|
|
#define VMM_PAGE_SIZE (4096)
|
|
|
|
#define VMM_OFFSET_IN_DIRECTORY(a) (((a) >> 20) & 0xfff)
|
|
#define VMM_OFFSET_IN_TABLE(a) (((a) >> 12) & 0xff)
|
|
#define VMM_OFFSET_IN_PAGE(a) ((a)&0xfff)
|
|
#define TABLE_START(vaddr) ((vaddr >> 20) << 20)
|
|
#define PAGE_START(vaddr) ((vaddr >> 12) << 12)
|
|
#define FRAME(addr) (addr / VMM_PAGE_SIZE)
|
|
|
|
#define PTABLE_TOP_KERNEL_OFFSET 3072
|
|
|
|
#endif //_BOOT_VMM_CONSTS_H
|