Allocating memory from PCI bus...

M. Warner Losh imp at bsdimp.com
Mon Aug 18 23:18:39 PDT 2003


In message: <200308190347.h7J3l6X7073480 at spoon.beta.com>
            "Brian J. McGovern" <mcgovern at beta.com> writes:
: In 5.x, it appears that you call bus_alloc_resource() with the rid (BAR) of
: the memory resource to actually obtain a resource structure to the memory. 
: Would you then call rman_get_virtual() to obtain the virtual address? How about
: the physical address (use vtophys(rman_get_virtual()) ?

Typically you'd use bus_space to access things via 'memory' mapping,
and bus_dma for physical stuff.

Warner


More information about the freebsd-hackers mailing list