Deleted Added
full compact
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/amd64/amd64/mem.c 183397 2008-09-27 08:51:18Z ed $");
40__FBSDID("$FreeBSD: head/sys/amd64/amd64/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>

--- 90 unchanged lines hidden (view full) ---

139}
140
141/*
142 * allow user processes to MMAP some memory sections
143 * instead of going through read/write
144 */
145/* ARGSUSED */
146int
41
42/*
43 * Memory special file
44 */
45
46#include <sys/param.h>
47#include <sys/conf.h>
48#include <sys/fcntl.h>

--- 90 unchanged lines hidden (view full) ---

139}
140
141/*
142 * allow user processes to MMAP some memory sections
143 * instead of going through read/write
144 */
145/* ARGSUSED */
146int
147memmmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr,
148 int prot __unused)
147memmmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr,
148 int prot __unused, vm_memattr_t *memattr __unused)
149{
150 if (dev2unit(dev) == CDEV_MINOR_MEM)
151 *paddr = offset;
152 else if (dev2unit(dev) == CDEV_MINOR_KMEM)
153 *paddr = vtophys(offset);
154 /* else panic! */
155 return (0);
156}

--- 67 unchanged lines hidden ---
149{
150 if (dev2unit(dev) == CDEV_MINOR_MEM)
151 *paddr = offset;
152 else if (dev2unit(dev) == CDEV_MINOR_KMEM)
153 *paddr = vtophys(offset);
154 /* else panic! */
155 return (0);
156}

--- 67 unchanged lines hidden ---