isa_dma.c (92765) | isa_dma.c (95710) |
---|---|
1/*- 2 * Copyright (c) 1991 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * William Jolitz. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 | 1/*- 2 * Copyright (c) 1991 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * William Jolitz. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 |
37 * $FreeBSD: head/sys/i386/isa/isa_dma.c 92765 2002-03-20 07:51:46Z alfred $ | 37 * $FreeBSD: head/sys/i386/isa/isa_dma.c 95710 2002-04-29 07:43:16Z peter $ |
38 */ 39 40/* 41 * code to manage AT bus 42 * 43 * 92/08/18 Frank P. MacLachlan (fpm@crash.cts.com): 44 * Fixed uninitialized variable problem and added code to deal 45 * with DMA page boundaries in isa_dmarangecheck(). Fixed word --- 206 unchanged lines hidden (view full) --- 252 253 /* copy bounce buffer on write */ 254 if (!(flags & ISADMA_READ)) 255 bcopy(addr, newaddr, nbytes); 256 addr = newaddr; 257 } 258 259 /* translate to physical */ | 38 */ 39 40/* 41 * code to manage AT bus 42 * 43 * 92/08/18 Frank P. MacLachlan (fpm@crash.cts.com): 44 * Fixed uninitialized variable problem and added code to deal 45 * with DMA page boundaries in isa_dmarangecheck(). Fixed word --- 206 unchanged lines hidden (view full) --- 252 253 /* copy bounce buffer on write */ 254 if (!(flags & ISADMA_READ)) 255 bcopy(addr, newaddr, nbytes); 256 addr = newaddr; 257 } 258 259 /* translate to physical */ |
260 phys = pmap_extract(pmap_kernel(), (vm_offset_t)addr); | 260 phys = pmap_extract(kernel_pmap, (vm_offset_t)addr); |
261 262 if (flags & ISADMA_RAW) { 263 dma_auto_mode |= (1 << chan); 264 } else { 265 dma_auto_mode &= ~(1 << chan); 266 } 267 268 if ((chan & 4) == 0) { --- 106 unchanged lines hidden (view full) --- 375{ 376 vm_offset_t phys, priorpage = 0, endva; 377 u_int dma_pgmsk = (chan & 4) ? ~(128*1024-1) : ~(64*1024-1); 378 379 GIANT_REQUIRED; 380 381 endva = (vm_offset_t)round_page((vm_offset_t)va + length); 382 for (; va < (caddr_t) endva ; va += PAGE_SIZE) { | 261 262 if (flags & ISADMA_RAW) { 263 dma_auto_mode |= (1 << chan); 264 } else { 265 dma_auto_mode &= ~(1 << chan); 266 } 267 268 if ((chan & 4) == 0) { --- 106 unchanged lines hidden (view full) --- 375{ 376 vm_offset_t phys, priorpage = 0, endva; 377 u_int dma_pgmsk = (chan & 4) ? ~(128*1024-1) : ~(64*1024-1); 378 379 GIANT_REQUIRED; 380 381 endva = (vm_offset_t)round_page((vm_offset_t)va + length); 382 for (; va < (caddr_t) endva ; va += PAGE_SIZE) { |
383 phys = trunc_page(pmap_extract(pmap_kernel(), (vm_offset_t)va)); | 383 phys = trunc_page(pmap_extract(kernel_pmap, (vm_offset_t)va)); |
384#define ISARAM_END RAM_END 385 if (phys == 0) 386 panic("isa_dmacheck: no physical page present"); 387 if (phys >= ISARAM_END) 388 return (1); 389 if (priorpage) { 390 if (priorpage + PAGE_SIZE != phys) 391 return (1); --- 161 unchanged lines hidden --- | 384#define ISARAM_END RAM_END 385 if (phys == 0) 386 panic("isa_dmacheck: no physical page present"); 387 if (phys >= ISARAM_END) 388 return (1); 389 if (priorpage) { 390 if (priorpage + PAGE_SIZE != phys) 391 return (1); --- 161 unchanged lines hidden --- |