OSDev.org

The Place to Start for Operating System Developers
It is currently Wed Apr 24, 2024 4:40 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Technical difference between "port mapped" and "memory map"?
PostPosted: Sat Jan 04, 2014 4:48 pm 
Offline
Member
Member
User avatar

Joined: Sat May 04, 2013 2:24 pm
Posts: 69
Location: Canada
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?

_________________
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/


Top
 Profile  
 
 Post subject: Re: Technical difference between "port mapped" and "memory m
PostPosted: Sat Jan 04, 2014 10:47 pm 
Offline
Member
Member
User avatar

Joined: Tue Oct 17, 2006 9:29 pm
Posts: 2426
Location: Canada
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.

_________________
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.


Top
 Profile  
 
 Post subject: Re: Technical difference between "port mapped" and "memory m
PostPosted: Sun Jan 05, 2014 10:31 am 
Offline
Member
Member
User avatar

Joined: Fri Mar 07, 2008 5:36 pm
Posts: 2111
Location: Bucharest, Romania
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 ]


Top
 Profile  
 
 Post subject: Re: Technical difference between "port mapped" and "memory m
PostPosted: Sun Jan 05, 2014 12:41 pm 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
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.

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 92 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group