Self-Compiled Bochs failing before execution of any code
Posted: Thu Mar 03, 2011 5:13 am
Hello,
to debug an issue I'm having with SMP (faulting when setting PM bit in CR0 in RM after STARTUP IPI), I decided to switch over from qemu to bochs for the sake of its great debugging features.
Unfortunately, the precompiled bochs version that ships with my linux distro (Ubuntu 10.10) has no support for ACPI which is required for my kernel to run (doing LAPIC discovery etc.), so I decided to compile bochs by myself, loaded the source from SVN and compiled with the following configuration on my X86_64-linux-unknown-gnu machine:
Now, everything compiles fine and as expected, installing bochs with sudo make install, and trying to execute my kernel (bootloader: GRUB legacy, image: ISO9660) using the following bochsrc.txt:
Now, when I'm trying to run my kernel (with one CPU, for the beginning), the emulator windows stays black and bochs reports me:
Okay, what's happening there? To me, it looks like bochs is trying to start execution on 0xF000:0xFFF0, but actually finds no valid instruction to execute, but I could be wrong and I don't see any reason why it should do that. I attached my bochsout.txt to this post below and my OS's code (except for the latest one that does the SMP initialization and some half-way-done, but not integrated scheduler) is available on Github, if it helps (see the link below).
to debug an issue I'm having with SMP (faulting when setting PM bit in CR0 in RM after STARTUP IPI), I decided to switch over from qemu to bochs for the sake of its great debugging features.
Unfortunately, the precompiled bochs version that ships with my linux distro (Ubuntu 10.10) has no support for ACPI which is required for my kernel to run (doing LAPIC discovery etc.), so I decided to compile bochs by myself, loaded the source from SVN and compiled with the following configuration on my X86_64-linux-unknown-gnu machine:
Code: Select all
./configure --enable-smp \
--enable-cpu-level=6 \
--enable-acpi \
--enable-x86-64 \
--enable-pci \
--enable-vmx \
--enable-debugger \
--enable-disasm \
--enable-debugger-gui \
--enable-logging \
--enable-vbe \
--enable-fpu \
--enable-3dnow \
--enable-sb16=dummy \
--enable-cdrom \
--enable-x86-debugger \
--enable-iodebug \
--disable-plugins \
--disable-docbook \
--enable-magic-breakpoint \
--with-x --with-x11 --with-term
Code: Select all
megs: 32
romimage: file=/usr/local/share/bochs/BIOS-bochs-latest, address=0xe0000
vgaromimage: file=/usr/local/share/bochs/VGABIOS-lgpl-latest
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=cdrom, path="boot.iso", status=inserted
boot: cdrom
log: bochsout.txt
mouse: enabled=0
clock: sync=realtime
Code: Select all
Next at t=0
(0) [0x00000000fffffff0] f000:fff0 (unk. ctxt): (invalid) ; ffff