tdfx_pci.c (61931) | tdfx_pci.c (61967) |
---|---|
1/* 2 * Copyright (c) 2000 by Coleman Kane <cokane@FreeBSD.org> 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 --- 14 unchanged lines hidden (view full) --- 23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * | 1/* 2 * Copyright (c) 2000 by Coleman Kane <cokane@FreeBSD.org> 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 --- 14 unchanged lines hidden (view full) --- 23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * |
31 * $FreeBSD: head/sys/dev/tdfx/tdfx_pci.c 61931 2000-06-22 05:37:17Z cokane $ | 31 * $FreeBSD: head/sys/dev/tdfx/tdfx_pci.c 61967 2000-06-22 19:10:35Z cokane $ |
32 */ 33 34/* 3dfx driver for FreeBSD 4.x - Finished 11 May 2000, 12:25AM ET 35 * 36 * Copyright (C) 2000, by Coleman Kane <cokane@FreeBSD.org>, 37 * based upon the 3dfx driver written for linux, by Daryll Straus, Jon Taylor, 38 * and Jens Axboe, located at http://linux.3dfx.com. 39 */ --- 157 unchanged lines hidden (view full) --- 197 */ 198 tdfx_info->addr0 = (pci_read_config(dev, 0x10, 4) & 0xffff0000); 199#ifdef DEBUG 200 device_printf(dev, "Base0 @ 0x%x\n", tdfx_info->addr0); 201#endif 202 203 /* Notify the VM that we will be mapping some memory later */ 204 tdfx_info->memrange = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, 0, ~0, 1, | 32 */ 33 34/* 3dfx driver for FreeBSD 4.x - Finished 11 May 2000, 12:25AM ET 35 * 36 * Copyright (C) 2000, by Coleman Kane <cokane@FreeBSD.org>, 37 * based upon the 3dfx driver written for linux, by Daryll Straus, Jon Taylor, 38 * and Jens Axboe, located at http://linux.3dfx.com. 39 */ --- 157 unchanged lines hidden (view full) --- 197 */ 198 tdfx_info->addr0 = (pci_read_config(dev, 0x10, 4) & 0xffff0000); 199#ifdef DEBUG 200 device_printf(dev, "Base0 @ 0x%x\n", tdfx_info->addr0); 201#endif 202 203 /* Notify the VM that we will be mapping some memory later */ 204 tdfx_info->memrange = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, 0, ~0, 1, |
205 RF_ACTIVE); | 205 RF_ACTIVE | RF_SHAREABLE); |
206 if(tdfx_info->memrange == NULL) { 207#ifdef DEBUG 208 device_printf(dev, "Error mapping mem, won't be able to use mmap()\n"); 209#endif 210 tdfx_info->memrid = 0; 211 } 212 else { 213 tdfx_info->memrid = rid; --- 556 unchanged lines hidden --- | 206 if(tdfx_info->memrange == NULL) { 207#ifdef DEBUG 208 device_printf(dev, "Error mapping mem, won't be able to use mmap()\n"); 209#endif 210 tdfx_info->memrid = 0; 211 } 212 else { 213 tdfx_info->memrid = rid; --- 556 unchanged lines hidden --- |