> -----Original Message----- > From: kernelnewbies-bounces@xxxxxxxxxxxxxxxxx [mailto:kernelnewbies- > bounces@xxxxxxxxxxxxxxxxx] On Behalf Of Micha M. > Sent: Tuesday, June 07, 2011 1:47 PM > To: kernelnewbies@xxxxxxxxxxxxxxxxx > Subject: Calling function from address > > Hi! > > > Is it possible to call a function that is somewere in the physical-address > space? So I'd like to jump to a certain physical address, execute the code > there and then return to my kernel module. > I already tried to ioremap that address and cast the new address to a > funtion pointer and then call the function, but there where some page > faults. Just guessing, but I suspect that ioremap() does not enable execute permission in the virtual memory pages it allocates to the physical address and that's why you are getting the page fault. You might have to muck with the PTEs directly to enable execution. > > Regards > > #micha > > -- > /* To err is human; to really fuck things up requires the root password */ > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies@xxxxxxxxxxxxxxxxx > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies