Changes in kernel/arch/ia32/src/mm/page.c [40c8c17:59fb782] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/mm/page.c
r40c8c17 r59fb782 71 71 for (cur = 0; cur < min(config.identity_size, config.physmem_end); 72 72 cur += FRAME_SIZE) { 73 flags = PAGE_CACHEABLE | PAGE_WRITE; 74 if ((PA2KA(cur) >= config.base) && 75 (PA2KA(cur) < config.base + config.kernel_size)) 76 flags |= PAGE_GLOBAL; 73 flags = PAGE_GLOBAL | PAGE_CACHEABLE | PAGE_WRITE | PAGE_READ; 77 74 page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags); 78 75 } … … 87 84 void page_fault(unsigned int n __attribute__((unused)), istate_t *istate) 88 85 { 89 uintptr_t page;86 uintptr_t badvaddr; 90 87 pf_access_t access; 91 88 92 page= read_cr2();89 badvaddr = read_cr2(); 93 90 94 91 if (istate->error_word & PFERR_CODE_RSVD) … … 100 97 access = PF_ACCESS_READ; 101 98 102 if (as_page_fault(page, access, istate) == AS_PF_FAULT) { 103 fault_if_from_uspace(istate, "Page fault: %#x.", page); 104 panic_memtrap(istate, access, page, NULL); 105 } 99 (void) as_page_fault(badvaddr, access, istate); 106 100 } 107 101
Note:
See TracChangeset
for help on using the changeset viewer.