Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Jan 2013 01:00:17 -0200
From:      "Dr. Rolf Jansen" <rj@cyclaero.com>
To:        freebsd-drivers@freebsd.org
Subject:   Re: How to map device addresses into user space
Message-ID:  <A3C44BB7-0849-4E2C-B812-D1EC4AB49926@cyclaero.com>
In-Reply-To: <CAOgwaMv8rzHPyCLV2OJ-2h9T2SiRHdvdCD=Dp%2Bs8guaCmybe1Q@mail.gmail.com>
References:  <DFC983B8-91B2-4ED8-89B0-FC4BD4AB2576@cyclaero.com> <CAOgwaMv8rzHPyCLV2OJ-2h9T2SiRHdvdCD=Dp%2Bs8guaCmybe1Q@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

Am 03.01.2013 um 17:17 schrieb Mehmet Erol Sanliturk:

> On Thu, Jan 3, 2013 at 8:45 AM, Dr. Rolf Jansen <rj@cyclaero.com> wrote:
> 
>> ...
>> 
>> 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.
>> 
>> ...
> 
> There is the following book:
> 
> 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


Mehmet,

Many thanks for your response.

I know this book. It suggests accessing the PCI registers using Newbus (Chapter 7). Newbus hides away direct reading/writing to the BAR's, and therefore, Newbus is useless in the given respect.

Again, I need the exact PCI Base Address Registers directly mapped into user space, so that I can do in my user space measurement controller something like the following:

  user_space_BAR[0 + funcOffset] &= 0x03;

Best regards

Rolf



home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A3C44BB7-0849-4E2C-B812-D1EC4AB49926>