OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Mar 29, 2024 2:04 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: memory mapped i/o
PostPosted: Sat Feb 22, 2014 11:03 pm 
Offline
Member
Member
User avatar

Joined: Wed Feb 19, 2014 11:10 am
Posts: 40
As I know no device sends data to CPU. They write data to a known location and will signal the CPU somehow (or not) to read from that location. This location is accessed by CPU via I/O bus or Memory bus depending on the device and configuration.

I think these links would be very helpful:
http://en.wikipedia.org/wiki/Memory-mapped_I/O
http://www.cs.umd.edu/class/spring2003/cmsc311/Notes/IO/mapped.html

_________________
Check out my FSB Data Integrity Tester at http://fsbdit.sourceforge.net/.

Siavosh


Top
 Profile  
 
 Post subject: Re: memory mapped i/o
PostPosted: Sun Feb 23, 2014 11:41 am 
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
Quote:
As I know no device sends data to CPU.
You missed the obvious ones: the interrupt controllers.

_________________
"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  
 
 Post subject: Re: memory mapped i/o
PostPosted: Mon Feb 24, 2014 9:40 am 
Offline
Member
Member
User avatar

Joined: Wed Feb 19, 2014 11:10 am
Posts: 40
Combuster wrote:
Quote:
As I know no device sends data to CPU.
You missed the obvious ones: the interrupt controllers.

Doesn't it just signal the processor? Or maybe you could say because it includes a number it is counted as data?

_________________
Check out my FSB Data Integrity Tester at http://fsbdit.sourceforge.net/.

Siavosh


Top
 Profile  
 
 Post subject: Re: memory mapped i/o
PostPosted: Fri May 02, 2014 4:43 pm 
Offline
Member
Member

Joined: Mon Feb 17, 2014 3:54 pm
Posts: 60
Quote:
ii) address decode logic maps the address to a chip select which tells a bus device that the CPU is talking to it


I think I understand that but what sends instructions do the address decoder?


Top
 Profile  
 
 Post subject: Re: memory mapped i/o
PostPosted: Sat May 03, 2014 3:28 am 
Offline
Member
Member

Joined: Tue Nov 08, 2011 11:35 am
Posts: 453
icealys wrote:
Quote:
ii) address decode logic maps the address to a chip select which tells a bus device that the CPU is talking to it
I think I understand that but what sends instructions do the address decoder?
There are no instructions there, just bits of address. You can read about demultiplexer ICs (for example, 74LS138), they receive part of the address as an input and on the output only one pin is active, those with the number equal to digits on the input (i.e. if inputs equal to 000 (binary), then output0 pin will be active, if 001 - then output1 and so on).
Look, here's the second link found by google, it has some nice pictures: http://www.ece.unm.edu/~jimp/310/slides ... mory2.html


Top
 Profile  
 
 Post subject: Re: memory mapped i/o
PostPosted: Sat May 03, 2014 8:33 am 
Offline
Member
Member
User avatar

Joined: Sun Sep 19, 2010 10:05 pm
Posts: 1074
Of course, none of the physical details matter to the OS. From the software's point of view, there are really only two ways to communicate with anything outside of the CPU: memory (MOV instruction) and I/O (IN/OUT instructions).

When the CPU executes one of these instructions, it reads or writes to its memory or I/O port, and the motherboard routes the connection to the appropriate device (memory, keyboard, controllers, PCI bus, etc.)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 39 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