mem.c (10537) | mem.c (10624) |
---|---|
1/*- 2 * Copyright (c) 1988 University of Utah. 3 * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the Systems Programming Group of the University of Utah Computer 8 * Science Department, and code derived from software contributed to --- 24 unchanged lines hidden (view full) --- 33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37 * SUCH DAMAGE. 38 * 39 * from: Utah $Hdr: mem.c 1.13 89/10/08$ 40 * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 | 1/*- 2 * Copyright (c) 1988 University of Utah. 3 * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the Systems Programming Group of the University of Utah Computer 8 * Science Department, and code derived from software contributed to --- 24 unchanged lines hidden (view full) --- 33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37 * SUCH DAMAGE. 38 * 39 * from: Utah $Hdr: mem.c 1.13 89/10/08$ 40 * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 |
41 * $Id: mem.c,v 1.9 1994/08/06 10:25:34 davidg Exp $ | 41 * $Id: mem.c,v 1.10 1995/09/03 05:43:04 julian Exp $ |
42 */ 43 44/* 45 * Memory special file 46 */ 47 48#include <sys/param.h> 49#include <sys/conf.h> --- 30 unchanged lines hidden (view full) --- 80SYSINIT(memdev,SI_SUB_DEVFS, SI_ORDER_ANY, memdev_init, NULL) 81#endif /*DEVFS*/ 82 83 84 85extern char *ptvmmap; /* poor name! */ 86/*ARGSUSED*/ 87int | 42 */ 43 44/* 45 * Memory special file 46 */ 47 48#include <sys/param.h> 49#include <sys/conf.h> --- 30 unchanged lines hidden (view full) --- 80SYSINIT(memdev,SI_SUB_DEVFS, SI_ORDER_ANY, memdev_init, NULL) 81#endif /*DEVFS*/ 82 83 84 85extern char *ptvmmap; /* poor name! */ 86/*ARGSUSED*/ 87int |
88mmclose(dev, uio, flags) | 88mmclose(dev, flags, fmt, p) |
89 dev_t dev; | 89 dev_t dev; |
90 struct uio *uio; | |
91 int flags; | 90 int flags; |
91 int fmt; 92 struct proc *p; |
|
92{ 93 struct trapframe *fp; 94 95 switch (minor(dev)) { 96 case 14: 97 fp = (struct trapframe *)curproc->p_md.md_regs; 98 fp->tf_eflags &= ~PSL_IOPL; 99 break; 100 default: 101 break; 102 } 103 return(0); 104} 105/*ARGSUSED*/ 106int | 93{ 94 struct trapframe *fp; 95 96 switch (minor(dev)) { 97 case 14: 98 fp = (struct trapframe *)curproc->p_md.md_regs; 99 fp->tf_eflags &= ~PSL_IOPL; 100 break; 101 default: 102 break; 103 } 104 return(0); 105} 106/*ARGSUSED*/ 107int |
107mmopen(dev, uio, flags) | 108mmopen(dev, flags, fmt, p) |
108 dev_t dev; | 109 dev_t dev; |
109 struct uio *uio; | |
110 int flags; | 110 int flags; |
111 int fmt; 112 struct proc *p; |
|
111{ 112 struct trapframe *fp; 113 114 switch (minor(dev)) { 115 case 14: 116 fp = (struct trapframe *)curproc->p_md.md_regs; 117 fp->tf_eflags |= PSL_IOPL; 118 break; --- 162 unchanged lines hidden --- | 113{ 114 struct trapframe *fp; 115 116 switch (minor(dev)) { 117 case 14: 118 fp = (struct trapframe *)curproc->p_md.md_regs; 119 fp->tf_eflags |= PSL_IOPL; 120 break; --- 162 unchanged lines hidden --- |