l4linux: l4x_setup_memory:Cant get main memory

Leslie Zhai lesliezhai at llvm.org.cn
Fri Jun 9 10:25:02 CEST 2017


Hi Adam,

Thanks for your hint!

 > Hm, tried adding more memory to the VM?

Perhaps other users might experienced the same issue:


L4x: Main thread running, waiting...
L4x: Memory size: 64MB
L4x: Setting superpages for main memory
l4x_setup_memory: Can't get main memory of 65536kiB! Please try to add 
more memory to the VM.
MOE[mem_alloc]: quota: limit=-1 Byte, used=9646080 Byte
MOE[mem_alloc]: global: avail=52121376 Byte
MOE[mem_alloc]: free list (start address/size):
MOE[mem_alloc]:    0x210e0 -    0x213ff (800 Byte)
MOE[mem_alloc]:   0x273400 -   0x273fff (3 kB)
MOE[mem_alloc]:   0x370000 -   0x3fffff (576 kB)
MOE[mem_alloc]:   0xba6000 -  0x18aafff (13 MB)
MOE[mem_alloc]:  0x541a000 -  0x7838fff (36 MB)
Terminating L4Linux.


so I simply added "Please try to add more memory to the VM."


Index: arch/l4/kernel/main.c
===================================================================
--- arch/l4/kernel/main.c       (revision 54)
+++ arch/l4/kernel/main.c       (working copy)
@@ -1384,7 +1384,8 @@

                 if (l4re_ma_alloc_align(mem_chunk_sz[i], l4x_ds_mainmem[i],
                                         f, virt_phys_alignment)) {
-                       LOG_printf("%s: Can't get main memory of %ldkiB!\n",
+                       LOG_printf("%s: Can't get main memory of %ldkiB! 
Please try to "
+                       "add more memory to the VM.\n",
                                    __func__, mem_chunk_sz[i] >> 10);
l4re_debug_obj_debug(l4re_env()->mem_alloc, 0);
                         l4x_exit_l4linux();


then users might realized that using qemu-system-x86_64 -m 1024M to 
launch L4Linux-mag-x86, and L4Linux is able to run happily :) 
https://pbs.twimg.com/media/DB3YY0zVwAA9CM9.png sorry for posting 
screenshots on Twitter but I am so happy! so excited! and my sincere 
thank goes to you and Jean! you are teaching me patiently and carefully :)

-- 
Regards,
Leslie Zhai - a LLVM hacker https://reviews.llvm.org/p/xiangzhai/






More information about the l4-hackers mailing list