mem.c (183397) | mem.c (201223) |
---|---|
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 --- 23 unchanged lines hidden (view full) --- 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * from: Utah $Hdr: mem.c 1.13 89/10/08$ 36 * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 37 */ 38 39#include <sys/cdefs.h> | 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 --- 23 unchanged lines hidden (view full) --- 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * from: Utah $Hdr: mem.c 1.13 89/10/08$ 36 * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 37 */ 38 39#include <sys/cdefs.h> |
40__FBSDID("$FreeBSD: head/sys/i386/i386/mem.c 183397 2008-09-27 08:51:18Z ed $"); | 40__FBSDID("$FreeBSD: head/sys/i386/i386/mem.c 201223 2009-12-29 21:51:28Z rnoland $"); |
41 42/* 43 * Memory special file 44 */ 45 46#include <sys/param.h> 47#include <sys/conf.h> 48#include <sys/fcntl.h> --- 109 unchanged lines hidden (view full) --- 158} 159 160/* 161 * allow user processes to MMAP some memory sections 162 * instead of going through read/write 163 */ 164/* ARGSUSED */ 165int | 41 42/* 43 * Memory special file 44 */ 45 46#include <sys/param.h> 47#include <sys/conf.h> 48#include <sys/fcntl.h> --- 109 unchanged lines hidden (view full) --- 158} 159 160/* 161 * allow user processes to MMAP some memory sections 162 * instead of going through read/write 163 */ 164/* ARGSUSED */ 165int |
166memmmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, 167 int prot __unused) | 166memmmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, 167 int prot __unused, vm_memattr_t *memattr __unused) |
168{ 169 if (dev2unit(dev) == CDEV_MINOR_MEM) 170 *paddr = offset; 171 else if (dev2unit(dev) == CDEV_MINOR_KMEM) 172 *paddr = vtophys(offset); 173 /* else panic! */ 174 return (0); 175} --- 67 unchanged lines hidden --- | 168{ 169 if (dev2unit(dev) == CDEV_MINOR_MEM) 170 *paddr = offset; 171 else if (dev2unit(dev) == CDEV_MINOR_KMEM) 172 *paddr = vtophys(offset); 173 /* else panic! */ 174 return (0); 175} --- 67 unchanged lines hidden --- |