agp.c (111815) | agp.c (112569) |
---|---|
1/*- 2 * Copyright (c) 2000 Doug Rabson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2000 Doug Rabson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/dev/agp/agp.c 111815 2003-03-03 12:15:54Z phk $ | 26 * $FreeBSD: head/sys/dev/agp/agp.c 112569 2003-03-25 00:07:06Z jake $ |
27 */ 28 29#include "opt_bus.h" 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/malloc.h> 34#include <sys/kernel.h> --- 676 unchanged lines hidden (view full) --- 711 return agp_unbind_user(dev, (agp_unbind *)data); 712 713 } 714 715 return EINVAL; 716} 717 718static int | 27 */ 28 29#include "opt_bus.h" 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/malloc.h> 34#include <sys/kernel.h> --- 676 unchanged lines hidden (view full) --- 711 return agp_unbind_user(dev, (agp_unbind *)data); 712 713 } 714 715 return EINVAL; 716} 717 718static int |
719agp_mmap(dev_t kdev, vm_offset_t offset, vm_offset_t *paddr, int prot) | 719agp_mmap(dev_t kdev, vm_offset_t offset, vm_paddr_t *paddr, int prot) |
720{ 721 device_t dev = KDEV2DEV(kdev); 722 struct agp_softc *sc = device_get_softc(dev); 723 724 if (offset > AGP_GET_APERTURE(dev)) 725 return -1; 726 *paddr = rman_get_start(sc->as_aperture) + offset; 727 return 0; --- 84 unchanged lines hidden --- | 720{ 721 device_t dev = KDEV2DEV(kdev); 722 struct agp_softc *sc = device_get_softc(dev); 723 724 if (offset > AGP_GET_APERTURE(dev)) 725 return -1; 726 *paddr = rman_get_start(sc->as_aperture) + offset; 727 return 0; --- 84 unchanged lines hidden --- |