page: simplify page_map and add large page support
This commit is contained in:
parent
1d1dad34ce
commit
352477595e
2 changed files with 59 additions and 14 deletions
|
|
@ -9,6 +9,14 @@
|
|||
#define PAGE_MASK (~(PAGE_SIZE - 1))
|
||||
#define PAGE_ALIGN (PAGE_SIZE - 1)
|
||||
|
||||
#define PAGE_LARGE_SIZE 0x200000ull /* 2 MiB */
|
||||
#define PAGE_LARGE_MASK (~(PAGE_LARGE_SIZE - 1))
|
||||
#define PAGE_LARGE_ALIGN (PAGE_LARGE_SIZE - 1)
|
||||
|
||||
#define PAGE_HUGE_SIZE 0x40000000ull /* 1 GiB */
|
||||
#define PAGE_HUGE_MASK (~(PAGE_HUGE_SIZE - 1))
|
||||
#define PAGE_HUGE_ALIGN (PAGE_HUGE_SIZE - 1)
|
||||
|
||||
#define PAGE_PRESENT 0x001
|
||||
#define PAGE_RW 0x002
|
||||
#define PAGE_USER 0x004
|
||||
|
|
|
|||
Loading…
Reference in a new issue