Page 1 of 1
Bootloaders
Posted: Tue Jan 07, 2003 2:06 pm
by weathermanfrank
Hi ya'll
I'm on my bootloader and have run in to some trouble. I've done tons of research on the net not to mention reading half of "Operating systems: Design and Implamentation" yet I still getting stuck:). I have made and loaded my GDT turned of Interupts and other stuff.
My problem is the wonderful triple fault
In the code:
mov eax, cr0
or al, 1
mov cr0, eax
if I comment out the last line my bootloader just hangs but does not triple fault other wise it does.
I'm just realy stuck and lookin for some hints of what I might try.
Thank you
Frank
Re:Bootloaders
Posted: Tue Jan 07, 2003 2:41 pm
by jrfritz
Could you post the whole code?
Maybe your GDT's bad...
Tom: Here is my code
Posted: Tue Jan 07, 2003 2:54 pm
by weathermanfrank
[attachment deleted by admin]
Re:Bootloaders
Posted: Tue Jan 07, 2003 3:09 pm
by jrfritz
[attachment deleted by admin]
Re:Bootloaders
Posted: Tue Jan 07, 2003 3:12 pm
by jrfritz
[attachment deleted by admin]
Re:Bootloaders
Posted: Tue Jan 07, 2003 3:15 pm
by jrfritz
[attachment deleted by admin]
Re:Bootloaders
Posted: Tue Jan 07, 2003 3:29 pm
by weathermanfrank
I thank you for your help thus far. What were you able to determine about my code? And thank you for a look at your code I nothing else I'll try to modify mine using yours as a guide if thats all right with you.
Thank you again
Frank
Re:Bootloaders(yours)
Posted: Tue Jan 07, 2003 3:45 pm
by weathermanfrank
Now I really must begin to wonder? I booted your up and it to reset the computer. Could that be because I had no kernel for it to load or would that be more a physical system problem?
Re:Bootloaders
Posted: Tue Jan 07, 2003 3:54 pm
by jrfritz
[attachment deleted by admin]
Re:Bootloaders
Posted: Tue Jan 07, 2003 4:50 pm
by jrfritz
Did that work?
Re:Bootloaders
Posted: Tue Jan 07, 2003 5:13 pm
by beyondsociety
Here is your problem:
Code: Select all
codeSeg
dw 0FFFFh
dw 0000h
db 00h
db 98h ; Right Here
db 0CFh
db 00h
Change it to:
Code: Select all
codeSeg
dw 0FFFFh
dw 0000h
db 00h
db 9Ah ; This line has been changed
db 0CFh
db 00h
Hope this helps!
Re:Bootloaders
Posted: Tue Jan 07, 2003 5:17 pm
by jrfritz
I guess it's time for me to read some more on GDT stuff...
Re:Bootloaders(Tom)
Posted: Tue Jan 07, 2003 8:00 pm
by weathermanfrank
Thank you again your code works now I just have to play with it a bit and make sure that I understand it operation an I'll be all set. But I look forward to the challange. Thank you again for your help.
Frank
Re:Bootloaders(Tom)
Posted: Tue Jan 07, 2003 8:47 pm
by weathermanfrank
With respect to your boot loader. how do you init, the segments to there respective selectors after the
jmp $
I seams that If I change that to
jmp $ + 1 I triple fault the CPU
So where do you go from this?
Thanks for any ideas:)
Frank
Re:Bootloaders
Posted: Tue Jan 07, 2003 9:07 pm
by jrfritz
You are jumping to a unknown place...that's why...
Also...after there...you load your C kernel if you want to program your OS in C.