| plan 9 kernel history: overview | file list | diff list |
1999/0415/alphapc/mmu.c (diff list | history)
| 1999/0415/sys/src/9/alphapc/mmu.c:233,241 – 1999/0511/sys/src/9/alphapc/mmu.c:233,254 (short | long) | ||
| 1999/0415 | } ulong | |
| 1999/0511 | upamalloc(ulong pa, int size, int align) | |
| 1999/0415 | { | |
| 1999/0511 | void *va; /* * Viability hack. return kmapv(((uvlong)space<<32LL)|offset, size); return kmapio(0x88, addr, len); */ USED(align); print("upa0: pa %luX size %d, align %d nextio %luX\n", pa, size, align, nextio); va = kmapv(((uvlong)0x88<<32LL)|pa, size); print("upa1: va %luX nextio %luX\n", va, nextio); if(va == nil) return 0; return PADDR(va); | |
| 1999/0415 | } void | |
| 1999/0511/sys/src/9/alphapc/mmu.c:238,251 – 1999/0512/sys/src/9/alphapc/mmu.c:238,249 (short | long) | ||
| 1999/0511 | void *va; /* | |
| 1999/0512 | * Viability hack. Only for PCI frambuffers. | |
| 1999/0511 | */ | |
| 1999/0512 | if(pa == 0) return 0; | |
| 1999/0511 | USED(align); | |
| 1999/0512/sys/src/9/alphapc/mmu.c:250,256 – 2000/0401/sys/src/9/alphapc/mmu.c:250,256 (short | long) | ||
| 1999/0415 | } void | |
| 2000/0401 | upafree(ulong, int) | |
| 1999/0415 | { | |
| 2000/0401 | print("upafree: virtual mapping not freed\n"); | |
| 1999/0415 | } | |
| 2000/0401/sys/src/9/alphapc/mmu.c:238,244 – 2000/0517/sys/src/9/alphapc/mmu.c:238,244 (short | long) | ||
| 1999/0511 | void *va; /* | |
| 1999/0512 |
| |
| 2000/0517 | * Viability hack. Only for PCI framebuffers. | |
| 1999/0511 | */ | |
| 1999/0512 | if(pa == 0) return 0; | |
| 2000/0517/sys/src/9/alphapc/mmu.c:254,256 – 2001/0727/sys/src/9/alphapc/mmu.c:254,272 (short | long) | ||
| 1999/0415 | { | |
| 2000/0401 | print("upafree: virtual mapping not freed\n"); | |
| 1999/0415 | } | |
| 2001/0727 | void mmudump(void) { Page *top, *lvl2; iprint("ptbr %lux up %lux\n", (ulong)m->ptbr, up); if(up) { top = up->mmutop; if(top != nil) iprint("top %lux top[N-1] %lux\n", top->va, ((uvlong *)top->va)[PTE2PG-1]); lvl2 = up->mmulvl2; if(lvl2 != nil) iprint("lvl2 %lux\n", lvl2->va); } } | |
| 2001/0727/sys/src/9/alphapc/mmu.c:38,79 – 2001/0728/sys/src/9/alphapc/mmu.c:38,75 (short | long) | ||
| 1999/0415 | nextio = (uchar*) (KZERO|bootconf->maxphys); } | |
| 2001/0728 | static void mmuptefree(Proc* proc) | |
| 1999/0415 | { | |
| 2001/0728 | Page **last, *page; | |
| 1999/0415 |
| |
| 2001/0728 | if(proc->mmutop && proc->mmuused){ lvl2 = (uvlong*)proc->mmulvl2->va; last = &proc->mmuused; for(page = *last; page; page = page->next){ lvl2[page->daddr] = 0; last = &page->next; | |
| 1999/0415 | } | |
| 2001/0728 | *last = proc->mmufree; proc->mmufree = proc->mmuused; proc->mmuused = 0; | |
| 1999/0415 | } | |
| 2001/0728 | } | |
| 1999/0415 | ||
| 2001/0728 | void mmuswitch(Proc *proc) { if(proc->newtlb){ mmuptefree(proc); proc->newtlb = 0; } | |
| 1999/0415 | /* tell processor about new page table and flush cached entries */ | |
| 2001/0728 | if(proc->mmutop == 0) | |
| 1999/0415 | setptb(origlvl1); else | |
| 2001/0728 | setptb(proc->mmutop->pa); | |
| 1999/0415 | tlbflush(-1, 0); icflush(); } | |
| 2001/0727/sys/src/9/alphapc/mmu.c:83,126 – 2001/0728/sys/src/9/alphapc/mmu.c:79,113 | ||
| 1999/0415 | * with palloc locked. */ void | |
| 2001/0728 | mmurelease(Proc *proc) | |
| 1999/0415 | { | |
| 2001/0728 | Page *page, *next; | |
| 1999/0415 |
| |
| 2001/0728 | mmuptefree(proc); proc->mmuused = 0; if(proc->mmutop) { proc->mmutop->next = proc->mmufree; proc->mmufree = proc->mmutop; proc->mmutop = 0; | |
| 1999/0415 | } | |
| 2001/0728 | if(proc->mmulvl2) { proc->mmulvl2->next = proc->mmufree; proc->mmufree = proc->mmulvl2; proc->mmulvl2 = 0; | |
| 1999/0415 | } | |
| 2001/0728 | for(page = proc->mmufree; page; page = next){ next = page->next; if(--page->ref) panic("mmurelease: page->ref %d\n", page->ref); pagechainhead(page); | |
| 1999/0415 | } | |
| 2001/0728 | if(proc->mmufree && palloc.r.p) | |
| 1999/0415 | wakeup(&palloc.r); | |
| 2001/0728 | proc->mmufree = 0; | |
| 1999/0415 | } void | |
| 2001/0728/sys/src/9/alphapc/mmu.c:251,257 – 2001/1121/sys/src/9/alphapc/mmu.c:251,257 (short | long) | ||
| 2001/0727 | if(up) { top = up->mmutop; if(top != nil) | |
| 2001/1121 | iprint("top %lux top[N-1] %llux\n", top->va, ((uvlong *)top->va)[PTE2PG-1]); | |
| 2001/0727 | lvl2 = up->mmulvl2; if(lvl2 != nil) iprint("lvl2 %lux\n", lvl2->va); | |
| 2001/1121/sys/src/9/alphapc/mmu.c:74,79 – 2002/0116/sys/src/9/alphapc/mmu.c:74,87 (short | long) | ||
|
Add mmupark.
rsc Fri Mar 4 12:44:25 2005 | ||
| 1999/0415 | icflush(); } | |
| 2002/0116 | /* point to protoype page map */ void mmupark(void) { setptb(origlvl1); icflush(); } | |
| 1999/0415 | /* * give all page table pages back to the free pool. This is called in sched() * with palloc locked. | |
| 2001/1121/sys/src/9/alphapc/mmu.c:83,92 – 2002/0116/sys/src/9/alphapc/mmu.c:91,97 | ||
| 1999/0415 | { | |
| 2001/0728 | Page *page, *next; | |
| 1999/0415 |
| |
| 2002/0116 | mmupark(); | |
| 2001/0728 | mmuptefree(proc); proc->mmuused = 0; if(proc->mmutop) { | |