Ignore:
File:
1 edited

Legend:

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

    ra000878c rc15b374  
    321321void tlb_refill_fail(istate_t *istate)
    322322{
    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);
     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.");
    330327}
    331328
     
    333330void tlb_invalid_fail(istate_t *istate)
    334331{
    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);
     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.");
    341336}
    342337
    343338void tlb_modified_fail(istate_t *istate)
    344339{
    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);
     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.");
    351344}
    352345
    353346/** Try to find PTE for faulting address.
    354  *
    355  * The AS->lock must be held on entry to this function.
    356347 *
    357348 * @param badvaddr      Faulting virtual address.
     
    369360        entry_hi_t hi;
    370361        pte_t *pte;
     362
     363        ASSERT(mutex_locked(&AS->lock));
    371364
    372365        hi.value = cp0_entry_hi_read();
     
    455448        hi_save.value = cp0_entry_hi_read();
    456449       
    457         printf("#  ASID VPN2   MASK G V D C PFN\n");
    458         printf("-- ---- ------ ---- - - - - ------\n");
     450        printf("[nr] [asid] [vpn2] [mask] [gvdc] [pfn ]\n");
    459451       
    460452        for (i = 0; i < TLB_ENTRY_COUNT; i++) {
     
    467459                lo1.value = cp0_entry_lo1_read();
    468460               
    469                 printf("%-2u %-4u %#6x %#4x %1u %1u %1u %1u %#6x\n",
     461                printf("%-4u %-6u %#6x %#6x  %1u%1u%1u%1u %#6x\n",
    470462                    i, hi.asid, hi.vpn2, mask.mask,
    471463                    lo0.g, lo0.v, lo0.d, lo0.c, lo0.pfn);
    472                 printf("                    %1u %1u %1u %1u %#6x\n",
     464                printf("                           %1u%1u%1u%1u %#6x\n",
    473465                    lo1.g, lo1.v, lo1.d, lo1.c, lo1.pfn);
    474466        }
Note: See TracChangeset for help on using the changeset viewer.