vm_glue.c (877329e0590972edde08e476dc00a8bb01c42dba) | vm_glue.c (a6e6bcc5f450124bd4741226a8498f22538e983b) |
---|---|
1/* 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * The Mach Operating System project at Carnegie-Mellon University. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 45 unchanged lines hidden (view full) --- 54 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 55 * School of Computer Science 56 * Carnegie Mellon University 57 * Pittsburgh PA 15213-3890 58 * 59 * any improvements or extensions that they make and grant Carnegie the 60 * rights to redistribute these changes. 61 * | 1/* 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * The Mach Operating System project at Carnegie-Mellon University. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 45 unchanged lines hidden (view full) --- 54 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 55 * School of Computer Science 56 * Carnegie Mellon University 57 * Pittsburgh PA 15213-3890 58 * 59 * any improvements or extensions that they make and grant Carnegie the 60 * rights to redistribute these changes. 61 * |
62 * $Id: vm_glue.c,v 1.50 1996/05/31 00:37:57 dyson Exp $ | 62 * $Id: vm_glue.c,v 1.51 1996/06/30 21:16:18 dyson Exp $ |
63 */ 64 65#include "opt_ddb.h" 66 67#include <sys/param.h> 68#include <sys/systm.h> 69#include <sys/proc.h> 70#include <sys/resourcevar.h> --- 177 unchanged lines hidden (view full) --- 248 * Enter the page into both the kernel and the process 249 * address space. 250 */ 251 pmap_enter( pvp, (vm_offset_t) kstack + i * PAGE_SIZE, 252 VM_PAGE_TO_PHYS(m), VM_PROT_READ|VM_PROT_WRITE, TRUE); 253 pmap_kenter(((vm_offset_t) up) + i * PAGE_SIZE, 254 VM_PAGE_TO_PHYS(m)); 255 m->flags &= ~PG_ZERO; | 63 */ 64 65#include "opt_ddb.h" 66 67#include <sys/param.h> 68#include <sys/systm.h> 69#include <sys/proc.h> 70#include <sys/resourcevar.h> --- 177 unchanged lines hidden (view full) --- 248 * Enter the page into both the kernel and the process 249 * address space. 250 */ 251 pmap_enter( pvp, (vm_offset_t) kstack + i * PAGE_SIZE, 252 VM_PAGE_TO_PHYS(m), VM_PROT_READ|VM_PROT_WRITE, TRUE); 253 pmap_kenter(((vm_offset_t) up) + i * PAGE_SIZE, 254 VM_PAGE_TO_PHYS(m)); 255 m->flags &= ~PG_ZERO; |
256 m->flags |= PG_MAPPED; | 256 m->flags |= PG_MAPPED|PG_WRITEABLE; |
257 m->valid = VM_PAGE_BITS_ALL; 258 } 259 260 p2->p_addr = up; 261 262 /* 263 * p_stats and p_sigacts currently point at fields in the user struct 264 * but not at &u, instead at p_addr. Copy p_sigacts and parts of --- 94 unchanged lines hidden (view full) --- 359 int rv; 360 rv = vm_pager_get_pages(upobj, 361 &m, 1, 0); 362 if (rv != VM_PAGER_OK) 363 panic("faultin: cannot get upages for proc: %d\n", p->p_pid); 364 m->valid = VM_PAGE_BITS_ALL; 365 } 366 PAGE_WAKEUP(m); | 257 m->valid = VM_PAGE_BITS_ALL; 258 } 259 260 p2->p_addr = up; 261 262 /* 263 * p_stats and p_sigacts currently point at fields in the user struct 264 * but not at &u, instead at p_addr. Copy p_sigacts and parts of --- 94 unchanged lines hidden (view full) --- 359 int rv; 360 rv = vm_pager_get_pages(upobj, 361 &m, 1, 0); 362 if (rv != VM_PAGER_OK) 363 panic("faultin: cannot get upages for proc: %d\n", p->p_pid); 364 m->valid = VM_PAGE_BITS_ALL; 365 } 366 PAGE_WAKEUP(m); |
367 m->flags |= PG_MAPPED; | 367 m->flags |= PG_MAPPED|PG_WRITEABLE; |
368 } 369 370 s = splhigh(); 371 372 if (p->p_stat == SRUN) 373 setrunqueue(p); 374 375 p->p_flag |= P_INMEM; --- 224 unchanged lines hidden --- | 368 } 369 370 s = splhigh(); 371 372 if (p->p_stat == SRUN) 373 setrunqueue(p); 374 375 p->p_flag |= P_INMEM; --- 224 unchanged lines hidden --- |