using the dma

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
yemista
Member
Member
Posts: 299
Joined: Fri Dec 26, 2008 12:31 pm
Location: Boston
Contact:

using the dma

Post by yemista »

I understand that dma expects contiguous memory from the first 16mb, but does it matter where those are? For example, If I have my kernel control 0-2mb, can I set aside the next 4mb for dma, and just setup all dma transfers to take place in that region or does dma need the whole 16mb to be free?
User avatar
XanClic
Member
Member
Posts: 138
Joined: Wed Feb 13, 2008 9:38 am

Re: using the dma

Post by XanClic »

No, you just need a part of it. But the begin of the DMA buffer has to be aligned on 64kB boundaries, as far as I know.
User avatar
xenos
Member
Member
Posts: 1121
Joined: Thu Aug 11, 2005 11:00 pm
Libera.chat IRC: xenos1984
Location: Tartu, Estonia
Contact:

Re: using the dma

Post by xenos »

IIRC, the begin of the DMA buffer does not have to be on a 64 kB boundary. But, nevertheless, the DMA transfer must not cross a 64 kB boundary. I.e. a transfer of, say, 0x4000 bytes to adress 0x68000 is perfectly fine, while a transfer of 0x4000 bytes to 0x6d000 will fail since it crosses tha boundary at 0x70000.
Programmers' Hardware Database // GitHub user: xenos1984; OS project: NOS
User avatar
XanClic
Member
Member
Posts: 138
Joined: Wed Feb 13, 2008 9:38 am

Re: using the dma

Post by XanClic »

OK, then that's right.
Post Reply