From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,a9e9185645243cbe,start X-Google-Attributes: gid1164f8,public From: apachexm@usa.net Subject: A Question about Setting CIA DMA window#2 Date: 1998/04/23 Message-ID: <6hov7v$kvg$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 347153337 X-Http-User-Agent: Mozilla/3.0Gold (X11; I; OSF1 V4.0 alpha) Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Fri Apr 24 03:00:11 1998 GMT Newsgroups: comp.sys.dec I am working on an Alpha workstation. It is assembled by ourselves based on the AlphaPC164 motherboard(21172 core logic). I am programming a device driver for a PCI card. But the DMA address reigster of this card has only 26bits, so the PCI address range it put on the PCI AD bus is between 0-64M. As I know, when a PCI device want to DMA to physical memory, it must go through the CIA DMA window. I read in a test driver to find that the Digital UNIX 4.0 has programmed the CIA DMA window#0 to (W0_BASE:800003, PCI starting address:8M, Scatter/Gather Mapped, Enable; W0_MASK:700000, size 8M; T0BASE: xxx000, TLB entry), and the CIA DMA window#1 to (W1_BASE: 40000001, PCI starting address: 1GB, Direct Mapped, Enable; W1_MASK: 3ff00000, size 1GB; T1BASE: 0, physical memory starting address: 0). CIA DMA window#2 is disabled. So, It seems that I must open another CIA DMA window for our PCI card. I opened the CIA DMA window#2 in the driver's cattach() interface, below is the procedure: 1. Use PHYS_TO_KSEG() kernel interface to get the kseg address of the three registers of CIA DMA window#2; 2. assign 32bit integers to these registers to 2000001, 700000, xxxxxxxx. (32M PCI starting address, size 8M, some physical memory base address<33:10>); When I want the driver to perform DMA, I assign the DMA register of my PCI card the value between 0x2000000 and 0x2800000. I think it will work, but I am still debugging it. Is it feasible that driver coder open the unused CIA DMA window? Is it safe? Are there any other method for my PCI card performing DMA? Any suggestion welcomed! -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading