how to get the physival address

Dan Malek dan at mvista.com
Thu Apr 5 15:58:33 EST 2001


jerry wrote:


> I try to print out:  buffer_array = 0xC4056220

To get an address like this, you must be loading the
driver as a module.  There are a variety of opinions about
how to do this, like using kmalloc() to dynamically allocate
the space after the module is loaded.  In the linuxppc_2_5
kernel from FSM Labs are some VM modifications I have started.
The virt_to_phys() is appropriate to use on the MPC8xx for this
sort of thing, and you can even do consistent_alloc() if you want
cache inhibited pages.  In older kernels, there are no functions
that will provide this for you (well, you can trudge through the
page tables, get the PTE and convert it yourself, but that sucks :-).


	-- Dan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/






More information about the Linuxppc-embedded mailing list