Changeset 46c20c8 in mainline for kernel/arch/arm32/src/mm/page_fault.c
- Timestamp:
- 2010-11-26T20:08:10Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 45df59a
- Parents:
- fb150d78 (diff), ffdd2b9 (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
-
kernel/arch/arm32/src/mm/page_fault.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/src/mm/page_fault.c
rfb150d78 r46c20c8 141 141 if (instr.condition == 0xf) { 142 142 panic("page_fault - instruction does not access memory " 143 "(instr_code: %x, badvaddr:%x).", instr, badvaddr); 143 "(instr_code: %#0" PRIx32 ", badvaddr:%p).", 144 instr_union.pc, (void *) badvaddr); 144 145 return PF_ACCESS_EXEC; 145 146 } … … 160 161 161 162 panic("page_fault - instruction doesn't access memory " 162 "(instr_code: %x, badvaddr:%x).", instr, badvaddr); 163 "(instr_code: %#0" PRIx32 ", badvaddr:%p).", 164 instr_union.pc, (void *) badvaddr); 163 165 164 166 return PF_ACCESS_EXEC; … … 167 169 /** Handles "data abort" exception (load or store at invalid address). 168 170 * 169 * @param exc_no Exception number. 170 * @param istate CPU state when exception occured. 171 */ 172 void data_abort(int exc_no, istate_t *istate) 171 * @param exc_no Exception number. 172 * @param istate CPU state when exception occured. 173 * 174 */ 175 void data_abort(unsigned int exc_no, istate_t *istate) 173 176 { 174 177 fault_status_t fsr __attribute__ ((unused)) = … … 182 185 if (ret == AS_PF_FAULT) { 183 186 fault_if_from_uspace(istate, "Page fault: %#x.", badvaddr); 184 print_istate(istate); 185 printf("page fault - pc: %x, va: %x, status: %x(%x), " 186 "access:%d\n", istate->pc, badvaddr, fsr.status, fsr, 187 access); 188 189 panic("Page fault."); 187 panic_memtrap(istate, access, badvaddr, NULL); 190 188 } 191 189 } … … 193 191 /** Handles "prefetch abort" exception (instruction couldn't be executed). 194 192 * 195 * @param exc_no Exception number. 196 * @param istate CPU state when exception occured. 197 */ 198 void prefetch_abort(int exc_no, istate_t *istate) 193 * @param exc_no Exception number. 194 * @param istate CPU state when exception occured. 195 * 196 */ 197 void prefetch_abort(unsigned int exc_no, istate_t *istate) 199 198 { 200 199 int ret = as_page_fault(istate->pc, PF_ACCESS_EXEC, istate); 201 200 202 201 if (ret == AS_PF_FAULT) { 203 printf("prefetch_abort\n"); 204 print_istate(istate); 205 panic("page fault - prefetch_abort at address: %x.", 206 istate->pc); 202 fault_if_from_uspace(istate, 203 "Page fault - prefetch_abort: %#x.", istate->pc); 204 panic_memtrap(istate, PF_ACCESS_EXEC, istate->pc, NULL); 207 205 } 208 206 }
Note:
See TracChangeset
for help on using the changeset viewer.
