Changeset 36f19c0 in mainline for kernel/arch/sparc64/src/mm/tlb.c
- Timestamp:
- 2007-04-09T16:21:47Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ec5b3204
- Parents:
- 183788f1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/mm/tlb.c
r183788f1 r36f19c0 199 199 200 200 /** ITLB miss handler. */ 201 void fast_instruction_access_mmu_miss( int n, istate_t *istate)201 void fast_instruction_access_mmu_miss(unative_t unused, istate_t *istate) 202 202 { 203 203 uintptr_t va = ALIGN_DOWN(istate->tpc, PAGE_SIZE); … … 235 235 * Note that some faults (e.g. kernel faults) were already resolved by the 236 236 * low-level, assembly language part of the fast_data_access_mmu_miss handler. 237 */ 238 void fast_data_access_mmu_miss(int n, istate_t *istate) 239 { 240 tlb_tag_access_reg_t tag; 237 * 238 * @param tag Content of the TLB Tag Access register as it existed when the 239 * trap happened. This is to prevent confusion created by clobbered 240 * Tag Access register during a nested DTLB miss. 241 * @param istate Interrupted state saved on the stack. 242 */ 243 void fast_data_access_mmu_miss(tlb_tag_access_reg_t tag, istate_t *istate) 244 { 241 245 uintptr_t va; 242 246 index_t index; 243 247 pte_t *t; 244 248 245 tag.value = dtlb_tag_access_read();246 249 va = ALIGN_DOWN((uint64_t) tag.vpn << MMU_PAGE_WIDTH, PAGE_SIZE); 247 250 index = tag.vpn % MMU_PAGES_PER_PAGE; … … 283 286 } 284 287 285 /** DTLB protection fault handler. */ 286 void fast_data_access_protection(int n, istate_t *istate) 287 { 288 tlb_tag_access_reg_t tag; 288 /** DTLB protection fault handler. 289 * 290 * @param tag Content of the TLB Tag Access register as it existed when the 291 * trap happened. This is to prevent confusion created by clobbered 292 * Tag Access register during a nested DTLB miss. 293 * @param istate Interrupted state saved on the stack. 294 */ 295 void fast_data_access_protection(tlb_tag_access_reg_t tag, istate_t *istate) 296 { 289 297 uintptr_t va; 290 298 index_t index; 291 299 pte_t *t; 292 300 293 tag.value = dtlb_tag_access_read();294 301 va = ALIGN_DOWN((uint64_t) tag.vpn << MMU_PAGE_WIDTH, PAGE_SIZE); 295 302 index = tag.vpn % MMU_PAGES_PER_PAGE; /* 16K-page emulation */ … … 372 379 373 380 va = tag.vpn << MMU_PAGE_WIDTH; 374 375 fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d)\n", str, va, 376 tag.context); 381 if (tag.context) { 382 fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d)\n", str, va, 383 tag.context); 384 } 377 385 dump_istate(istate); 378 386 printf("Faulting page: %p, ASID=%d\n", va, tag.context); … … 387 395 va = tag.vpn << MMU_PAGE_WIDTH; 388 396 389 fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d)\n", str, va, 390 tag.context); 397 if (tag.context) { 398 fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d)\n", str, va, 399 tag.context); 400 } 391 401 printf("Faulting page: %p, ASID=%d\n", va, tag.context); 392 402 dump_istate(istate);
Note:
See TracChangeset
for help on using the changeset viewer.