How to map device addresses into user space

Mehmet Erol Sanliturk m.e.sanliturk at gmail.com
Thu Jan 3 19:17:43 UTC 2013


On Thu, Jan 3, 2013 at 8:45 AM, Dr. Rolf Jansen <rj at cyclaero.com> wrote:

> I am building a loadable kernel module for FreeBSD 9.1-RELEASE x86_64 for
> a PCI Data Acquisition board from National Instruments.
>
> I need to map the Base Address Registers into user space memory, in order
> to pass the BAR's to the National Instruments Drivers Development Kit
> (NI-DDK). The DDK is a complex set of C++ classes running in user space,
> that read/write directly from/into the BAR's.
>
> The FreeBSD bus_space_* functions are useless in this respect, because the
> DDK isn't designed that way, I need the BAR addresses mapped into user
> space.
>
> Having the measurement done by the kernel module is not an option either,
> because it is math intensive, and kernel modules are build without SSE and
> with soft float.
>
> I got tiny kernel modules/extensions only providing the mapped addresses
> of the PCI BAR's running together with the Measurement Routines using the
> NI-DDK on Darwin (Mac OS X) and Linux.
>
> So, how can I map device addresses into user space on FreeBSD?
>
>
> Best regards
>
> Rolf
>
>

There is the following book :

-----------------------------




http://www.amazon.com/FreeBSD-Device-Drivers-Guide-Intrepid/dp/1593272049/ref=sr_1_1?s=books&ie=UTF8&qid=1350180756&sr=1-1&keywords=9781593272043
http://nostarch.com/bsddrivers.htm

FreeBSD Device Drivers

Product Details

    Paperback: 352 pages
    Publisher: No Starch Press; Original edition (May 7, 2012)
    Language: English
    ISBN-10: 1593272049
    ISBN-13: 978-1593272043



-----------------------------



I do not how much it can be useful for you , but it may be very helpful in
details .

Thank you very much .

Mehmet Erol Sanliturk


More information about the freebsd-drivers mailing list