From owner-freebsd-net@FreeBSD.ORG Tue Jul 31 16:14:42 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A1BBA106564A; Tue, 31 Jul 2012 16:14:42 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6DA368FC17; Tue, 31 Jul 2012 16:14:42 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so12480413pbb.13 for ; Tue, 31 Jul 2012 09:14:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=/5pw8Lr2QvImm+MVNJiYem03xv0j1pn81piwialknNk=; b=w6cRJ3/r4VJ2spDukaTZhgQx9X3y9kosDHpSgl8qGyu8fyTBw9lMrgWg5awAehKwKW r5LvmLpcw4JWKxyvUwVDM/6vg5wE+fwWoq588Jgwq+LT/15Sp7EP7gd6yORzhS8iYmfN 7hknFfV/hzoOHzwBZVxnQN+YQB75eMQ+/G6ldalup8TJIAJaj0TUjxO/Rg0lxgYWc6Mi LiPcM+mGdchwdLcgT9GDebil2hQyEeY9LIFagDcp38h2q+nMXEdPltUFq2M/stBKOd0u nDQ99jpavCQzzkPCqS8l2bvnp33bVSW0BVZAoRHHRXMzGbn0TSjkdp87CgUc4k09R8E9 78Zg== MIME-Version: 1.0 Received: by 10.68.218.7 with SMTP id pc7mr44386356pbc.88.1343751281911; Tue, 31 Jul 2012 09:14:41 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.68.66.136 with HTTP; Tue, 31 Jul 2012 09:14:41 -0700 (PDT) In-Reply-To: References: <201207310951.12251.jhb@freebsd.org> Date: Tue, 31 Jul 2012 09:14:41 -0700 X-Google-Sender-Auth: vwOogdFsc8ljoNR-D26b6WWtRjI Message-ID: From: Adrian Chadd To: Venkat Duvvuru Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-net@freebsd.org, John Baldwin Subject: Re: PCI BAR mmap X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 16:14:42 -0000 On 31 July 2012 08:22, Venkat Duvvuru wrote: > Hi John, > Thanks for your response. > Is there an alternative to mmap the PCI BARs, I mean without implementing > an mmap method in the driver, something like a pci subsystem mmap in Linux. > Linux allows to mmap PCI BARs without any change in the device driver. I guess someone could implement a sysctl API to access PCI BAR registers, rather than mapping /dev/pci or however pciconf -r works. That way you'd implement it once and all devices would have their BAR registers show up in a userland-friendly way. 2c, Adrian