diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2019-04-04 15:21:25 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2019-04-04 15:21:25 +0200 |
commit | 0132e7fed0ee48dae66607fbccd7c0ab1acea45e (patch) | |
tree | b5153e755c23a655bccad11a0d1199af1e9722b5 /sys/src/9/pc64/mmu.c | |
parent | ed6b42863cbe71ec4ab31966bc23f5d84374f6b3 (diff) |
pc64: get rid of TSTKTOP, USTKTOP is the end of user address space
the temporary stack segment used to be at a fixed address above or
below the user stack. these days, the temp stack is mapped dynamically
by sysexec so TSTKTOP is obsolete.
Diffstat (limited to 'sys/src/9/pc64/mmu.c')
-rw-r--r-- | sys/src/9/pc64/mmu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/src/9/pc64/mmu.c b/sys/src/9/pc64/mmu.c index 02f96d55a..45bc76d40 100644 --- a/sys/src/9/pc64/mmu.c +++ b/sys/src/9/pc64/mmu.c @@ -221,12 +221,12 @@ mmucreate(uintptr *table, uintptr va, int level, int index) flags = PTEWRITE|PTEVALID; if(va < VMAP){ assert(up != nil); - assert((va < TSTKTOP) || (va >= KMAP && va < KMAP+KMAPSIZE)); + assert((va < USTKTOP) || (va >= KMAP && va < KMAP+KMAPSIZE)); p = mmualloc(); p->index = index; p->level = level; - if(va < TSTKTOP){ + if(va < USTKTOP){ flags |= PTEUSER; if(level == PML4E){ if((p->next = up->mmuhead) == nil) @@ -341,9 +341,9 @@ mmuzap(void) /* common case */ pte[PTLX(UTZERO, 3)] = 0; - pte[PTLX(TSTKTOP, 3)] = 0; + pte[PTLX(USTKTOP-1, 3)] = 0; m->mmumap[PTLX(UTZERO, 3)/MAPBITS] &= ~(1ull<<(PTLX(UTZERO, 3)%MAPBITS)); - m->mmumap[PTLX(TSTKTOP, 3)/MAPBITS] &= ~(1ull<<(PTLX(TSTKTOP, 3)%MAPBITS)); + m->mmumap[PTLX(USTKTOP-1, 3)/MAPBITS] &= ~(1ull<<(PTLX(USTKTOP-1, 3)%MAPBITS)); for(i = 0; i < nelem(m->mmumap); pte += MAPBITS, i++){ if((w = m->mmumap[i]) == 0) |