Page
include/mem/page.h View source View on GitHubStructs
Section titled “Structs”page_table
Section titled “page_table”page_tag
Section titled “page_tag” enum page_tag (4 variants) source
Functions
Section titled “Functions”page_get_tag
Section titled “page_get_tag”page_set_tag
Section titled “page_set_tag”page_get_payload
Section titled “page_get_payload”page_set_payload
Section titled “page_set_payload”page_assert_tag
Section titled “page_assert_tag”page_for_pfn
Section titled “page_for_pfn”page_for_paddr
Section titled “page_for_paddr”page_get_pfn
Section titled “page_get_pfn”page_get_paddr
Section titled “page_get_paddr”page_get_vaddr
Section titled “page_get_vaddr”Macros
Section titled “Macros”PAGE_SIZE
Section titled “PAGE_SIZE”PAGE_2MB
Section titled “PAGE_2MB”PAGE_1GB
Section titled “PAGE_1GB”PAGE_PRESENT_SHIFT
Section titled “PAGE_PRESENT_SHIFT”#define PAGE_PRESENT_SHIFT (0) source PAGE_PRESENT
Section titled “PAGE_PRESENT”#define PAGE_PRESENT (0x1UL) source PAGE_WRITE
Section titled “PAGE_WRITE”#define PAGE_WRITE (0x2UL) source PAGE_USER_ALLOWED
Section titled “PAGE_USER_ALLOWED”#define PAGE_USER_ALLOWED (0x4UL) source PAGE_XD
Section titled “PAGE_XD”PAGE_PHYS_MASK
Section titled “PAGE_PHYS_MASK”#define PAGE_PHYS_MASK (0x00FFFFFFF000UL) source PAGE_UNCACHABLE
Section titled “PAGE_UNCACHABLE”PAGE_NO_FLAGS
Section titled “PAGE_NO_FLAGS”#define PAGE_NO_FLAGS (0) source PAGE_WRITETHROUGH
Section titled “PAGE_WRITETHROUGH”PAGE_HUGE
Section titled “PAGE_HUGE”PAGE_PAGEABLE
Section titled “PAGE_PAGEABLE”PAGE_MOVABLE
Section titled “PAGE_MOVABLE”#define PAGE_MOVABLE (0) source PAGE_2MB_PHYS_MASK
Section titled “PAGE_2MB_PHYS_MASK”#define PAGE_2MB_PHYS_MASK (0x00FFFFE00000UL) source PAGE_1GB_PHYS_MASK
Section titled “PAGE_1GB_PHYS_MASK”#define PAGE_1GB_PHYS_MASK (0x00FFC0000000UL) source PAGE_ALIGN_DOWN
Section titled “PAGE_ALIGN_DOWN”#define PAGE_ALIGN_DOWN(x) source Expansion
#define PAGE_ALIGN_DOWN(x) ALIGN_DOWN((uintptr_t) (x), PAGE_SIZE) PAGE_ALIGN_UP
Section titled “PAGE_ALIGN_UP”#define PAGE_ALIGN_UP(x) source Expansion
#define PAGE_ALIGN_UP(x) ALIGN_UP((uintptr_t) (x), PAGE_SIZE) PAGE_ALIGN_UP_WRAPPING
Section titled “PAGE_ALIGN_UP_WRAPPING”#define PAGE_ALIGN_UP_WRAPPING(x) source Expansion
#define PAGE_ALIGN_UP_WRAPPING(x) ALIGN_UP_WRAPPING((uintptr_t) (x), PAGE_SIZE) IS_PAGE_ALIGNED
Section titled “IS_PAGE_ALIGNED”#define IS_PAGE_ALIGNED(x) source Expansion
#define IS_PAGE_ALIGNED(x) IS_ALIGNED((uintptr_t) (x), PAGE_SIZE) PAGE_2MB_ALIGN_DOWN
Section titled “PAGE_2MB_ALIGN_DOWN”#define PAGE_2MB_ALIGN_DOWN(x) source Expansion
#define PAGE_2MB_ALIGN_DOWN(x) ALIGN_DOWN((uintptr_t) (x), PAGE_2MB) PAGE_2MB_ALIGN_UP
Section titled “PAGE_2MB_ALIGN_UP”#define PAGE_2MB_ALIGN_UP(x) source Expansion
#define PAGE_2MB_ALIGN_UP(x) ALIGN_UP((uintptr_t) (x), PAGE_2MB) PAGE_1GB_ALIGN_DOWN
Section titled “PAGE_1GB_ALIGN_DOWN”#define PAGE_1GB_ALIGN_DOWN(x) source Expansion
#define PAGE_1GB_ALIGN_DOWN(x) ALIGN_DOWN((uintptr_t) (x), PAGE_1GB) PAGE_1GB_ALIGN_UP
Section titled “PAGE_1GB_ALIGN_UP”#define PAGE_1GB_ALIGN_UP(x) source Expansion
#define PAGE_1GB_ALIGN_UP(x) ALIGN_UP((uintptr_t) (x), PAGE_1GB) PAGE_TO_PFN
Section titled “PAGE_TO_PFN”#define PAGE_TO_PFN(addr) source Expansion
#define PAGE_TO_PFN(addr) ((addr) / PAGE_SIZE) PFN_TO_PAGE
Section titled “PFN_TO_PAGE”#define PFN_TO_PAGE(pfn) source Expansion
#define PFN_TO_PAGE(pfn) ((pfn) * PAGE_SIZE) PAGES_NEEDED_FOR
Section titled “PAGES_NEEDED_FOR”#define PAGES_NEEDED_FOR(bytes) source Expansion
#define PAGES_NEEDED_FOR(bytes) DIV_ROUND_UP((bytes), PAGE_SIZE) VMM_MAP_BASE
Section titled “VMM_MAP_BASE”#define VMM_MAP_BASE 0xFFFFA00000200000 source VMM_MAP_LIMIT
Section titled “VMM_MAP_LIMIT”#define VMM_MAP_LIMIT 0xFFFFA00010000000 source PT_ENTRIES
Section titled “PT_ENTRIES”#define PT_ENTRIES 512 source PT_INDEX_MASK
Section titled “PT_INDEX_MASK”#define PT_INDEX_MASK 0x1FFULL source PAGE_4K_SHIFT
Section titled “PAGE_4K_SHIFT”#define PAGE_4K_SHIFT 12 source PAGE_2M_SHIFT
Section titled “PAGE_2M_SHIFT”#define PAGE_2M_SHIFT 21 source PAGE_1G_SHIFT
Section titled “PAGE_1G_SHIFT”#define PAGE_1G_SHIFT 30 source PAGE_TAG_MASK
Section titled “PAGE_TAG_MASK”#define PAGE_TAG_MASK 0x7ULL source PAGE_PAYLOAD_ALIGNMENT
Section titled “PAGE_PAYLOAD_ALIGNMENT”#define PAGE_PAYLOAD_ALIGNMENT 8 source