Ignore:
File:
1 edited

Legend:

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

    rd99c1d2 r7008097  
    2828 */
    2929
    30 /** @addtogroup sparc64mm       
     30/** @addtogroup sparc64mm
    3131 * @{
    3232 */
     
    6262static void itlb_pte_copy(pte_t *);
    6363static void dtlb_pte_copy(pte_t *, bool);
    64 static void do_fast_instruction_access_mmu_miss_fault(istate_t *, const char *);
     64static void do_fast_instruction_access_mmu_miss_fault(istate_t *, uintptr_t,
     65    const char *);
    6566static void do_fast_data_access_mmu_miss_fault(istate_t *, uint64_t,
    6667    const char *);
     
    235236                 * Forward the page fault to the address space page fault
    236237                 * handler.
    237                  */             
     238                 */
    238239                page_table_unlock(AS, true);
    239240                if (as_page_fault(va, PF_ACCESS_EXEC, istate) == AS_PF_FAULT) {
    240241                        do_fast_instruction_access_mmu_miss_fault(istate,
    241                             __func__);
     242                            istate->tpc, __func__);
    242243                }
    243244        }
     
    354355}
    355356
    356 void do_fast_instruction_access_mmu_miss_fault(istate_t *istate,
     357void do_fast_instruction_access_mmu_miss_fault(istate_t *istate, uintptr_t va,
    357358    const char *str)
    358359{
    359         fault_if_from_uspace(istate, "%s.", str);
    360         dump_istate(istate);
    361         panic("%s.", str);
     360        fault_if_from_uspace(istate, "%s, Address=%p.", str, va);
     361        panic_memtrap(istate, PF_ACCESS_EXEC, va, "%s.", str);
    362362}
    363363
     
    365365    uint64_t page_and_ctx, const char *str)
    366366{
    367         if (DMISS_CONTEXT(page_and_ctx)) {
    368                 fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d)\n", str, DMISS_ADDRESS(page_and_ctx),
    369                     DMISS_CONTEXT(page_and_ctx));
    370         }
    371         dump_istate(istate);
    372         printf("Faulting page: %p, ASID=%d\n", DMISS_ADDRESS(page_and_ctx), DMISS_CONTEXT(page_and_ctx));
    373         panic("%s\n", str);
     367        fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d).", str,
     368            DMISS_ADDRESS(page_and_ctx), DMISS_CONTEXT(page_and_ctx));
     369        panic_memtrap(istate, PF_ACCESS_READ, DMISS_ADDRESS(page_and_ctx),
     370            "%s.");
    374371}
    375372
     
    377374    uint64_t page_and_ctx, const char *str)
    378375{
    379         if (DMISS_CONTEXT(page_and_ctx)) {
    380                 fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d)\n", str, DMISS_ADDRESS(page_and_ctx),
    381                     DMISS_CONTEXT(page_and_ctx));
    382         }
    383         printf("Faulting page: %p, ASID=%d\n", DMISS_ADDRESS(page_and_ctx), DMISS_CONTEXT(page_and_ctx));
    384         dump_istate(istate);
    385         panic("%s\n", str);
     376        fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d).", str,
     377            DMISS_ADDRESS(page_and_ctx), DMISS_CONTEXT(page_and_ctx));
     378        panic_memtrap(istate, PF_ACCESS_WRITE, DMISS_ADDRESS(page_and_ctx),
     379            "%s.");
    386380}
    387381
Note: See TracChangeset for help on using the changeset viewer.