Changeset 567807b1 in mainline for arch/ia32/src
- Timestamp:
- 2006-05-24T17:03:29Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8d6bc2d5
- Parents:
- 82da5f5
- Location:
- arch/ia32/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/src/interrupt.c
r82da5f5 r567807b1 55 55 void (* eoi_function)(void) = NULL; 56 56 57 staticvoid PRINT_INFO_ERRCODE(istate_t *istate)57 void PRINT_INFO_ERRCODE(istate_t *istate) 58 58 { 59 59 char *symbol = get_symtab_entry(istate->eip); … … 140 140 } 141 141 142 void page_fault(int n, istate_t *istate)143 {144 __address page;145 146 page = read_cr2();147 if (as_page_fault(page, istate) == AS_PF_FAULT) {148 PRINT_INFO_ERRCODE(istate);149 printf("page fault address: %#x\n", page);150 panic("page fault\n");151 }152 }153 154 142 void syscall(int n, istate_t *istate) 155 143 { -
arch/ia32/src/mm/page.c
r82da5f5 r567807b1 44 44 #include <interrupt.h> 45 45 46 47 46 void page_arch_init(void) 48 47 { … … 88 87 return virtaddr; 89 88 } 89 90 void page_fault(int n, istate_t *istate) 91 { 92 __address page; 93 pf_access_t access; 94 95 page = read_cr2(); 96 97 if (istate->error_word & PFERR_CODE_RSVD) 98 panic("Reserved bit set in page directory.\n"); 99 100 if (istate->error_word & PFERR_CODE_RW) 101 access = PF_ACCESS_WRITE; 102 else 103 access = PF_ACCESS_READ; 104 105 if (as_page_fault(page, access, istate) == AS_PF_FAULT) { 106 PRINT_INFO_ERRCODE(istate); 107 printf("page fault address: %#x\n", page); 108 panic("page fault\n"); 109 } 110 }
Note:
See TracChangeset
for help on using the changeset viewer.