* A Question about Setting CIA DMA window#2
@ 1998-04-23 4:00 apachexm
0 siblings, 0 replies; only message in thread
From: apachexm @ 1998-04-23 4:00 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1998-04-23 4:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-04-23 4:00 A Question about Setting CIA DMA window#2 apachexm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox