views:

56

answers:

2

Pls explain the difference between memory mapped IO and IO mapped IO

+1  A: 

Uhm,... unless I misunderstood, you're talking about two completely different things. I'll give you two very short explanations so you can google up what you need to now.

Memory-mapped I/O means mapping I/O hardware devices' memory into the main memory map. That is, there will be addresses in the computer's memory that won't actually correspond to your RAM, but to internal registers and memory of peripheral devices. This is the machine architecture Pointy was talking about.

There's also mapped I/O, which means taking (say) a file, and having the OS load portions of it in memory for faster access later on. In Unix, this can be accomplished through mmap().

I hope this helped.

Santiago Lezica
+2  A: 

On x86 there are two different address spaces, one for memory, and another one for I/O ports.

The port address space is limited to 65536 ports, and is accessed using the IN/OUT instructions.

As an example, a video card's VGA functionality can be accessed using some I/O ports, but the framebuffer is memory-mapped.

Other CPU architectures only have one address space. In those architectures, all devices are memory-mapped.

ninjalj