Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips32/src/mm/tlb.c

    rc15b374 ra000878c  
    321321void tlb_refill_fail(istate_t *istate)
    322322{
    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);
    327330}
    328331
     
    330333void tlb_invalid_fail(istate_t *istate)
    331334{
    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);
    336341}
    337342
    338343void tlb_modified_fail(istate_t *istate)
    339344{
    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);
    344351}
    345352
    346353/** Try to find PTE for faulting address.
     354 *
     355 * The AS->lock must be held on entry to this function.
    347356 *
    348357 * @param badvaddr      Faulting virtual address.
     
    360369        entry_hi_t hi;
    361370        pte_t *pte;
    362 
    363         ASSERT(mutex_locked(&AS->lock));
    364371
    365372        hi.value = cp0_entry_hi_read();
     
    448455        hi_save.value = cp0_entry_hi_read();
    449456       
    450         printf("[nr] [asid] [vpn2] [mask] [gvdc] [pfn ]\n");
     457        printf("#  ASID VPN2   MASK G V D C PFN\n");
     458        printf("-- ---- ------ ---- - - - - ------\n");
    451459       
    452460        for (i = 0; i < TLB_ENTRY_COUNT; i++) {
     
    459467                lo1.value = cp0_entry_lo1_read();
    460468               
    461                 printf("%-4u %-6u %#6x %#6x  %1u%1u%1u%1u %#6x\n",
     469                printf("%-2u %-4u %#6x %#4x %1u %1u %1u %1u %#6x\n",
    462470                    i, hi.asid, hi.vpn2, mask.mask,
    463471                    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",
    465473                    lo1.g, lo1.v, lo1.d, lo1.c, lo1.pfn);
    466474        }
Note: See TracChangeset for help on using the changeset viewer.