--- Net2/vm/vm_glue.c 2018/04/24 18:03:57 1.1 +++ Net2/vm/vm_glue.c 2018/04/24 18:09:21 1.1.1.3 @@ -59,6 +59,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ +static char rcsid[] = "$Header: /var/lib/cvsd/net2/Net2/vm/vm_glue.c,v 1.1.1.3 2018/04/24 18:09:21 root Exp $"; #include "param.h" #include "systm.h" @@ -186,8 +187,12 @@ vm_fork(p1, p2, isvfork) /* * Allocate a wired-down (for now) pcb and kernel stack for the process */ +#ifdef notyet addr = kmem_alloc_pageable(kernel_map, ctob(UPAGES)); vm_map_pageable(kernel_map, addr, addr + ctob(UPAGES), FALSE); +#else + addr = kmem_alloc(kernel_map, ctob(UPAGES)); +#endif up = (struct user *)addr; p2->p_addr = up; @@ -211,10 +216,10 @@ vm_fork(p1, p2, isvfork) { u_int addr = UPT_MIN_ADDRESS - UPAGES*NBPG; struct vm_map *vp; vp = &p2->p_vmspace->vm_map; - (void)vm_map_pageable(vp, addr, 0xfe000000 - addr, TRUE); - (void)vm_deallocate(vp, addr, 0xfe000000 - addr); + + /* ream out old pagetables and kernel stack */ + (void)vm_deallocate(vp, addr, UPT_MAX_ADDRESS - addr); (void)vm_allocate(vp, &addr, UPT_MAX_ADDRESS - addr, FALSE); - (void)vm_map_inherit(vp, addr, UPT_MAX_ADDRESS, VM_INHERIT_NONE); } #endif /* @@ -429,6 +434,7 @@ swapout(p) #endif size = round_page(ctob(UPAGES)); addr = (vm_offset_t) p->p_addr; +#ifdef notyet #ifdef hp300 /* * Ugh! u-area is double mapped to a fixed address behind the @@ -451,6 +457,7 @@ swapout(p) #endif vm_map_pageable(kernel_map, addr, addr+size, TRUE); pmap_collect(vm_map_pmap(&p->p_vmspace->vm_map)); +#endif (void) splhigh(); p->p_flag &= ~SLOAD; if (p->p_stat == SRUN)