View Single Post
  #9  
Old February 2nd 06, 02:32 AM posted to alt.os.development,comp.unix.internals,comp.unix.programmer,alt.comp.hardware
external usenet poster
 
Posts: n/a
Default memory mapped IO: device registers mapped to virtual memory or physical memory?

"Eli Gottlieb" wrote in message
...
Alexei A. Frounze wrote:
"Eli Gottlieb" wrote in message
...

Olumide wrote:

Hi -

I know memory mapped IO is about mapping device/controller registers to
memory space in order to reduce the number of processor instructions
(and simplify device driver writing) . My question is: are device
registers mapped to virtual memory or physical memory? I suspect the
former, and I have looked up a number of texts but everyone just seems
to skirt about the issue.

Thanks,

- Olumide


Device registers have a "physical" address that can be mapped into
virtual memory using normal paging techniques, AFAIK.



Correct for real, physical devices in non-virtualized environments. If we
go for virtual ones, we may never know what is real and what is emulated
in some way (e.g. a page fault handler would do the emulation).

Alex


Is virtualization so common now that we actually bother to think about it?


It starts gaining some real importance in the business solutions (putting a
few servers that would otherwise run on different machines to one; untying
from particular hardware and making it possible to move the server to
another machine in a matter of minutes (well, maybe a few hours), to
replicate it, to back it up, to do all kinds of things that would otherwise
be hard to do with something real). And then there are applications for
which running in a virtualized environment is more secure (think of the
internet browser with all its bugs and vulnerables).

Theoretically, the same software should run on both.


Right.

If it doesn't, then I see no point in the virtualization, as it would just
be the creation of an arbitrary hardware platform that doesn't have any
real hardware.


You may underestimate it. While it doesn't make sense now, it may make a lot
of sence some time later. But as I told you, untying the software from the
particular devices makes it more portable.

Alex