Page 1 of 1
DMA & paging
Posted: Sun May 23, 2004 11:00 pm
by pepito
Hello:
It is posible to use DMA with memory paging at the same time?
pepito
RE:DMA & paging
Posted: Sun May 23, 2004 11:00 pm
by TheUbu
peptio,
Of course if you are in paging more it will write to the virtual page address....
-Christopher
RE:DMA & paging
Posted: Sun May 23, 2004 11:00 pm
by rexlunae
"Of course if you are in paging more it will write to the virtual page address...."
Ummm...No it won't. DMA is not built into the processor, so any of the translations done by the processor are invisible to it. DMA works with physical addresses only. In order to use DMA in a pages system (or a segmented system for that matter) you have to figure out the physical addresses of any memory you wish to use with it.
RE:DMA & paging
Posted: Sun May 23, 2004 11:00 pm
by TheUbu
rexlunae,
That is not true you can use 32bit DMA with PAGING enabled to use a VM space.
-Christopher
RE:DMA & paging
Posted: Mon May 24, 2004 11:00 pm
by rexlunae
Ubu-
I'm not sure we really disagree here. All I am saying is that to the DMA controller, paging does not exist. You can, of course, still use paging with it, but the pages you are trying to use must be within the PHYSICAL range that the DMA can access, and all commands to the DMA controller use physical addresses.
RE:DMA & paging
Posted: Mon May 24, 2004 11:00 pm
by pepito
Oh, oh...
Someone have an example or a link where I could read about it?
But thank you.
pepito
RE:DMA & paging
Posted: Mon May 24, 2004 11:00 pm
by CodeSlasher
Once Paging is Enabled, To perform DMA operations you have to make sure the address you pass to the DMA chip is Linearly Mapped (1:1 mapping) to addresses below 16MB. i.e you use pages that map an address below 16mb to a physical address that is also below 16mb and better if they are the same i.e 0xc000 linear = 0xc000 physical.
RE:DMA & paging
Posted: Mon May 24, 2004 11:00 pm
by rexlunae
This place has some documentation. I don't know how good it is.
http://www.nondot.org/sabre/os/articles ... usDevices/