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?
Technical difference between "port mapped" and "memory map"?
- LieutenantHacker
- Member
- Posts: 69
- Joined: Sat May 04, 2013 2:24 pm
- Location: Canada
Technical difference between "port mapped" and "memory map"?
The desire to hack, with the ethics to code.
I'm gonna build an 8-bit computer soon, with this as reference: http://www.instructables.com/id/How-to- ... -Computer/
I'm gonna build an 8-bit computer soon, with this as reference: http://www.instructables.com/id/How-to- ... -Computer/
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Re: Technical difference between "port mapped" and "memory m
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.
The I/O bus is a separate legacy address space on x86, you can only access it via the IN and OUT instruction variants.
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: Technical difference between "port mapped" and "memory m
One difference in the case of x86 is that MMIO operations are asynchronous, whereas operations on the I/O address space are synchronous.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
- Combuster
- 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: Technical difference between "port mapped" and "memory m
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.Love4Boobies wrote:MMIO operations are asynchronous