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