Bochs: starts in pmode

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
ed_tait

Bochs: starts in pmode

Post 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
bkilgore

Re:Bochs: starts in pmode

Post 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.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re:Bochs: starts in pmode

Post 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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
ed_tait

Re:Bochs: starts in pmode

Post 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.
Post Reply