Changeset 25eec4e in mainline for kernel/arch/sparc64/src/mm/sun4v/tlb.c
- Timestamp:
- 2013-04-19T18:38:18Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6d717a4
- Parents:
- a1e2df13 (diff), 289cb7dd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/mm/sun4v/tlb.c
ra1e2df13 r25eec4e 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.