How to allocate memory and get the physical address in kernel

Arun KS getarunks at gmail.com
Thu Feb 6 04:49:42 EST 2014


Hi Silverstri,


On Thu, Feb 6, 2014 at 7:56 AM, 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.
>
If your device is not having an iommu, you need to convert the address
returned by kmalloc using __pa(addr) before you program the chip.

Thanks,
Arun

>
> Is there a better way to achieve what I want?
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140206/be5e6115/attachment.html 


More information about the Kernelnewbies mailing list