caiminf / freenos

Automatically exported from code.google.com/p/freenos
GNU General Public License v3.0
0 stars 0 forks source link

Booting FreeNOS from ISO's build on FreeBSD fails #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Several compilers on FreeBSD are able to compile FreeNOS, but
are unable to successfully boot under at least Qemu 0.10.5:

GCC 3.4.6
GCC 4.3.4 20090531
GCC 4.4.1 20090601
GCC 4.5.0 20090604
LLVM-GCC 4.2.1

Also see the 'Host Support' overview on:
http://www.freenos.org/wiki/doku.php/status

Original issue reported on code.google.com by coenbijlsma on 7 Aug 2009 at 10:36

GoogleCodeExporter commented 9 years ago
ORIGINAL COMMENT FROM nieklinnenbank
I've discovered that the kernel at some point does not receive interrupts 
anymore
from at least the clock device, while the IF flag in the EFLAGS register is set.

When I replace the kernel with a kernel compiled on Linux, which has been tested
on forehand successfully, the system boots fine. This confirms that userland 
compiled
under FreeBSD seems to be correct, and that the problem lies in the kernel 
code, possibly
somewhere in the interrupt handling code.

Original comment by coenbijlsma on 7 Aug 2009 at 10:37

GoogleCodeExporter commented 9 years ago
ORIGINAL COMMENT FROM nieklinnenbank
Currently on my FreeBSD 7.2 installation, I have only one compiler 
(/usr/bin/gcc)
which is able generate a successfully bootable FreeNOS kernel. All other 
compilers
which I installed from /usr/ports, seem to fail, and all generate the following 
message:

LINK kernel/kernel
ld: Warning: size of symbol `_ZN4ListI7ProcessE6removeEPS0_' changed from 168 in
kernel/Process.o to 171 in kernel/Scheduler.o

The default compiler in /usr/bin/gcc does not generate this warning, and it is 
very
likely this is the cause of the problem. I did manage to break on this function 
in GDB.

Original comment by coenbijlsma on 7 Aug 2009 at 10:37

GoogleCodeExporter commented 9 years ago
ORIGINAL COMMENT FROM nieklinnenbank
I've discovered that the linker warning is not fatal, nor the cause
of the problem. When running and inspecting the kernel compiled on FreeBSD
under Qemu, it seemed that the PIC has a wrong interrupt mask. I've
rewritten X86Kernel::enableIRQ() to be more simple and clean, which has solved
this problem aswell.

Original comment by coenbijlsma on 7 Aug 2009 at 10:37

GoogleCodeExporter commented 9 years ago

Original comment by coenbijlsma on 7 Aug 2009 at 10:38