LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   How memory mapped IO works? (http://www.linuxquestions.org/questions/linux-hardware-18/how-memory-mapped-io-works-4175458629/)

haribabu1836 04-18-2013 09:22 AM

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.

TB0ne 04-18-2013 12:17 PM

Quote:

Originally Posted by haribabu1836 (Post 4934029)
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


All times are GMT -5. The time now is 10:17 PM.