Hi Charles,

I am delighted to see this great progress, and I am very eager to see the first 
PCI card to work with usermode threads - once one of them works, it should be 
mechanical work to get the rest to work!  In particular I'm itching for the 
Mesanet drivers because I'm curious if an attempt at servo jitter compensation 
recently discussed has any tangible results, and the test rig would be so much 
easier to do with userthreads; go ahead and push intermediate results, you're 
not breaking anything working yet anyway;)

I hope you dont mind I cc: the developers so folks are aware whats going on and 
to prevent duplicate discoveries; plus there are a few out there which worked 
on related code and might have advice.

cheers,

- Michael

Am 21.11.2012 um 05:53 schrieb Charles Steinkuehler:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 11/17/2012 9:55 AM, Charles Steinkuehler wrote:
>> On 11/17/2012 8:25 AM, Michael Haberler wrote:
>>> does the uio_pci_generic module load and work?
>> 
>> I have not yet gotten actual I/O working from a user process, but
>> I'm working on it.
> 
> Some progress on the PCI front.
> 
> I'm not sure if the rtapi_pci code *ever* worked, but I'm making
> gradual progress as time allows.
> 
> Currently, I have managed to mmap PCI resources into user space,
> although I'm still working on getting everything cleaned up and
> working properly.  The problems I ran into so far:
> 
> 1) The hal_vti driver I am basing my code on immediately closed the
> driver after it successfully opened (rtapi_pci_put_device immediately
> following a successful rtapi_pci_get_device), making the subsequent
> ioremap() -> mmap() call to try and actually talk to the hardware
> pretty much pointless.
> 
> 2) The rtapi_pci code seems to be written to the minimal documentation
> found in the Userspace I/O HOWTO:
> 
> http://www.kernel.org/doc/htmldocs/uio-howto.html
> 
> ...HOWEVER, the actual uio_pci_generic driver requires a different
> method of mmap-ing the device registers, using the sysfs-pci resourceN
> files and *NOT* the /dev/uidN deice node.  Some documentation and
> example working code can be found here:
> 
> http://www.kernel.org/doc/Documentation/filesystems/sysfs-pci.txt
> 
> http://billfarrow.blogspot.com/2010/09/userspace-access-to-pci-memory.html
> 
> I have verified I get expected results from reads using the pcimem
> utility (at the billfarrow link).  I am currently attributing the
> garbage I'm getting when using the rtapi_pci code to my ineptness with
> C pointer manipulation (which always makes my head hurt), but with
> working example code I should be able to get something working.
> 
> I haven't pushed any changes as the structures and startup/shutdown
> code in rtapi_pci all need to be extended to handle tracking an
> additional open file descriptor for each PCI resource mapped into user
> space, and not just the mmio pointer.  I'll push code when I get
> something working and not too ugly, but I wanted to let you know what
> I've found before heading off for the Thanksgiving holiday.

later you wrote:

>> Sure enough, re-coding the pointer math and adding some parens, and
>> suddenly I'm getting the expected values from my hal driver via
>> rtapi_pci!  :)
> 
> - -- 
> Charles Steinkuehler
> char...@steinkuehler.net
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAlCsXjAACgkQLywbqEHdNFwD7ACg2tN9CI1QeIcE6DYsxxKa3Oyg
> +c4AoJOFSU5C9zCeTVXHre2o3VXM7fzC
> =xB5C
> -----END PGP SIGNATURE-----


------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to