Hi,
I've encountered problems under QEMU.
Problems occur in many different configs but this is the simplest way to reproduce:
Build Fiasco with default config, only "Handle and preserve segments" shall be turned on. Configure ORe for RTL-8139 NIC only and build L4Env. Build L4Linux with x86-ux_defconfig, only "ORe stub driver" shall be turned on.
Boot with following QEMU command: qemu /dev/sdb -no-kqemu -serial telnet:localhost:5555,server
NOTES: 1. I use USB flash stick but image file could be used as well with the same result. 2. You may pass option -net nic,model=rtl8139 but result will be the same
Error log (in second case uKernel crashes): If you don't load ORe module you should see:
l4lx | setup_l4env_memory: Forcing superpages for main memory DMphys | [9.0] dm_phys/server/src/open.c:98:__create_ds(): DMphys | DMphys: memory allocation size 65536KB pool 0 failed! l4lx | [F.4] dm_mem/lib/clientlib/src/open.c:80:l4dm_mem_open(): l4lx | libdm_mem: open dataspace at 9.00 failed (ret -2, exc 0) l4lx | setup_l4env_memory: Can't get main memory of 64MB: out of memory(-2)! l4lx | Main thread running, waiting... DMphys | DMphys memory pools: ... <CUT: Here is long output from DMphys> ... DMphys | total size 00486000 (4632kB, 5MB) l4lx | Terminating L4Linux.
If you do load ORe module you should see:
l4lx | Using tamed mode. ROOT: Task #0f is not allowed to execute cli/sti loader | vmlinuz,#10: WARNING: Can't map I/O space, ROOT denies page (result=0 loader : 0004000) loader | vmlinuz,#10: Not allowed to perform any I/O l4lx | Got 0 out of 65536 I/O ports
DOUBLE FAULT! EAX=c02c07d0 ESI=c02c0000 DS=0023 EBX=c0401000 EDI=00000000 ES=0023 ECX=07e77000 EBP=c02c06c8 GS=0043 EDX=00000000 ESP=c04017cc SS=0010 ESP0=c02c0800 EFL=00200083 EIP=f002f4c6 CS=0008 Return reboots, "k" tries to enter the L4 kernel debugger...
GRUB script:
title TEST L4LinuxUX + ORE kernel /boot/test/bootstrap modaddr 0x02000000 module /boot/test/main -nokdb -serial_esc -comspeed 115200 -comport 1 module /boot/test/sigma0 module /boot/test/roottask task modname "loader" allow_cli task modname "bmodfs" attached 5 modules module /boot/test/names module /boot/test/log module /boot/test/l4io module /boot/test/events module /boot/test/dm_phys --isa=0x00800000 -v --events module /boot/test/simple_ts -t 300 module /boot/test/rtc module /boot/test/ore module /boot/test/l4con module /boot/test/bmodfs module /boot/test/l4linux.cfg module /boot/test/libloader.s.so module /boot/test/libld-l4.s.so module /boot/test/vmlinuz module /boot/L4Linux/drops.rd module /boot/test/loader --fprov=BMODFS l4linux.cfg vbeset 0x117
l4linux.cfg: task "vmlinuz" "earlyprintk=yes mem=64M load_ramdisk=1 ramdisk_size=16384 root=/dev/ram l4env_rd=drops.rd" allow_vga all_sects_writable
My toolchain: GCC (Debian 4.3.2-1.1) 4.3.2 GNU Binutils for Debian 2.18.0.20080103 QEMU version 0.9.1
Best Regards, Alexander Valitov
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
l4lx | setup_l4env_memory: Forcing superpages for main memory DMphys | [9.0] dm_phys/server/src/open.c:98:__create_ds(): DMphys | DMphys: memory allocation size 65536KB pool 0 failed! l4lx | [F.4] dm_mem/lib/clientlib/src/open.c:80:l4dm_mem_open(): l4lx | libdm_mem: open dataspace at 9.00 failed (ret -2, exc 0) l4lx | setup_l4env_memory: Can't get main memory of 64MB: out of memory(-2)!
dm_phys is not able to allocate 64MB of memory for the Linux server. You may try passing Qemu the -m <memsize> option and thereby increase virtual machine memory.
Bjoern
Björn Döbel wrote:
dm_phys is not able to allocate 64MB of memory for the Linux server. You may try passing Qemu the -m <memsize> option and thereby increase virtual machine memory.
Thanks. Additional '-m 256' option helped. Default value for the option is 128. In this case Roottask receives 87MB and biggest pool is 58MB. With '-m 256' biggest pool is 175MB.
I also have found out that DOUBLE FAULT situation in Fiasco is cured by turning off "Kernel options->Assembler IPC shortcut" Fiasco option. Does someone know that causes the "DOUBLE FAULT"? As seen from maillist archive it is a known problem, but I wonder why is it still not fixed? Let me explain. Menuconfig says that "assembler IPC shortcut" increases performance of short IPC (I guess it is IPC inside of an address space). It is definitely a good thing and I'd like to have it turned on. But it could causes crash in kernel (potentially also on hardware???). It is definitely a bad thing. The excuses that I see is that fix is really tricky and couldn't be easily implemented or the root of problem is known and it triggers problem ONLY with QEMU.
Best Regards, Alexander Valitov
On Tue Mar 17, 2009 at 09:17:21 -0700, Alexander Valitov wrote:
I also have found out that DOUBLE FAULT situation in Fiasco is cured by turning off "Kernel options->Assembler IPC shortcut" Fiasco option. Does someone know that causes the "DOUBLE FAULT"? As seen from maillist archive it is a known problem, but I wonder why is it still not fixed? Let me explain. Menuconfig says that "assembler IPC shortcut" increases performance of short IPC (I guess it is IPC inside of an address space).
Nope, register only IPC is meant here.
It is definitely a good thing and I'd like to have it turned on. But it could causes crash in kernel (potentially also on hardware???). It is definitely a bad thing. The excuses that I see is that fix is really tricky and couldn't be easily implemented or the root of problem is known and it triggers problem ONLY with QEMU.
I basically can only remember seeing this on Qemu and as it does not really matter there it probably does not make much sense in hunting this one, besides that it's a tricky one. It may be different if it happens on real hardware but still the easy work around is just switching it off.
Adam
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
Alexander Valitov wrote:
DOUBLE FAULT! EAX=c02c07d0 ESI=c02c0000 DS=0023 EBX=c0401000 EDI=00000000 ES=0023 ECX=07e77000 EBP=c02c06c8 GS=0043 EDX=00000000 ESP=c04017cc SS=0010 ESP0=c02c0800 EFL=00200083 EIP=f002f4c6 CS=0008 Return reboots, "k" tries to enter the L4 kernel debugger...
Just a guess, have you the option "Assembler IPC shortcut" in the Fiasco kernel config enabled ? If so, please disable it. We adapted the default config in svn today accordingly.
Best,
Alex B.
l4-hackers@os.inf.tu-dresden.de