How to allocate memory and get the physical address in kernel
Pranay Srivastava
pranjas at gmail.com
Thu Feb 6 02:22:31 EST 2014
On 2/6/14, m silverstri <michael.j.silverstri at gmail.com> wrote:
> Hi,
>
> I am developing a kernel driver. I need to allocate buffer in the
> kernel driver and pass the physical address of the buffer to the Chip
> register so that it can generate output there.
>
> I tried using kmalloc() but I don' get any output from the chip.
>
kmalloc should be good enough. Just in what context you
use it matters. If it's interrupt mode then do check for failure
when using GFP_ATOMIC.
> Is there a better way to achieve what I want?
>
Several others are there, but really depends on your need.
If you can, try and paste some pseudo code to let us
understand issue you have. If you are facing some
oops paste the log.
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
---P.K.S
--
Pranay Srivastava
More information about the Kernelnewbies
mailing list