Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Apr 2006 16:43:59 -0700
From:      "David Christensen" <dave@randomparity.com>
To:        <freebsd-drivers@freebsd.org>
Subject:   How Do I Allocate Less Than the Entire BAR for a PCI Device?
Message-ID:  <22C21BFBEB52B340A1F422CB0D88F5872E17@snoopy.randomparity.com>

next in thread | raw e-mail | index | archive | help
The Ethernet driver I'm working on has a very large PCI BAR mapping=20
for memory (32MB), but I only need 128KB of that BAR memory for use
by the driver.  How can I map only the amount of memory I need with
bus_alloc_resource()?  It looks like I can specify the size if I
also know the BAR starting address, but I'm not sure how to find that.
Has anyone done this or know of any existing code that does this?  All
of the examples I looked at used all of BAR mapped memory.

David Christensen




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?22C21BFBEB52B340A1F422CB0D88F5872E17>