Page 2 of 3
Re:More Tripple Faults
Posted: Thu Jan 16, 2003 5:06 am
by Pype.Clicker
and, btw, try to identify the cause of the FIRST exception. If you're using bochs, ask it to provide more debug, or to output a trace of every instruction, or run it step by step ... whatever.
Track the 3v!l to its source: you're currently fighting with the shadow of your bug, not with the bug itself
Re:More Tripple Faults
Posted: Thu Jan 16, 2003 10:44 am
by srg
Although I have bochs 2.0, I can't get it to work, it says that one of my IDE drive declarations on bochsrc is malformed even though it's and edit of the one in the sample. Here is the Line:
ata0-master: type=disk, path=sgos.img, cyl=615, heads=4, spt=17
I have the CHS values correct but it says this is malformed
Also, with any version of bochs, I have never got the debugger to do what I want, what is the best reference for using the debugger
BTW I don't really find the manual on the website very helpfull
So I have never really got on with bochs
Re:More Tripple Faults
Posted: Thu Jan 16, 2003 12:30 pm
by Pype.Clicker
i wonder whether your cylinders number isn't too high ... 4 heads seems very few to me
Re:More Tripple Faults
Posted: Thu Jan 16, 2003 12:43 pm
by srg
I have got the that working now by adding it using Bochs it's self.
I now have version 2.0.1 of bochs and it seems much more stable, but all I now get is the stuff that it puts into my command prompt (I'm using Windows XP), the main screen that displays the program and has reset button etc never appears!
BTW those disk image geometry details were given to me by boch's own image making program!
Re:More Tripple Faults
Posted: Thu Jan 16, 2003 12:51 pm
by srg
I'm now starting to get the hang of Bochs and it's debugger
Here is the error:
[CPU ] exception(): 3rd (13) exception with no resolution
So I'm assuming that when ever I get an interrupt, with also if I use the Int instruction, it is raising a GPF, but when it calls the GPF "Interrupt", it raises a GPF, when it calls the GPF Int again, it tripple faults.
Here is all the info that Bochs provides (BTW I have used an Int 00 instruction to force an Interrupt call):
00003511649p[CPU ] >>PANIC<< exception(): 3rd (13) exception with no resolution
00003511649i[SYS ] Last time is 1042746764
# In bx_win32_gui_c::exit(void)!
========================================================================
Bochs is exiting with the following message:
[CPU ] exception(): 3rd (13) exception with no resolution
========================================================================
00003511649i[CPU ] protected mode
00003511649i[CPU ] CS.d_b = 32 bit
00003511649i[CPU ] SS.d_b = 32 bit
00003511649i[CPU ] | EAX=6000728f EBX=00000010 ECX=00000000 EDX=00002820
00003511649i[CPU ] | ESP=0000fffc EBP=0000fffc ESI=00000000 EDI=00000000
00003511649i[CPU ] | IOPL=0 NV UP DI PL NZ NA PE NC
00003511649i[CPU ] | SEG selector base limit G D
00003511649i[CPU ] | SEG sltr(index|ti|rpl) base limit G D
00003511649i[CPU ] | DS:0010( 0002| 0| 0) 00000000 000fffff 1 1
00003511649i[CPU ] | ES:0010( 0002| 0| 0) 00000000 000fffff 1 1
00003511649i[CPU ] | FS:0010( 0002| 0| 0) 00000000 000fffff 1 1
00003511649i[CPU ] | GS:0010( 0002| 0| 0) 00000000 000fffff 1 1
00003511649i[CPU ] | SS:0010( 0002| 0| 0) 00000000 000fffff 1 1
00003511649i[CPU ] | CS:0008( 0001| 0| 0) 00000000 000fffff 1 1
00003511649i[CPU ] | EIP=00007235 (00007235)
00003511649i[CPU ] | CR0=0x60000011 CR1=0x00000000 CR2=0x00000000
00003511649i[CPU ] | CR3=0x00000000 CR4=0x00000000
00003511649i[CPU ] >> cd
00003511649i[CPU ] >> 00
00003511649i[CPU ] >> : int 00
00003511649i[CTRL ] quit_sim called with exit code 1
Re:More Tripple Faults
Posted: Fri Jan 17, 2003 2:02 am
by srg
Or does this say nothing about my problem?
Re:More Tripple Faults
Posted: Fri Jan 17, 2003 3:22 am
by Pype.Clicker
doesn't help alot ... i would rather need the content of the GDTR register and what is read out of the IDT when the GPF occurs ...
Re:More Tripple Faults
Posted: Fri Jan 17, 2003 5:02 am
by srg
ic, How do I do that?
Re:More Tripple Faults
Posted: Fri Jan 17, 2003 7:13 am
by Pype.Clicker
check the bochs user manual for debugging info.
all that i found by now is 'show "int"', 'show "dbg-all"', etc.
Re:More Tripple Faults
Posted: Fri Jan 17, 2003 9:42 am
by srg
hmm Very Interesting
After my program switched to Pmode and set it's segments, (just for the sake of completeness), did a cpu_dump and this is what Bochs said for the IDTR:
idtr:base=0x742b, limit=0x0
Re:More Tripple Faults
Posted: Fri Jan 17, 2003 10:43 am
by Pype.Clicker
Hey, hey, dude ...
seems you mis-sized linear_cs :
it's a word and you have some
in your code ...
So the nice IDT_end - IDT -1 you computed at compile-time is overwritten with a zero at runtime
t00 b4|)
Re:More Tripple Faults
Posted: Fri Jan 17, 2003 12:10 pm
by srg
Yep, I managed to use bochs to work that out
Now I don't have any tripple faults!
Re:More Tripple Faults
Posted: Fri Jan 17, 2003 12:56 pm
by srg
I've now enabled interrupts and all is working. Strangely, I now get on the Bochs debugger a stream of exceptions ( all the same one ) ( thousands of them) that all jump to my handler Int_32.
Is this just the 8253 timer (even though Bochs calls it an exception, is there something wrong.
There is what Bochs says:
18268580: exception (not softint) 0000:00000008 000073c7
18268586: iret 0000:00000008 00007236 (from 00007236)
Re:More Tripple Faults
Posted: Fri Jan 17, 2003 2:14 pm
by Pype.Clicker
what seems w8rd is the "0000" selector in the called code ...
Re:More Tripple Faults
Posted: Fri Jan 17, 2003 3:16 pm
by srg
I'm assuming it's a bug in bochs as if it was real then it would brobably crash.
Anyway, everything is working properly, I have even set up a simple Keyboard handler that puts a character in screen memory, also one for the Timer Inerrupt that does the same. They work in perfect harmony.
Also, I've noticed that Bochs runs my code faster than VMWare.
Thanks for your help (No doubt that it will be neded in the future
)