Page 1 of 1

Technical difference between "port mapped" and "memory map"?

Posted: Sat Jan 04, 2014 4:48 pm
by LieutenantHacker
I know these are two of the most common ways for I/O in a computer system. What I want to know is what differs this (on the architectural level)?

Like, for example, how is port-mapping something different than memory-mapping on the lowest possible level(is there a different configuration to access it)?

Also, why is there both memory mapping, and port mapping? One is not good enough?

Re: Technical difference between "port mapped" and "memory m

Posted: Sat Jan 04, 2014 10:47 pm
by Brynet-Inc
On most platforms, there is no difference. It's all memory mapped.

The I/O bus is a separate legacy address space on x86, you can only access it via the IN and OUT instruction variants.

Re: Technical difference between "port mapped" and "memory m

Posted: Sun Jan 05, 2014 10:31 am
by Love4Boobies
One difference in the case of x86 is that MMIO operations are asynchronous, whereas operations on the I/O address space are synchronous.

Re: Technical difference between "port mapped" and "memory m

Posted: Sun Jan 05, 2014 12:41 pm
by Combuster
Love4Boobies wrote:MMIO operations are asynchronous
Potentially asynchronous, depending on the whole system of cache controls (paging, MTRR, PAT). You can make it as asynchronous as RAM (Writeback) and as synchronous as port I/O (uncacheable). In practice, you'll find that MMIO to devices is as synchronous as PIO unless you explicitly changed it.