Hard to tell what the real problem might be. Can you, since this is the simplest check, build pistachio with an older compiler? New compiler and binutils versions sometimes cause headaches, and I’ve not checked build against newer versions for quite some time. You can find a list of known-working compilers here:
http://l4ka.org/projects/pistachio/buildstatus/hg.php -Jan -- Jan Stoess KIT/UKa System Architecture Group Phone: +49 (721) 608-4056 Fax: +49 (721) 608-7664 eMail: sto...@kit.edu<mailto:sto...@ira.uka.de> From: l4ka-boun...@ira.uni-karlsruhe.de [mailto:l4ka-boun...@ira.uni-karlsruhe.de] On Behalf Of Owen Shepherd Sent: Thursday, December 03, 2009 7:45 PM To: l...@ira.uni-karlsruhe.de Subject: Building a working instance of L4Ka::Pistachio OK, I'm currently attempting to build Pistachio for x86 32-bit. I've built a pretty standard kernel (Pentium 2/3, KDB, spinwheels and tracing are the only things I've enabled for now). My aim is an AMD64 kernel with more features, but it's always best to start with a smaller base and get that working first. I've then built the usermode tasks, and built a grub disk using the included grubdisk.img. Problem is, the kernel crashes on both emulators I've tried it with (Bochs and QEMU). The last message I get from the kernel before it crashes is "Initializing GDT (Preliminary)". The Bochslog preceding this is 00128039070e[CPU0 ] LTR: doesn't point to an available TSS descriptor! 00128039070e[CPU0 ] interrupt(): gate descriptor is not valid sys seg (vector=0x0d) 00128039070e[CPU0 ] interrupt(): gate descriptor is not valid sys seg (vector=0x08) 00128039070i[CPU0 ] CPU is in protected mode (active) 00128039070i[CPU0 ] CS.d_b = 32 bit 00128039070i[CPU0 ] SS.d_b = 32 bit 00128039070i[CPU0 ] EFER = 0x00000000 00128039070i[CPU0 ] | RAX=000000000000f012 RBX=00000000000000f0 00128039070i[CPU0 ] | RCX=0000000000000f00 RDX=0000000000000000 00128039070i[CPU0 ] | RSP=000000000015648c RBP=0000000000802028 00128039070i[CPU0 ] | RSI=000000000000df00 RDI=000000000003eaa0 00128039070i[CPU0 ] | R8=0000000000000000 R9=0000000000000000 00128039070i[CPU0 ] | R10=0000000000000000 R11=0000000000000000 00128039070i[CPU0 ] | R12=0000000000000000 R13=0000000000000000 00128039070i[CPU0 ] | R14=0000000000000000 R15=0000000000000000 00128039070i[CPU0 ] | IOPL=0 ID vip vif ac vm RF nt of df if tf sf zf af PF cf 00128039070i[CPU0 ] | SEG selector base limit G D 00128039070i[CPU0 ] | SEG sltr(index|ti|rpl) base limit G D 00128039070i[CPU0 ] | CS:0008( 0001| 0| 0) 00000000 ffffffff 1 1 00128039070i[CPU0 ] | DS:0010( 0002| 0| 0) 00000000 ffffffff 1 1 00128039070i[CPU0 ] | SS:0010( 0002| 0| 0) 00000000 ffffffff 1 1 00128039070i[CPU0 ] | ES:0010( 0002| 0| 0) 00000000 ffffffff 1 1 00128039070i[CPU0 ] | FS:0010( 0002| 0| 0) 00000000 ffffffff 1 1 00128039070i[CPU0 ] | GS:0010( 0002| 0| 0) 00000000 ffffffff 1 1 00128039070i[CPU0 ] | MSR_FS_BASE:0000000000000000 00128039070i[CPU0 ] | MSR_GS_BASE:0000000000000000 00128039070i[CPU0 ] | RIP=00000000001532dc (00000000001532dc) 00128039070i[CPU0 ] | CR0=0xe0010011 CR2=0x0000000000000000 00128039070i[CPU0 ] | CR3=0x00134000 CR4=0x00000090 (0).[128039070] [0x001532dc] 0008:00000000001532dc (unk. ctxt): ltr word ptr ss:[esp+0x10] ; 0f005c2410 00128039070e[CPU0 ] exception(): 3rd (13) exception with no resolution, shutdown status is 00h, resetting I think we can safely assume that something has gone wrong loading the TSS, a general protection fault has been raised during the LTR, then a double fault has followed that. Is this a bug in the L4 sources, or an issue with my build environment? The important information is $ uname -a Linux sidewinder 2.6.31-15-generic #50-Ubuntu SMP Tue Nov 10 14:53:52 UTC 2009 x86_64 GNU/Linux $ gcc -v Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.1-4ubuntu8' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu8) $ ld -v GNU ld (GNU Binutils for Ubuntu) 2.20