Re: Mapping memory into process address space

Noah Zentzis <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <[email protected]>
On 08/17/2014 12:55 AM, Adam Lackorzynski wrote:
> So now I'm not sure how you want to proceed. Are your programs special
> ones, i.e. that they are quite different from L4 programs or are they L4
> programs? I wondering where to do the paging, however, in any case it
> sounds to me like doing it in a different task would be good.
>
> To address your question:
> You map the pager to the task with the dst_task->map() call as shown
> above. The pager is probably a thread you implement, for doing your
> work. The order does not really matter because the thread only starts
> running until the run_thread call, i.e. it does not matter whether the
> pager cap (any cap) is mapped before or after it has been registered
> with the thread.

How would I configure the new task to use the same pager that the 
current task is? Looking at libloader, I'd think it would be something like:

task-map(L4Re::This_task, env->rm().fpage(), env->rm().snd_base());

but I'm not sure if I need to create a new region map or something like 
that. I think I've got memory mapping working, but the process dies with 
an unhandled read page fault.

- Noah Zentzis
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.