Changes in kernel/arch/sparc64/src/mm/sun4u/tlb.c [9d58539:1dbc43f] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/mm/sun4u/tlb.c
r9d58539 r1dbc43f 58 58 static void dtlb_pte_copy(pte_t *, size_t, bool); 59 59 static void itlb_pte_copy(pte_t *, size_t); 60 static void do_fast_instruction_access_mmu_miss_fault(istate_t *, uintptr_t,61 const char *);62 static void do_fast_data_access_mmu_miss_fault(istate_t *, tlb_tag_access_reg_t,63 const char *);64 static void do_fast_data_access_protection_fault(istate_t *,65 tlb_tag_access_reg_t, const char *);66 60 67 61 const char *context_encoding[] = { … … 222 216 * handler. 223 217 */ 224 if (as_page_fault(page_16k, PF_ACCESS_EXEC, istate) == 225 AS_PF_FAULT) { 226 do_fast_instruction_access_mmu_miss_fault(istate, 227 istate->tpc, __func__); 228 } 218 as_page_fault(page_16k, PF_ACCESS_EXEC, istate); 229 219 } 230 220 } … … 256 246 if (!tag.vpn) { 257 247 /* NULL access in kernel */ 258 do_fast_data_access_mmu_miss_fault(istate, tag, 259 "Dereferencing NULL pointer."); 248 panic("NULL pointer dereference."); 260 249 } else if (page_8k >= end_of_identity) { 261 250 /* Kernel non-identity. */ 262 251 as = AS_KERNEL; 263 252 } else { 264 do_fast_data_access_mmu_miss_fault(istate, tag, 265 "Unexpected kernel page fault."); 253 panic("Unexpected kernel page fault."); 266 254 } 267 255 } … … 283 271 * handler. 284 272 */ 285 if (as_page_fault(page_16k, PF_ACCESS_READ, istate) == 286 AS_PF_FAULT) { 287 do_fast_data_access_mmu_miss_fault(istate, tag, 288 __func__); 289 } 273 as_page_fault(page_16k, PF_ACCESS_READ, istate); 290 274 } 291 275 } … … 332 316 * handler. 333 317 */ 334 if (as_page_fault(page_16k, PF_ACCESS_WRITE, istate) == 335 AS_PF_FAULT) { 336 do_fast_data_access_protection_fault(istate, tag, 337 __func__); 338 } 318 as_page_fault(page_16k, PF_ACCESS_WRITE, istate); 339 319 } 340 320 } … … 428 408 429 409 #endif 430 431 void do_fast_instruction_access_mmu_miss_fault(istate_t *istate,432 uintptr_t va, const char *str)433 {434 fault_if_from_uspace(istate, "%s, address=%p.", str, (void *) va);435 panic_memtrap(istate, PF_ACCESS_EXEC, va, str);436 }437 438 void do_fast_data_access_mmu_miss_fault(istate_t *istate,439 tlb_tag_access_reg_t tag, const char *str)440 {441 uintptr_t va;442 443 va = tag.vpn << MMU_PAGE_WIDTH;444 fault_if_from_uspace(istate, "%s, page=%p (asid=%u).", str,445 (void *) va, tag.context);446 panic_memtrap(istate, PF_ACCESS_UNKNOWN, va, str);447 }448 449 void do_fast_data_access_protection_fault(istate_t *istate,450 tlb_tag_access_reg_t tag, const char *str)451 {452 uintptr_t va;453 454 va = tag.vpn << MMU_PAGE_WIDTH;455 fault_if_from_uspace(istate, "%s, page=%p (asid=%u).", str,456 (void *) va, tag.context);457 panic_memtrap(istate, PF_ACCESS_WRITE, va, str);458 }459 410 460 411 void describe_dmmu_fault(void)
Note:
See TracChangeset
for help on using the changeset viewer.