Some questions about pager
adam at os.inf.tu-dresden.de
Thu Nov 25 00:03:56 CET 2010
On Wed Nov 24, 2010 at 17:20:03 +0100, BERTRAND Joel wrote:
> I understand what you say but I think that I misunderstand some L4
> Now, I have written a roottask that starts (or tries to start, it
> depends ;-) ) a new task (init.exe) in new address space. This task
> is loaded by bootloader and _physically_ mapped as it's mapped by
> roottask and sigma0.
> Problem : start init.exe address is outside physical memory and
> requires virtual memory mapping. Thus, I have written a very simple
> pagefault handler in roottask. When this thread starts, it sends a
> pagefault IPC to roottask.
> Pagefault handler knows required memory, but it needs to associate
> roottask's memory and I don't see how pagefault can return this
> For example :
> physical memory : 0 - 128 M
> roottask starts at 16 M
> init.exe starts at 512 M
> When init.exe starts, it sends a pagefault error to its pager (roottask):
> -> vms$pagefault(addr:200000b0) [priv=4]
> and pager must reply with a mapitem message with the _same_ address.
> I understand that pager has to associate a memory region to virtual
> address required by init.exe. I know how find an available page to
> satisfy this request, but I don't know how associate this page to
> returned memory. Is there anywhere an example ? All pagers I have
> found only maps physical memory (iguana, darbat...).
I guess the fpage for L4_MapItem in vm_pagefault.c should better use the
virtual address of the memory to map to the client. As far as I see
'fpage' is constructed by using the pagefault address but should rather
use the address that is looked up in roottask. Could that be the
'memsection'? I also think that the 'caller' should play a role when
doing the lookup so that the same virtual addresses of different clients
result in different memsections to be returned.
Adam adam at os.inf.tu-dresden.de
More information about the l4-hackers