Page 1 of 1

Bochs: starts in pmode

Posted: Fri Jun 02, 2006 8:15 am
by ed_tait
can any one help,

bochs has started to act oddly:

it boots uo in pmode and calls gpf when i try to use the bios to load my kernel.

i know why it calls the fault; the idt does not exist yet. But why does it boot up in pmode. i've tried rebooting my computer and reinstalling the software but to no avail.

bochsrc. txt looks like this

Code: Select all

 # You many now use double quotes around pathnames, in case
# your pathname includes spaces.

romimage: file=BIOS-bochs-latest, address=0xf0000
vgaromimage: VGABIOS-elpin-2.40
megs: 32

floppya: 1_44="floppya.img" 
boot: a

#log: bochsout.txt
panic: action=ask
error: action=report
info: action=report
debug: action=ignore

vga_update_interval: 300000
keyboard_serial_delay: 250
keyboard_paste_delay: 100000
floppy_command_delay: 500
ips: 1000000
mouse: enabled=0
private_colormap: enabled=0
fullscreen: enabled=0
screenmode: name="sample"
keyboard_mapping: enabled=0, map=

#keyboard_type: at

Re:Bochs: starts in pmode

Posted: Fri Jun 02, 2006 9:18 am
by bkilgore
How do you know that it "boots up in pmode"? And if you dont have an IDT installed yet, how do you know that interrupt 0x0d is being triggered?

When you say that it "started" to act oddly, it sounds like it was working fine until recently. Did you change something? Like upgrade the bios, bochs version, change your bootloader, anything like that?

Also, upload a copy of your bochsout.txt, that may have some clues in it.

Re:Bochs: starts in pmode

Posted: Fri Jun 02, 2006 9:22 am
by Brendan
Hi,
ed_tait wrote:i know why it calls the fault; the idt does not exist yet. But why does it boot up in pmode. i've tried rebooting my computer and reinstalling the software but to no avail.
Are you sure it boots up in protected mode? It should start with CS_base = 0xFFFFF0000, which does look strange (but is technically correct).

Can you start it with the debugger and see what everything looks like before it executes any instructions? For e.g. check that the BIOS is where it's meant to be (just below 4 GB and just below 1 MB) and if it really does start in protected mode (or if something after the first instruction enables protected mode).


Cheers,

Brendan

Re:Bochs: starts in pmode

Posted: Fri Jun 02, 2006 1:09 pm
by ed_tait
sorry i've messed.

i didn't properly understand the bochs readout...

it's odd, EIP was set to 0x7C02, the int 13h instruction to calibrate the disk and the first bit in cr0 was set but the case of my woes was posibly the oldest in the book...

... I wasn't reading all the sectors my kernel occupied from the floppy disk. :-[

sorry agin.
ed.