Bochs debugger with SMP
Posted: Sun Dec 13, 2015 10:13 pm
Hi there! I think I'm missing something really obvious so hopefully the solution to my problem should be real-quick!
I'm firing up bochs in SMP mode and immediately I've got a problem. With 8 cores, I get the following debugger print:
As you can see, execution randomly halts after I tell it to resume! This keeps happening infinitely, with a few lines being executed at a time. I tried to get around this problem by executing "step 10000000000" with the hope that it should just continue execution almost forever, which almost works, except that the bochs bios crashes a few million instructions in, with "PANIC: Keyboard error:21". When I comment out the debugger and disassembler options passed to the configure script, the whole thing works perfectly. (I've compiled bochs myself from SVN) using the following options:
Everything also works if I pass cpu: count=1 instead of cpu: count=8 in bochsrc.txt (reproduced below):
Does anyone have any idea what the problem might be? Any help would be greatly appreciated.
I'm firing up bochs in SMP mode and immediately I've got a problem. With 8 cores, I get the following debugger print:
Code: Select all
00000000000i[PLUGIN] reset of 'extfpuirq' plugin device by virtual method
00000000000i[PLUGIN] reset of 'parallel' plugin device by virtual method
00000000000i[PLUGIN] reset of 'serial' plugin device by virtual method
00000000000i[PLUGIN] reset of 'gameport' plugin device by virtual method
00000000000i[PLUGIN] reset of 'iodebug' plugin device by virtual method
00000000000i[PLUGIN] reset of 'usb_uhci' plugin device by virtual method
00000000000d[KBD ] PS/2 mouse disabled
00000000000i[ ] set SIGINT handler to bx_debug_ctrlc_handler
Next at t=0
(0) [0x0000fffffff0] f000:fff0 (unk. ctxt): jmpf 0xf000:e05b ; ea5be000f0
(1) [0x0000fffffff0] f000:fff0 (unk. ctxt): jmpf 0xf000:e05b ; ea5be000f0
(2) [0x0000fffffff0] f000:fff0 (unk. ctxt): jmpf 0xf000:e05b ; ea5be000f0
(3) [0x0000fffffff0] f000:fff0 (unk. ctxt): jmpf 0xf000:e05b ; ea5be000f0
(4) [0x0000fffffff0] f000:fff0 (unk. ctxt): jmpf 0xf000:e05b ; ea5be000f0
(5) [0x0000fffffff0] f000:fff0 (unk. ctxt): jmpf 0xf000:e05b ; ea5be000f0
(6) [0x0000fffffff0] f000:fff0 (unk. ctxt): jmpf 0xf000:e05b ; ea5be000f0
(7) [0x0000fffffff0] f000:fff0 (unk. ctxt): jmpf 0xf000:e05b ; ea5be000f0
00000000000d[KBD ] PS/2 mouse disabled
<bochs:1> c
Next at t=5
(0) [0x0000000fe063] f000:e063 (unk. ctxt): out 0xd6, al ; e6d6
(1) [0x0000fffffff0] f000:fff0 (unk. ctxt): jmpf 0xf000:e05b ; ea5be000f0
(2) [0x0000fffffff0] f000:fff0 (unk. ctxt): jmpf 0xf000:e05b ; ea5be000f0
(3) [0x0000fffffff0] f000:fff0 (unk. ctxt): jmpf 0xf000:e05b ; ea5be000f0
(4) [0x0000fffffff0] f000:fff0 (unk. ctxt): jmpf 0xf000:e05b ; ea5be000f0
(5) [0x0000fffffff0] f000:fff0 (unk. ctxt): jmpf 0xf000:e05b ; ea5be000f0
(6) [0x0000fffffff0] f000:fff0 (unk. ctxt): jmpf 0xf000:e05b ; ea5be000f0
(7) [0x0000fffffff0] f000:fff0 (unk. ctxt): jmpf 0xf000:e05b ; ea5be000f0
00000000005d[KBD ] PS/2 mouse disabled
<bochs:2> c
Next at t=10
(0) [0x0000000fe06d] f000:e06d (unk. ctxt): in al, 0x71 ; e471
(1) [0x0000fffffff0] f000:fff0 (unk. ctxt): jmpf 0xf000:e05b ; ea5be000f0
(2) [0x0000fffffff0] f000:fff0 (unk. ctxt): jmpf 0xf000:e05b ; ea5be000f0
(3) [0x0000fffffff0] f000:fff0 (unk. ctxt): jmpf 0xf000:e05b ; ea5be000f0
(4) [0x0000fffffff0] f000:fff0 (unk. ctxt): jmpf 0xf000:e05b ; ea5be000f0
(5) [0x0000fffffff0] f000:fff0 (unk. ctxt): jmpf 0xf000:e05b ; ea5be000f0
(6) [0x0000fffffff0] f000:fff0 (unk. ctxt): jmpf 0xf000:e05b ; ea5be000f0
(7) [0x0000fffffff0] f000:fff0 (unk. ctxt): jmpf 0xf000:e05b ; ea5be000f0
00000000010d[KBD ] PS/2 mouse disabled
<bochs:3>
Code: Select all
./configure \
--enable-smp \
--enable-x86-64 \
--enable-long-phy-address \
--enable-configurable-msrs \
--enable-debugger \
--enable-fpu \
--enable-alignment-check \
--enable-3dnow \
--enable-monitor-mwait \
--enable-svm \
--enable-vmx=2 \
--enable-avx \
--enable-evex \
--enable-perfmon \
--enable-memtype \
--enable-x86-debugger \
--enable-a20-pin \
--enable-ne2000 \
--enable-e1000 \
--enable-pci \
--enable-clgd54xx \
--enable-voodoo \
--enable-usb \
--enable-usb-ohci \
--enable-usb-xhci \
--enable-cdrom \
--enable-sb16 \
--enable-es1370 \
--enable-gameport \
--enable-busmouse \
--enable-iodebug \
--enable-large-ramfile \
--enable-show-ips \
--with-all-libs
Code: Select all
display_library: sdl2
cpu: count=8
clock: sync=realtime, time0=local
romimage: file=../../bochs/bios/BIOS-bochs-latest
vgaromimage: file=../../bochs/bios/VGABIOS-lgpl-latest
magic_break: enabled=1
port_e9_hack: enabled=1
debug: keyboard=report
boot: cdrom
ata0-master: type=cdrom, path="cdrom.iso", status=inserted