triple fault??

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
tyro

triple fault??

Post by tyro »

Hi!!!
I am developing a kernel using djgpp/nasm. Upto now i have initialized gdt and idt. I have also implemented some basic printing functions. Now, I am not able to add any more new functions to my OS. Whenever i try to do that i get an exception error from bochs.

I have a basic flat memory model setup ( with four descriptors, ( kernel code, kernel data,user code and user data ) pointing from 0 to 4gb ).

I tried to increase the stack size and it didnt work. The main C sequence of my OS is
It is after these functions when i try to introduce some
.....
   init_pics( 0x20,0x28 );
   setupGDT();
   setupIDT();
....
After this sequence watever new functions i try to add, i get a triple fault.


Below is the bochs dump.
......

00000572706p[CPU ] >>PANIC<< exception(): 3rd (13) exception with no resolution
00000572706i[SYS ] Last time is 1061665417
00000572706i[CPU ] protected mode
00000572706i[CPU ] CS.d_b = 32 bit
00000572706i[CPU ] SS.d_b = 32 bit
00000572706i[CPU ] | EAX=000155e0 EBX=00009000 ECX=f000ff73 EDX=000003d5
00000572706i[CPU ] | ESP=000bbbaf EBP=000bbbb7 ESI=00000000 EDI=0000ffe4
00000572706i[CPU ] | IOPL=0 NV UP DI NG NZ NA PO NC
00000572706i[CPU ] | SEG selector base limit G D
00000572706i[CPU ] | SEG sltr(index|ti|rpl) base limit G D
00000572706i[CPU ] | DS:0023( 0004| 0| 3) 00000000 000fffff 1 1
00000572706i[CPU ] | ES:9170( 122e| 0| 0) 004a680c 0000ec83 0 0
00000572706i[CPU ] | FS:0023( 0004| 0| 3) 00000000 000fffff 1 1
00000572706i[CPU ] | GS:0023( 0004| 0| 3) 00000000 000fffff 1 1
00000572706i[CPU ] | SS:0010( 0002| 0| 0) 00000000 000fffff 1 1
00000572706i[CPU ] | CS:0008( 0001| 0| 0) 00000000 000fffff 1 1
00000572706i[CPU ] | EIP=0000fdae (0000fdae)
00000572706i[CPU ] | CR0=0x60000011 CR1=0x00000000 CR2=0x00000000
00000572706i[CPU ] | CR3=0x00000000 CR4=0x00000000

......

Please help me to get out of this problem.

Regards,
R Karthick
Therx

Re:triple fault??

Post by Therx »

which boot loader are you using?

If you are using bootf02 (John Fine) then it uses paging to put you at the top of memory so that may be why.

Pete
pini

Re:triple fault??

Post by pini »

tyro wrote: After this sequence watever new functions i try to add, i get a triple fault.
Are you sure that your kernel is completly loaded (i mean: does your bootloader do its job correctly ?)
If you're using your own bootloader, try with grub if you get the same fault.
tyro

Re:triple fault??

Post by tyro »

Thanx a lot for ur replies.

I am using my own bootloader and yus u r rite, i was not loading all the sectors from the floppy in which kernel is loaded.

Now it works great ;D
Post Reply