Date: Tue, 16 May 2006 20:48:12 -0600 From: Scott Long <scottl@samsco.org> To: hongz@promisechina.com Cc: freebsd-hackers@freebsd.org Subject: Re: help:How to map a physical address into a kernel address? Message-ID: <446A8EEC.1090508@samsco.org> In-Reply-To: <1147340690$36076$55833599@hongz@promisechina.com> References: <1147340690$36076$55833599@hongz@promisechina.com>
next in thread | previous in thread | raw e-mail | index | archive | help
hongz@promisechina.com wrote: > Hi guys: > > > > To access sg_table in kernel address, I need to map the starting physical > address of a segment into a kernel address. As I know that, we can use > phystovirt()/bustovirt(), or kmap()/kmap_atomic() to map a bus/physical > address or a physical page into a kernel address in Linux, but I did not > find such a function in FreeBSD. Please help me on this, it is very urgent! > > > > Thanks a lot! > What kind of memory are you trying to access? Are you trying to access memory on the card that is pointed to by PCI base address registers? If so then you need to use the bus_space API. Or are you trying to allocate memory in the kernel and then give the physical address of that memory to your card? If so then you need to use bus_dma. Both Warner and I are happy to help guide you with these APIs. Scott
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?446A8EEC.1090508>