Changes in kernel/arch/sparc64/src/mm/sun4v/tlb.c [9aed144:1dbc43f] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/mm/sun4v/tlb.c
r9aed144 r1dbc43f 62 62 static void itlb_pte_copy(pte_t *); 63 63 static 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 *);70 64 71 65 /* … … 235 229 * handler. 236 230 */ 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); 241 232 } 242 233 } … … 264 255 if (va == 0) { 265 256 /* NULL access in kernel */ 266 do_fast_data_access_mmu_miss_fault(istate, page_and_ctx, 267 __func__); 257 panic("NULL pointer dereference."); 268 258 } 269 do_fast_data_access_mmu_miss_fault(istate, page_and_ctx, "Unexpected " 270 "kernel page fault."); 259 panic("Unexpected kernel page fault."); 271 260 } 272 261 … … 287 276 * handler. 288 277 */ 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); 293 279 } 294 280 } … … 329 315 * handler. 330 316 */ 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); 335 318 } 336 319 } … … 346 329 } 347 330 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 374 331 /** 375 332 * Describes the exact condition which caused the last DMMU fault.
Note:
See TracChangeset
for help on using the changeset viewer.