From: kernelnewbies@mail.i88.de (Micha M.)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Calling function from address
Date: Wed, 8 Jun 2011 12:50:57 +0200 [thread overview]
Message-ID: <20110608105057.GA12967@mailer.i88.de> (raw)
In-Reply-To: <BANLkTi=dvuz5iA8PfuoULh_P0kiEk7cFsQ@mail.gmail.com>
On Wed, Jun 08, 2011 at 04:52:14PM +0700, Mulyadi Santosa wrote:
> On Wed, Jun 8, 2011 at 03:47, Micha M. <kernelnewbies@mail.i88.de> wrote:
> > 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.
>
> Interesting, and after page fault....the code is still not executed?
>
> what code(s) do you call? user mode? kernel mode?
I don't think that the code was executed. There was a kernel Ooops direct
after the page fault and a register dump was printed. The code I what to
call is located in ROM and is mapped to the physical address space.
Is it possible to configure the kernel to ignore certain address areas and
allow calls to that space?
And that code needs to be executed from that place, since it contains
pointer in the physical address space. (s oremapping won't work because
there are absolute jumps in that function I'd like to call)
The only solution I kan think of at the moment is to solve it somehow in
assembly. But I don't know how...
regards,
#micha
--
/* To err is human; to really fuck things up requires the root password */
next prev parent reply other threads:[~2011-06-08 10:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-07 20:47 Calling function from address Micha M.
2011-06-07 21:10 ` Jeff Haran
2011-06-08 9:52 ` Mulyadi Santosa
2011-06-08 10:50 ` Micha M. [this message]
2011-06-08 14:49 ` emilie lefebvre
2011-06-09 19:50 ` Micha M.
[not found] ` <BANLkTinCsEuYb-ZPPAy_h4HWCSufHV-8vQ@mail.gmail.com>
2011-06-10 7:46 ` Micha M.
2011-06-11 7:45 ` Peter Teoh
2011-06-11 8:01 ` Peter Teoh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110608105057.GA12967@mailer.i88.de \
--to=kernelnewbies@mail.i88.de \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).