From owner-freebsd-drivers@FreeBSD.ORG Thu Jan 3 19:17:43 2013 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5A1C8BF5 for ; Thu, 3 Jan 2013 19:17:43 +0000 (UTC) (envelope-from m.e.sanliturk@gmail.com) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by mx1.freebsd.org (Postfix) with ESMTP id 1CFAAD06 for ; Thu, 3 Jan 2013 19:17:42 +0000 (UTC) Received: by mail-vb0-f44.google.com with SMTP id fc26so15721465vbb.31 for ; Thu, 03 Jan 2013 11:17:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=iy8zTuw12GDYctQcQ3jXQYB1HJ5fTaslpSy5+pkhzeE=; b=aCywVrZLfHTKBMr5MZdmc75JISqHE75WJZCxO3f3YjjJiBICqhevHXmTp+BTCzbUb1 jeahLNQKiKCeDDE3OLlJKs3O79qiPhc5RuCPzDkMtf9nI8wHA872PvEHSHo6henqrGmp Rzfcml2ZJJqaqaXr6l14d2lpdqMZQai1gcw/Mrf3SU42CAD3pQajGHhYr4fPUdpJ0AxI HJaW6xF3DEpK28aLcxxd8p+6f1OqA2VG4IesDENBARJ2xKrDWJ62aiCPHfRabgxV8P1a 3stnCMNGLd0aW1mBO2peBZepm5Qctfu4IcopliN0wvk0RblN58H1yqaCl83oxYMKBysZ KQlg== MIME-Version: 1.0 Received: by 10.52.75.100 with SMTP id b4mr64213645vdw.52.1357240662196; Thu, 03 Jan 2013 11:17:42 -0800 (PST) Received: by 10.58.214.226 with HTTP; Thu, 3 Jan 2013 11:17:42 -0800 (PST) In-Reply-To: References: Date: Thu, 3 Jan 2013 11:17:42 -0800 Message-ID: Subject: Re: How to map device addresses into user space From: Mehmet Erol Sanliturk To: "Dr. Rolf Jansen" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-drivers@freebsd.org X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2013 19:17:43 -0000 On Thu, Jan 3, 2013 at 8:45 AM, Dr. Rolf Jansen 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