Changes in kernel/arch/mips32/src/mm/tlb.c [c15b374:a000878c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/src/mm/tlb.c
rc15b374 ra000878c 321 321 void tlb_refill_fail(istate_t *istate) 322 322 { 323 uintptr_t va = cp0_badvaddr_read(); 324 325 fault_if_from_uspace(istate, "TLB Refill Exception on %p.", va); 326 panic_memtrap(istate, PF_ACCESS_UNKNOWN, va, "TLB Refill Exception."); 323 const char *symbol = symtab_fmt_name_lookup(istate->epc); 324 const char *sym2 = symtab_fmt_name_lookup(istate->ra); 325 326 fault_if_from_uspace(istate, "TLB Refill Exception on %p.", 327 cp0_badvaddr_read()); 328 panic("%x: TLB Refill Exception at %x (%s<-%s).", cp0_badvaddr_read(), 329 istate->epc, symbol, sym2); 327 330 } 328 331 … … 330 333 void tlb_invalid_fail(istate_t *istate) 331 334 { 332 uintptr_t va = cp0_badvaddr_read(); 333 334 fault_if_from_uspace(istate, "TLB Invalid Exception on %p.", va); 335 panic_memtrap(istate, PF_ACCESS_UNKNOWN, va, "TLB Invalid Exception."); 335 const char *symbol = symtab_fmt_name_lookup(istate->epc); 336 337 fault_if_from_uspace(istate, "TLB Invalid Exception on %p.", 338 cp0_badvaddr_read()); 339 panic("%x: TLB Invalid Exception at %x (%s).", cp0_badvaddr_read(), 340 istate->epc, symbol); 336 341 } 337 342 338 343 void tlb_modified_fail(istate_t *istate) 339 344 { 340 uintptr_t va = cp0_badvaddr_read(); 341 342 fault_if_from_uspace(istate, "TLB Modified Exception on %p.", va); 343 panic_memtrap(istate, PF_ACCESS_WRITE, va, "TLB Modified Exception."); 345 const char *symbol = symtab_fmt_name_lookup(istate->epc); 346 347 fault_if_from_uspace(istate, "TLB Modified Exception on %p.", 348 cp0_badvaddr_read()); 349 panic("%x: TLB Modified Exception at %x (%s).", cp0_badvaddr_read(), 350 istate->epc, symbol); 344 351 } 345 352 346 353 /** Try to find PTE for faulting address. 354 * 355 * The AS->lock must be held on entry to this function. 347 356 * 348 357 * @param badvaddr Faulting virtual address. … … 360 369 entry_hi_t hi; 361 370 pte_t *pte; 362 363 ASSERT(mutex_locked(&AS->lock));364 371 365 372 hi.value = cp0_entry_hi_read(); … … 448 455 hi_save.value = cp0_entry_hi_read(); 449 456 450 printf("[nr] [asid] [vpn2] [mask] [gvdc] [pfn ]\n"); 457 printf("# ASID VPN2 MASK G V D C PFN\n"); 458 printf("-- ---- ------ ---- - - - - ------\n"); 451 459 452 460 for (i = 0; i < TLB_ENTRY_COUNT; i++) { … … 459 467 lo1.value = cp0_entry_lo1_read(); 460 468 461 printf("%- 4u %-6u %#6x %#6x %1u%1u%1u%1u%#6x\n",469 printf("%-2u %-4u %#6x %#4x %1u %1u %1u %1u %#6x\n", 462 470 i, hi.asid, hi.vpn2, mask.mask, 463 471 lo0.g, lo0.v, lo0.d, lo0.c, lo0.pfn); 464 printf(" %1u%1u%1u%1u%#6x\n",472 printf(" %1u %1u %1u %1u %#6x\n", 465 473 lo1.g, lo1.v, lo1.d, lo1.c, lo1.pfn); 466 474 }
Note:
See TracChangeset
for help on using the changeset viewer.