Rev 3588 | Rev 4343 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3588 | Rev 4339 | ||
---|---|---|---|
Line 113... | Line 113... | ||
113 | * or copy_to_uspace(). |
113 | * or copy_to_uspace(). |
114 | */ |
114 | */ |
115 | page_table_unlock(AS, true); |
115 | page_table_unlock(AS, true); |
116 | return; |
116 | return; |
117 | default: |
117 | default: |
118 | panic("unexpected pfrc (%d)\n", pfrc); |
118 | panic("Unexpected pfrc (%d).", pfrc); |
119 | } |
119 | } |
120 | } |
120 | } |
121 | 121 | ||
122 | /* |
122 | /* |
123 | * Record access to PTE. |
123 | * Record access to PTE. |
Line 197... | Line 197... | ||
197 | * or copy_to_uspace(). |
197 | * or copy_to_uspace(). |
198 | */ |
198 | */ |
199 | page_table_unlock(AS, true); |
199 | page_table_unlock(AS, true); |
200 | return; |
200 | return; |
201 | default: |
201 | default: |
202 | panic("unexpected pfrc (%d)\n", pfrc); |
202 | panic("Unexpected pfrc (%d).", pfrc); |
203 | } |
203 | } |
204 | } |
204 | } |
205 | 205 | ||
206 | /* |
206 | /* |
207 | * Read the faulting TLB entry. |
207 | * Read the faulting TLB entry. |
Line 280... | Line 280... | ||
280 | * or copy_to_uspace(). |
280 | * or copy_to_uspace(). |
281 | */ |
281 | */ |
282 | page_table_unlock(AS, true); |
282 | page_table_unlock(AS, true); |
283 | return; |
283 | return; |
284 | default: |
284 | default: |
285 | panic("unexpected pfrc (%d)\n", pfrc); |
285 | panic("Unexpected pfrc (%d).", pfrc); |
286 | } |
286 | } |
287 | } |
287 | } |
288 | 288 | ||
289 | /* |
289 | /* |
290 | * Read the faulting TLB entry. |
290 | * Read the faulting TLB entry. |
Line 328... | Line 328... | ||
328 | symbol = s; |
328 | symbol = s; |
329 | s = get_symtab_entry(istate->ra); |
329 | s = get_symtab_entry(istate->ra); |
330 | if (s) |
330 | if (s) |
331 | sym2 = s; |
331 | sym2 = s; |
332 | 332 | ||
333 | fault_if_from_uspace(istate, "TLB Refill Exception on %p", |
333 | fault_if_from_uspace(istate, "TLB Refill Exception on %p.", |
334 | cp0_badvaddr_read()); |
334 | cp0_badvaddr_read()); |
335 | panic("%x: TLB Refill Exception at %x(%s<-%s)\n", cp0_badvaddr_read(), |
335 | panic("%x: TLB Refill Exception at %x(%s<-%s).", cp0_badvaddr_read(), |
336 | istate->epc, symbol, sym2); |
336 | istate->epc, symbol, sym2); |
337 | } |
337 | } |
338 | 338 | ||
339 | 339 | ||
340 | void tlb_invalid_fail(istate_t *istate) |
340 | void tlb_invalid_fail(istate_t *istate) |
Line 342... | Line 342... | ||
342 | char *symbol = ""; |
342 | char *symbol = ""; |
343 | 343 | ||
344 | char *s = get_symtab_entry(istate->epc); |
344 | char *s = get_symtab_entry(istate->epc); |
345 | if (s) |
345 | if (s) |
346 | symbol = s; |
346 | symbol = s; |
347 | fault_if_from_uspace(istate, "TLB Invalid Exception on %p", |
347 | fault_if_from_uspace(istate, "TLB Invalid Exception on %p.", |
348 | cp0_badvaddr_read()); |
348 | cp0_badvaddr_read()); |
349 | panic("%x: TLB Invalid Exception at %x(%s)\n", cp0_badvaddr_read(), |
349 | panic("%x: TLB Invalid Exception at %x(%s).", cp0_badvaddr_read(), |
350 | istate->epc, symbol); |
350 | istate->epc, symbol); |
351 | } |
351 | } |
352 | 352 | ||
353 | void tlb_modified_fail(istate_t *istate) |
353 | void tlb_modified_fail(istate_t *istate) |
354 | { |
354 | { |
355 | char *symbol = ""; |
355 | char *symbol = ""; |
356 | 356 | ||
357 | char *s = get_symtab_entry(istate->epc); |
357 | char *s = get_symtab_entry(istate->epc); |
358 | if (s) |
358 | if (s) |
359 | symbol = s; |
359 | symbol = s; |
360 | fault_if_from_uspace(istate, "TLB Modified Exception on %p", |
360 | fault_if_from_uspace(istate, "TLB Modified Exception on %p.", |
361 | cp0_badvaddr_read()); |
361 | cp0_badvaddr_read()); |
362 | panic("%x: TLB Modified Exception at %x(%s)\n", cp0_badvaddr_read(), |
362 | panic("%x: TLB Modified Exception at %x(%s).", cp0_badvaddr_read(), |
363 | istate->epc, symbol); |
363 | istate->epc, symbol); |
364 | } |
364 | } |
365 | 365 | ||
366 | /** Try to find PTE for faulting address. |
366 | /** Try to find PTE for faulting address. |
367 | * |
367 | * |
Line 431... | Line 431... | ||
431 | page_table_lock(AS, true); |
431 | page_table_lock(AS, true); |
432 | *pfrc = AS_PF_FAULT; |
432 | *pfrc = AS_PF_FAULT; |
433 | return NULL; |
433 | return NULL; |
434 | break; |
434 | break; |
435 | default: |
435 | default: |
436 | panic("unexpected rc (%d)\n", rc); |
436 | panic("Unexpected rc (%d).", rc); |
437 | } |
437 | } |
438 | 438 | ||
439 | } |
439 | } |
440 | } |
440 | } |
441 | 441 |