Some questions about pager
joel.bertrand at systella.fr
Thu Nov 18 19:04:15 CET 2010
Adam Lackorzynski a écrit :
> On Wed Nov 17, 2010 at 11:50:29 +0100, BERTRAND Joel wrote:
>> It's my first post on this mailing list. A long time ago, I have
>> started to write a VMS-clone (http://www.freevms.net). This
>> opensourced project was sleeping for a long time because monolithic
>> kernel isn't good enough to write a clone of this system.
>> Thus, I have restarted this project with a L4 microkernel (exactly
>> pistachio L4/X2). Now, I have written a roottask that tries to
>> launch VMS$INIT, first thread required to boot all system. I have
>> reuse some works done for iguana project (and fixed some bugs).
>> When VMS$INIT is started, this thread sends two IPC to its pager :
>> vms$pagefault(addr:1001730, s:8000) [priv=4]
>> -> default addresse is $1001730 (start address of VMS$INIT thread)
>> vms$pagefault(addr:47fe8, s:2000) [priv=4]
>> I'm not sure that I have understand how should work a pager. I have
>> uploaded my pager here :
>> All sources are available with :
>> git clone git://rayleigh.systella.fr/FreeVMS.git
>> and I have uploaded a disk image that runs with qemu (with a x86/64) :
>> My pager tries to find a physical free page to map virtual memory.
>> I think that memory is correctly mapped and I don't understand why
>> pager receives other request with same virtual address. I suppose I
>> have done a mistake.
> Given that the first mapping on the code is ok I'd guess the mapping
> s0->roottask doesn't work and thus no map to the app (check by touching
> the memory in roottask). I'm not an expert on x2 but maybe you could
> check whether the mapitem after the sigma0 map call makes sense.
I have check in http://hg.l4ka.org/l4ka-pistachio-ref/l4-x2.pdf, and I
think that mapitem makes sense.
When a pagefault occurs, I obtain :
vms$pagefault(addr:47fe8, s:2000) [priv=4]
memsection 46000 47fff
s0: got msg from 0x0000003a00000001, (0xffffffffc170,
s0: got msg from 0x0000003a00000001, (0xffffffffffa0,
s0: allocate_page (tid: 0x3a00000001, addr: 9c000, log2size: 13)
%MEM-I-ACCMAP, accepting mapping
%MEM-I-ACCMAP, virtual $0000000000046000 - $0000000000047FFF
%MEM-I-ACCMAP, physical $000000000009C000 - $000000000009DFFF
Thus, virtual region 46000-47FFF is mapped in 9C000-9DFFF memory (and
mapping is accepted). Mapitem seems to be required.
I'm working on a new web site (because trac takes too CPU time) and new
git interface is http://www.freevms.net/gitweb. Trac interface will be
More information about the l4-hackers