The 16 MB DMA limitation

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
Isaac
Member
Member
Posts: 66
Joined: Sat Dec 07, 2013 7:08 pm

The 16 MB DMA limitation

Post by Isaac »

How do modern Operating Systems get around the 16MB DMA limitation?
User avatar
Combuster
Member
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: The 16 MB DMA limitation

Post by Combuster »

On the most recent systems: They don't use it. :wink:

On the somewhat less recent systems: They withhold RAM in the first 16MB until explicitly requested by a driver, or when RAM runs out and the driver should have already claimed what it needs.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Isaac
Member
Member
Posts: 66
Joined: Sat Dec 07, 2013 7:08 pm

Re: The 16 MB DMA limitation

Post by Isaac »

So on what do they use instead?
User avatar
Combuster
Member
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: The 16 MB DMA limitation

Post by Combuster »

DMA. :wink:

The 16MB limit is imposed by ISA devices, and ISA DMA you may actually encounter are the floppy drive and SoundBlasters.

The rest uses busmastering for DMA, which has no 16MB limit (though possibly a 32-bit one).
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Isaac
Member
Member
Posts: 66
Joined: Sat Dec 07, 2013 7:08 pm

Re: The 16 MB DMA limitation

Post by Isaac »

Is this other type of DMA controlled by the same DMA controllers? If it is, how can it be 32 bit?
User avatar
Marionumber1
Member
Member
Posts: 56
Joined: Sun May 08, 2011 9:03 am

Re: The 16 MB DMA limitation

Post by Marionumber1 »

Newer devices, including PCI ones, use bus-mastering DMA. It allows one device to temporarily take over the PCI bus and directly access system memory. Bus-mastering DMA supports 32-bit addresses, and I believe newer PCI controllers also support 64-bit addressing.
Programmer and security enthusiast
DarkSide OS Kernel

Those who do not understand Windows NT are doomed to criticize it, poorly.
Post Reply