Page 1 of 1

Bochs & SMP

Posted: Thu Aug 26, 2004 11:28 am
by pini
I compiled bochs to support multiprocessors.
I also enabled debugging, so that I can follow my code.

I got a working kernel on a uniprocessor-compiled bochs, but here when I simply run it (with the SMP bochs-BIOS), I got this :

Code: Select all

Next at t=0
(0) [0x000ffff0] f000:fff0 (unk. ctxt): jmp f000:e05b             ; ea5be000f0
(1) [0x000ffff0] f000:fff0 (unk. ctxt): jmp f000:e05b             ; ea5be000f0
(2) [0x000ffff0] f000:fff0 (unk. ctxt): jmp f000:e05b             ; ea5be000f0
(3) [0x000ffff0] f000:fff0 (unk. ctxt): jmp f000:e05b             ; ea5be000f0
(4) [0x000ffff0] f000:fff0 (unk. ctxt): jmp f000:e05b             ; ea5be000f0
(5) [0x000ffff0] f000:fff0 (unk. ctxt): jmp f000:e05b             ; ea5be000f0
(6) [0x000ffff0] f000:fff0 (unk. ctxt): jmp f000:e05b             ; ea5be000f0
(7) [0x000ffff0] f000:fff0 (unk. ctxt): jmp f000:e05b             ; ea5be000f0
<bochs:1> c
[00000500000|e|000004f2[VGA  ] character height = 1, skipping text update
[00001000000|e|00000a1f[VGA  ] character height = 1, skipping text update
[00001500000|e|00000513[VGA  ] character height = 1, skipping text update
[00002000000|e|0000050f[VGA  ] character height = 1, skipping text update
[00003000000|e|000007fd[VGA  ] character height = 1, skipping text update
[00003500000|e|000007fd[VGA  ] character height = 1, skipping text update
[00004000000|e|000007fd[VGA  ] character height = 1, skipping text update
[00004500000|e|000007fd[VGA  ] character height = 1, skipping text update
And I got these "skipping text" until I break bochs (seems to be a infinite loop). Only the first CPU (Boot Processor) is working, the other are remaining in halted mode, waiting for IPI.

Does any have a multiprocessor-running bochs ? and if so, what i can do to make it ?

Re:Bochs & SMP

Posted: Thu Aug 26, 2004 11:41 am
by Candy
pini wrote: And I got these "skipping text" until I break bochs (seems to be a infinite loop). Only the first CPU (Boot Processor) is working, the other are remaining in halted mode, waiting for IPI.

Does any have a multiprocessor-running bochs ? and if so, what i can do to make it ?
I had it working in 2p mode, where the second was never awaken. Do you have the 8p bios loaded, or still the 1p bios? If the 8p, try using a different one.

Re:Bochs & SMP

Posted: Fri Aug 27, 2004 1:46 am
by Brendan
Hi,
pini wrote: Does any have a multiprocessor-running bochs ? and if so, what i can do to make it ?
I compiled heaps of different versions of Bochs 2.1.1 (single & SMP, with & without debugger, and 2, 4 & 8 CPUs).

Here's the configure script I used for 8 CPUs with debugging:

Code: Select all

#!/bin/sh

CC="gcc"
CXX="g++"
CFLAGS="-O6 -march=pentium"
CXXFLAGS="$CFLAGS"
export CC
export CXX
export CFLAGS
export CXXFLAGS

./configure --enable-cpu-level=6 \
   --enable-processors=8 \
   --enable-global-pages \
   --enable-disasm \
   --enable-sep \
   --enable-vbe \
   --enable-readline \
   --disable-reset-on-triple-fault \
   --enable-debugger
I compile (Bochs 2.1.1) using both Cygwin and GCC on Linux. Generally I'd type "./theScriptName", then "make bochs". I also keep the scripts for each compiled version so it's easy to add or remove support for something.

I remember having similar problems. One of the options I normally use messes up SMP (I think it was "--enable-all-optimizations").


Cheers,

Brendan

Re:Bochs & SMP

Posted: Fri Aug 27, 2004 2:06 pm
by pini
I got it running.
I removed the --enable-all-optimizations from my configure script, and now it works good.

Thx you