Changeset e0b241f in mainline for kernel/arch/sparc64/src/mm/tlb.c
- Timestamp:
- 2006-08-31T11:55:19Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ed166f7
- Parents:
- beb3926a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/mm/tlb.c
rbeb3926a re0b241f 55 55 static void do_fast_data_access_mmu_miss_fault(istate_t *istate, const char *str); 56 56 static void do_fast_instruction_access_mmu_miss_fault(istate_t *istate, const char *str); 57 static void do_fast_data_access_protection_fault(istate_t *istate, const char *str); 57 58 58 59 char *context_encoding[] = { … … 246 247 void fast_data_access_protection(int n, istate_t *istate) 247 248 { 248 panic("%s\n", __FUNCTION__); 249 tlb_tag_access_reg_t tag; 250 uintptr_t va; 251 pte_t *t; 252 253 tag.value = dtlb_tag_access_read(); 254 va = tag.vpn * PAGE_SIZE; 255 256 page_table_lock(AS, true); 257 t = page_mapping_find(AS, va); 258 if (t && PTE_WRITABLE(t)) { 259 /* 260 * The mapping was found in the software page hash table and is writable. 261 * Demap the old mapping and insert an updated mapping into DTLB. 262 */ 263 t->a = true; 264 t->d = true; 265 dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_SECONDARY, va); 266 dtlb_pte_copy(t, false); 267 page_table_unlock(AS, true); 268 } else { 269 /* 270 * Forward the page fault to the address space page fault handler. 271 */ 272 page_table_unlock(AS, true); 273 if (as_page_fault(va, PF_ACCESS_WRITE, istate) == AS_PF_FAULT) { 274 do_fast_data_access_protection_fault(istate, __FUNCTION__); 275 } 276 } 249 277 } 250 278 … … 298 326 } 299 327 328 void do_fast_data_access_protection_fault(istate_t *istate, const char *str) 329 { 330 tlb_tag_access_reg_t tag; 331 uintptr_t va; 332 char *tpc_str = get_symtab_entry(istate->tpc); 333 334 tag.value = dtlb_tag_access_read(); 335 va = tag.vpn * PAGE_SIZE; 336 337 printf("Faulting page: %p, ASID=%d\n", va, tag.context); 338 printf("TPC=%p, (%s)\n", istate->tpc, tpc_str); 339 panic("%s\n", str); 340 } 341 300 342 /** Invalidate all unlocked ITLB and DTLB entries. */ 301 343 void tlb_invalidate_all(void)
Note:
See TracChangeset
for help on using the changeset viewer.