summaryrefslogtreecommitdiff
path: root/CommunicationSchemes.mdwn
blob: 60635c4f782630be12f42c64bc8929874fdd617d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18


# Communication schemes

[[!inline pages="PIO" quick="yes" raw="yes"]] 

[[!inline pages="MMIO" quick="yes" raw="yes"]] 

[[!inline pages="DMA" quick="yes" raw="yes"]] 


## Summary

All of these communication schemes was originally used with disk I/O before graphics entered the picture, so you may wish to view them in that light. It makes it more obvious how they fit together in terms of efficiency. In PIO, you had to write a loop to write a chunk of data to one address in I/O space with outb or outw.   

With MMIO, you could use a simple _memcpy_ call and take advantage of all of the optimizations inherent in that.   

With DMA, you wrote a few bytes to an I/O address to tell an external chip to "go to town" on data you had already composed. Meanwhile, you could work on getting the next chunk ready. Most simultaneous work getting done in the latter case.