Hello
I have startede to make a dma driver.
but i got one 1 question:
how to map the device to a dma chanel, do i have a "list" to go forward, or how do i do that ?
( by saying "list" i mean the defaults, an exempel : soundblaster is normaly located at chanel 1, floppy 2. )
KMT dk
DMA ...
DMA ...
well, what to say, to much to do in too little space.
when it goes up hill, increase work, when it goes straight, test yourself but when going down, slow down.
when it goes up hill, increase work, when it goes straight, test yourself but when going down, slow down.
Re: DMA ...
Hi,
I was going to write a lot of stuff about resource detection (using ACPI, PCI, ISA Plug & Play, manual probing, configuration files, etc to determine I/O ports, IRQs, memory mapped I/O areas in the physical address space, DMA channels), but then I thought about it and started wondering why you care if all you're doing is writing a driver for the ISA DMA controller...
Basically there's only 2 ways of doing it:
Cheers,
Brendan
How do you solve the same problem for I/O ports and IRQs?kmtdk wrote:how to map the device to a dma chanel, do i have a "list" to go forward, or how do i do that ?
( by saying "list" i mean the defaults, an exempel : soundblaster is normaly located at chanel 1, floppy 2. )
I was going to write a lot of stuff about resource detection (using ACPI, PCI, ISA Plug & Play, manual probing, configuration files, etc to determine I/O ports, IRQs, memory mapped I/O areas in the physical address space, DMA channels), but then I thought about it and started wondering why you care if all you're doing is writing a driver for the ISA DMA controller...
Basically there's only 2 ways of doing it:
- a) the kernel trusts the drivers and the drivers figure out what they need access to. In this case any driver can ask for access to any DMA channel (as long as the DMA channel isn't already in use by something else).
b) the kernel doesn't trust the drivers. In this case the kernel (or something acting on behalf of the kernel that the kernel does trust) needs to find out which DMA channels a driver is allowed to access; and the DMA driver just asks the kernel if someone is allowed to access the DMA channel or not.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: DMA ...
...now if the IOMMU was standard issue...
Re: DMA ...
In the very olden days, some boards had to be specifically jumpered for a particular DMA channel -- but even then, it only took 2 jumpers to select any 8 bit, or alternatively any 16 bit DMA channel (depending on the card type).