RE: Reading a PCI device memory mapped region

"Jan Stoess" <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.l4ka.general
Message-ID <[email protected]>
Cesar,

> 
> Does someone have a suggestion on where I can find information or
sample
> code to map a memory region of a PCI device and read it from a
Pistachio
> user program?

For memory mapped I/O, this shouldn't be different from mapping real
memory; for instance, a root pager could request the given physical
pages from sigma0 using the RPC protocol and then pass them to
subordinate driver programs via map IPC. You can find example code in
the pre-virtualization code base, more specifically in the paging
subsystem of the resourcemonitor module; have a look at
Hypervisor_{request,unmap}_device_implementation() in pager.cc.

http://l4ka.org/projects/virtualization/resourcemon/download.php

I know this isn't the most easy-to-read example, but I'm not aware of a
toy OS running on Pistachio capable of mapping PCI device memory (which
doesn't mean that there isn't one). 


Regards,
-Jan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.