L 4.13:   Mapping window TLB misses: window_fault, second part 

(Revision 0  4 December 2000)

 

overview     continuing from window_fault first part, window_fault, second part looks for an entry for the faulting VA in the tlb. If it finds one it enters the C0_ENTRYLO word found in window_fault part one in the proper place. If it doesn't find one, it builds a new tlb entry with the C0_ENTRYHI and  the C0_ENTRYLO constructed in window_fault part one and a 0 for the other COENTRY_LO word and writes it to the tlb. When this routine is done (unless there's a need to handle a page fault in the receiver's address space), the sender will be able to access the receiver's fpage, header, memory buffer  or indirect strings via VAs in its own address space (whichever initiated the fault see -  l32 L5.16, l85 L5.18, 121 L5.19 and 180 L5.21).

on entry	a0	C0_ENTRYLO word
		a3	C0_ENTRYHI word
		s3	Exception VA
24-25 C0_ENTRYHI <-- C0_ENTRYHI word
26 probe tlb for matching entry
   if a tlb entry matches C0_ENTRYHI:  C0_INDEX <-- number of tlb matching entry
   else:   C0_INDEX <-- 1||031
28-30 if no match goto l42
31 read indexed tlb entry:   C0_ENTRYLO0, C0_ENTRYLO1, C0_ENTRYHI <-- tlb[index]
27,32,33,37-39 if BADVA even write C0_ENTRYHI and C0_ENTRYLO0 to tlb[index]
27,34-36,39 if BADVA odd write C0_ENTRYHI and C0_ENTRYLO1 to tlb[index]
40,41 return via other_excpt_ret
42-49 VPN is odd
     write 0 to tlb[C0_ENTRYLO0]
     write value returned by vm_lookup_pte to tlb[C0_ENTRYLO1]
     write C0_ENTRYHI to tlb[C0_ENTRYHI]
and return via other_excpt_ret
42,43,50-55 VPN is even
     write 0 to tlb[C0_ENTRYLO1]
     write value returned by vm_lookup_pte to tlb[C0_ENTRYLO0]
     write C0_ENTRYHI to tlb[C0_ENTRYHI]
and return via other_excpt_ret