Changeset a35b458 in mainline for kernel/arch/amd64/src/mm/page.c
- Timestamp:
- 2018-03-02T20:10:49Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/mm/page.c
r3061bc1 ra35b458 57 57 unsigned int identity_flags = 58 58 PAGE_GLOBAL | PAGE_CACHEABLE | PAGE_EXEC | PAGE_WRITE | PAGE_READ; 59 59 60 60 page_mapping_operations = &pt_mapping_operations; 61 61 62 62 page_table_lock(AS_KERNEL, true); 63 63 64 64 /* 65 65 * PA2KA(identity) mapping for all low-memory frames. … … 68 68 cur += FRAME_SIZE) 69 69 page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, identity_flags); 70 70 71 71 page_table_unlock(AS_KERNEL, true); 72 72 73 73 exc_register(VECTOR_PF, "page_fault", true, (iroutine_t) page_fault); 74 74 write_cr3((uintptr_t) AS_KERNEL->genarch.page_table); … … 78 78 { 79 79 uintptr_t badvaddr = read_cr2(); 80 80 81 81 if (istate->error_word & PFERR_CODE_RSVD) 82 82 panic("Reserved bit set in page table entry."); 83 83 84 84 pf_access_t access; 85 85 86 86 if (istate->error_word & PFERR_CODE_RW) 87 87 access = PF_ACCESS_WRITE; … … 90 90 else 91 91 access = PF_ACCESS_READ; 92 92 93 93 (void) as_page_fault(badvaddr, access, istate); 94 94 }
Note:
See TracChangeset
for help on using the changeset viewer.