Files | |
file | as.h |
file | frame.h |
file | page.h |
file | ptl.h |
file | tlb.h |
file | memory_init.c |
file | page.c |
Defines | |
#define | KERNEL_ADDRESS_SPACE_SHADOWED_ARCH 0 |
#define | KERNEL_ADDRESS_SPACE_START_ARCH (unsigned long) 0xffff800000000000 |
#define | KERNEL_ADDRESS_SPACE_END_ARCH (unsigned long) 0xffffffffffffffff |
#define | USER_ADDRESS_SPACE_START_ARCH (unsigned long) 0x0000000000000000 |
#define | USER_ADDRESS_SPACE_END_ARCH (unsigned long) 0x00007fffffffffff |
#define | USTACK_ADDRESS_ARCH (USER_ADDRESS_SPACE_END_ARCH-(PAGE_SIZE-1)) |
#define | as_install_arch(as) |
#define | FRAME_WIDTH 12 |
#define | FRAME_SIZE (1<<FRAME_WIDTH) |
#define | PAGE_WIDTH FRAME_WIDTH |
#define | PAGE_SIZE FRAME_SIZE |
#define | PTL_NO_EXEC (1<<63) |
#define | PTL_ACCESSED (1<<5) |
#define | PTL_CACHE_DISABLE (1<<4) |
#define | PTL_CACHE_THROUGH (1<<3) |
#define | PTL_USER (1<<2) |
#define | PTL_WRITABLE (1<<1) |
#define | PTL_PRESENT 1 |
#define | PTL_2MB_PAGE (1<<7) |
#define | tlb_arch_init() |
#define | tlb_print() |
#define | PTL1_PRESENT(ptl0, page) (!(GET_PTL1_FLAGS_ARCH(ptl0, PTL0_INDEX_ARCH(page)) & PAGE_NOT_PRESENT)) |
#define | PTL2_PRESENT(ptl1, page) (!(GET_PTL2_FLAGS_ARCH(ptl1, PTL1_INDEX_ARCH(page)) & PAGE_NOT_PRESENT)) |
#define | PTL3_PRESENT(ptl2, page) (!(GET_PTL3_FLAGS_ARCH(ptl2, PTL2_INDEX_ARCH(page)) & PAGE_NOT_PRESENT)) |
#define | PTL1_ADDR(ptl0, page) ((pte_t *)PA2KA(GET_PTL1_ADDRESS_ARCH(ptl0, PTL0_INDEX_ARCH(page)))) |
#define | PTL2_ADDR(ptl1, page) ((pte_t *)PA2KA(GET_PTL2_ADDRESS_ARCH(ptl1, PTL1_INDEX_ARCH(page)))) |
#define | PTL3_ADDR(ptl2, page) ((pte_t *)PA2KA(GET_PTL3_ADDRESS_ARCH(ptl2, PTL2_INDEX_ARCH(page)))) |
#define | SETUP_PTL1(ptl0, page, tgt) |
#define | SETUP_PTL2(ptl1, page, tgt) |
#define | SETUP_PTL3(ptl2, page, tgt) |
#define | SETUP_FRAME(ptl3, page, tgt) |
Functions | |
void | as_arch_init (void) |
void | frame_arch_init (void) |
size_t | get_memory_size (void) |
void | memory_print_map (void) |
pte_t helper_ptl1[512] | __attribute__ ((aligned(PAGE_SIZE))) |
void | page_arch_init (void) |
void | ident_page_fault (int n, istate_t *istate) |
void | page_fault (int n, istate_t *istate) |
__address | hw_map (__address physaddr, size_t size) |
Variables | |
__address | last_frame |
__u8 | e820counter = 0xff |
e820memmap_ | e820table [MEMMAP_E820_MAX_RECORDS] |
__u32 | e801memorysize |
pte_t | ptl_0 |
|
Definition at line 47 of file as.h. Referenced by as_switch(). |
|
Definition at line 43 of file frame.h. Referenced by anon_page_fault(), elf_frame_free(), elf_page_fault(), hw_map(), page_arch_init(), phys_page_fault(), and sys_physmem_map(). |
|
Definition at line 42 of file frame.h. Referenced by ADDR2PFN(), PFN2ADDR(), and SIZE2FRAMES(). |
|
Definition at line 41 of file as.h. Referenced by hw_map(). |
|
|
|
|
|
|
Paging on AMD64 The space is divided in positive numbers - userspace and negative numbers - kernel space. The 'negative' space starting with 0xffff800000000000 and ending with 0xffffffff80000000 (-2GB) is identically mapped physical memory. The area (0xffffffff80000000 ... 0xffffffffffffffff is again identically mapped first 2GB. ATTENTION - PA2KA(KA2PA(x)) != x if 'x' is in kernel Definition at line 52 of file page.h. Referenced by as_area_resize(), elf_frame_free(), and elf_page_fault(). |
|
Definition at line 60 of file page.c. Referenced by ident_page_fault(). |
|
Definition at line 56 of file page.c. Referenced by ident_page_fault(). |
|
Definition at line 61 of file page.c. Referenced by ident_page_fault(). |
|
Definition at line 57 of file page.c. Referenced by ident_page_fault(). |
|
Definition at line 62 of file page.c. Referenced by ident_page_fault(). |
|
Definition at line 58 of file page.c. Referenced by ident_page_fault(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: { \ SET_FRAME_ADDRESS_ARCH(ptl3, PTL3_INDEX_ARCH(page), (__address)KA2PA(tgt)); \ SET_FRAME_FLAGS_ARCH(ptl3, PTL3_INDEX_ARCH(page), PAGE_WRITE | PAGE_EXEC); \ } Definition at line 76 of file page.c. Referenced by ident_page_fault(). |
|
Value: { \ SET_PTL1_ADDRESS_ARCH(ptl0, PTL0_INDEX_ARCH(page), (__address)KA2PA(tgt)); \ SET_PTL1_FLAGS_ARCH(ptl0, PTL0_INDEX_ARCH(page), PAGE_WRITE | PAGE_EXEC); \ } Definition at line 64 of file page.c. Referenced by ident_page_fault(). |
|
Value: { \ SET_PTL2_ADDRESS_ARCH(ptl1, PTL1_INDEX_ARCH(page), (__address)KA2PA(tgt)); \ SET_PTL2_FLAGS_ARCH(ptl1, PTL1_INDEX_ARCH(page), PAGE_WRITE | PAGE_EXEC); \ } Definition at line 68 of file page.c. Referenced by ident_page_fault(). |
|
Value: { \ SET_PTL3_ADDRESS_ARCH(ptl2, PTL2_INDEX_ARCH(page), (__address)KA2PA(tgt)); \ SET_PTL3_FLAGS_ARCH(ptl2, PTL2_INDEX_ARCH(page), PAGE_WRITE | PAGE_EXEC); \ } Definition at line 72 of file page.c. Referenced by ident_page_fault(). |
|
Definition at line 38 of file tlb.h. Referenced by tlb_init(). |
|
Definition at line 39 of file tlb.h. Referenced by cmd_tlb(). |
|
|
|
|
|
|
|
|
|
Referenced by as_init(). |
|
Referenced by frame_init(). |
|
Definition at line 44 of file memory_init.c. References e801memorysize. Referenced by main_bsp(). |
|
Definition at line 201 of file page.c. References ADDR2PFN(), ALIGN_UP, FRAME_SIZE, KERNEL_ADDRESS_SPACE_END_ARCH, last_frame, page_mapping_insert(), PAGE_NOT_CACHEABLE, PAGE_SIZE, panic, and PFN2ADDR(). Referenced by fb_init(). Here is the call graph for this function: ![]() |
|
Identity page mapper We need to map whole physical memory identically before the page subsystem is initializaed. This thing clears page table and fills in the specific items. Definition at line 126 of file page.c. References PAGE_NOT_PRESENT, PTL1_ADDR, PTL1_PRESENT, PTL2_ADDR, PTL2_PRESENT, PTL3_ADDR, PTL3_PRESENT, SETUP_FRAME, SETUP_PTL1, SETUP_PTL2, and SETUP_PTL3. |
|
Definition at line 49 of file memory_init.c. References e820counter, e820table, and printf(). Referenced by arch_pre_smp_init(). Here is the call graph for this function: ![]() |
|
Definition at line 82 of file page.c. References AS_KERNEL, config_t::base, config, config_t::cpu_active, FRAME_SIZE, config_t::kernel_size, last_frame, PAGE_CACHEABLE, PAGE_EXEC, PAGE_GLOBAL, page_mapping_insert(), and pt_mapping_operations. Referenced by page_init(). Here is the call graph for this function: ![]() |
|
Definition at line 174 of file page.c. References as_page_fault(), istate::error_word, fault_if_from_uspace, panic, PF_ACCESS_EXEC, PF_ACCESS_READ, PF_ACCESS_WRITE, print_info_errcode(), and printf(). Referenced by as_page_fault(). Here is the call graph for this function: ![]() |
|
Definition at line 42 of file memory_init.c. Referenced by get_memory_size(). |
|
Definition at line 40 of file memory_init.c. Referenced by memory_print_map(). |
|
Definition at line 41 of file memory_init.c. Referenced by memory_print_map(). |
|
Referenced by hw_map(), and page_arch_init(). |
|
|