Changeset 4c53333 in mainline for kernel/arch/ia32/src/mm/page.c
- Timestamp:
- 2013-07-11T08:21:10Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 64e63ce1
- Parents:
- 80445cf (diff), c8bb1633 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/mm/page.c
r80445cf r4c53333 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.