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