LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 04-18-2013, 08:22 AM   #1
haribabu1836
LQ Newbie
 
Registered: Apr 2010
Posts: 16

Rep: Reputation: 0
How memory mapped IO works?


Hi All, can any one clear my doubt on memory mapped IO.

My understanding on communication from CPU to IO devices is below.
CPU <-----> Device controller(pci/usb) <-----> IO device(pci/usb).
If i have an Ethernet device connected through pcie, i know the base address let say 0xd0000000 and register offset in device is 0x4 then the value to read from that location will be
data = *(0xd0000004) (memory mapped).

my question is how CPU knows this address belongs to ethernet device address?
Will CPU/MMU decode this memory mapped address and initiate pcie read transation from controller to IO device?
Because ethernet can respond only for pci cycles.

Just want know how memory mapped IO works.

Thank you.
 
Old 04-18-2013, 11:17 AM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,410

Rep: Reputation: 2531Reputation: 2531Reputation: 2531Reputation: 2531Reputation: 2531Reputation: 2531Reputation: 2531Reputation: 2531Reputation: 2531Reputation: 2531Reputation: 2531
Quote:
Originally Posted by haribabu1836 View Post
Hi All, can any one clear my doubt on memory mapped IO.

My understanding on communication from CPU to IO devices is below.
CPU <-----> Device controller(pci/usb) <-----> IO device(pci/usb).
If i have an Ethernet device connected through pcie, i know the base address let say 0xd0000000 and register offset in device is 0x4 then the value to read from that location will be
data = *(0xd0000004) (memory mapped).

my question is how CPU knows this address belongs to ethernet device address?
Will CPU/MMU decode this memory mapped address and initiate pcie read transation from controller to IO device?
Because ethernet can respond only for pci cycles.

Just want know how memory mapped IO works.

Thank you.
The VERY FIRST HIT in Google:
http://en.wikipedia.org/wiki/Memory-mapped_I/O
 
  


Reply

Tags
hardware, linux, memory management, pci controller


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory mapped devices skorek Linux - Embedded & Single-board computer 3 10-24-2011 02:27 PM
memory mapped i/o and i/o mapped i/o shilpa rangappa General 1 12-14-2009 10:27 PM
Network device Memory mapped or Port mapped ?? Bignon Linux - Hardware 0 10-20-2009 08:36 AM
Memory mapped device access in Linux tsik Linux - Software 1 10-31-2006 09:26 PM
Memory Mapped file IO problems legogt Programming 0 08-01-2003 01:52 PM


All times are GMT -5. The time now is 07:21 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration