Adam Lackorzynski a écrit :
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.
I'm writing a new pager that shall map virtual memory. This work is in progress but I have another question. I have to write a protocole to handle virtual memory and this protocol uses StringItem. I cannot send any StringItem and I don't understand why this IPC hangs. Minimal example : rtl$sprint(&str, fmt, arg); si = L4_StringItem(str.length_trim, (void *) str.c); L4_Clear(&msg); L4_Append(&msg, si); L4_Set_Label(&msg, 1); L4_Load(&msg); L4_KDB_Enter("pager"); L4_Call(L4_Pager()); L4_KDB_Enter("pager"); (file is downloadable at http://www.freevms.net/gitweb/?p=FreeVMS.git;a=blob;f=sources/freevms/librtl...) When I start kernel in virtualbox, I obtain: sys$pagefault(addr=200110 caller=3c00000001) sys$pagefault(ref=2a31) sys$pagefault(addr=10dff8 caller=3c00000001) sys$pagefault(ref=29d1) sys$pagefault(addr=201490 caller=3c00000001) sys$pagefault(ref=2a31) --- "pager" --- --------------------------------- (eip=00000000002002d1, esp=000000000010d8b8) -
showtcbext
... mr(00): 0000000000010080 0000000000006400 000000000010d8b8 ... Message Tag: 0 untyped, 2 typed, label = 1, flags = ---- string item: len=19, num=1, cont=0, cache=0 StringItem seems to be good (I have checked that buffer contains correct values).
go
sys$pagefault(addr=0 caller=3c00000001) %MEM-F-MEMSEC, no memory section Halting a thread with ongoing kernel operations is not supported--- "KD# UNIMPL- --------------------------------- (eip=ffffffffc080c92d, esp=ffffffffc0a8edd0) - Thus, L4_Call(L4_Pager()) raises a pagefault. And faulty address is 0x0 ! Why ? Regards, JKB