Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Memory mapped I/O vs Port mapped I/O [closed]

Memory mapped I/O is a technique which allows the use of central memory (RAM) to communicate with peripherals. Port mapped I/O uses ports (with special assembly instructions) to communicate over digital ports.

What are the advantages of one method with respect to another?

like image 967
Johnny Pauling Avatar asked Mar 12 '13 20:03

Johnny Pauling


1 Answers

As Cthulhu said,

  • memory mapped I/O allows writing/reading to I/O device ports the same as reading/writing to normal memory (using the same machine code/asm)

but there is a disadvantage:

  • you use up physical memory address space for your memory mapped I/O devices (think of 32 bit Windows not being able to access all 4G of RAM on a PC)

So an advantage of using the port mapped I/O method is that you have a separate address space for your I/O devices and you can use the whole memory addressing range to access memory.

EDIT: Here is a more complete answer to your question: hardware ports to memory addresses

like image 92
Sil Avatar answered Sep 27 '22 15:09

Sil