Ignore:
File:
1 edited

Legend:

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

    r9aed144 r1dbc43f  
    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 *, uintptr_t,
    65     const char *);
    66 static void do_fast_data_access_mmu_miss_fault(istate_t *, uint64_t,
    67     const char *);
    68 static void do_fast_data_access_protection_fault(istate_t *,
    69     uint64_t, const char *);
    7064
    7165/*
     
    235229                 * handler.
    236230                 */
    237                 if (as_page_fault(va, PF_ACCESS_EXEC, istate) == AS_PF_FAULT) {
    238                         do_fast_instruction_access_mmu_miss_fault(istate,
    239                             istate->tpc, __func__);
    240                 }
     231                as_page_fault(va, PF_ACCESS_EXEC, istate);
    241232        }
    242233}
     
    264255                if (va == 0) {
    265256                        /* NULL access in kernel */
    266                         do_fast_data_access_mmu_miss_fault(istate, page_and_ctx,
    267                             __func__);
     257                        panic("NULL pointer dereference.");
    268258                }
    269                 do_fast_data_access_mmu_miss_fault(istate, page_and_ctx, "Unexpected "
    270                     "kernel page fault.");
     259                panic("Unexpected kernel page fault.");
    271260        }
    272261
     
    287276                 * handler.
    288277                 */             
    289                 if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) {
    290                         do_fast_data_access_mmu_miss_fault(istate, page_and_ctx,
    291                             __func__);
    292                 }
     278                as_page_fault(va, PF_ACCESS_READ, istate);
    293279        }
    294280}
     
    329315                 * handler.
    330316                 */             
    331                 if (as_page_fault(va, PF_ACCESS_WRITE, istate) == AS_PF_FAULT) {
    332                         do_fast_data_access_protection_fault(istate, page_and_ctx,
    333                             __func__);
    334                 }
     317                as_page_fault(va, PF_ACCESS_WRITE, istate);
    335318        }
    336319}
     
    346329}
    347330
    348 void do_fast_instruction_access_mmu_miss_fault(istate_t *istate, uintptr_t va,
    349     const char *str)
    350 {
    351         fault_if_from_uspace(istate, "%s, address=%p.", str,
    352             (void *) va);
    353         panic_memtrap(istate, PF_ACCESS_EXEC, va, str);
    354 }
    355 
    356 void do_fast_data_access_mmu_miss_fault(istate_t *istate,
    357     uint64_t page_and_ctx, const char *str)
    358 {
    359         fault_if_from_uspace(istate, "%s, page=%p (asid=%" PRId64 ").", str,
    360             (void *) DMISS_ADDRESS(page_and_ctx), DMISS_CONTEXT(page_and_ctx));
    361         panic_memtrap(istate, PF_ACCESS_UNKNOWN, DMISS_ADDRESS(page_and_ctx),
    362             str);
    363 }
    364 
    365 void do_fast_data_access_protection_fault(istate_t *istate,
    366     uint64_t page_and_ctx, const char *str)
    367 {
    368         fault_if_from_uspace(istate, "%s, page=%p (asid=%" PRId64 ").", str,
    369             (void *) DMISS_ADDRESS(page_and_ctx), DMISS_CONTEXT(page_and_ctx));
    370         panic_memtrap(istate, PF_ACCESS_WRITE, DMISS_ADDRESS(page_and_ctx),
    371             str);
    372 }
    373 
    374331/**
    375332 * Describes the exact condition which caused the last DMMU fault.
Note: See TracChangeset for help on using the changeset viewer.