I've been trying to load my kernel with my own custom bootloader, but it isn't going too well. I'm using NASM for asm and Bochs for my Virtual Machine.
This is my compiler/builder script:
And my ASM is as follows:
http://vectec.net/booter.asm
However, if I remove the errornous lines, it complains about locking and never leaves the ground...
Is what I'm doing right? I tried searching and looking through the Wiki and I've been googling for a couple days and #asm in Freenode isn't helping.
Error loading Kernel from Unformatted floppy(image)
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:Error loading Kernel from Unformatted floppy(image)
First, this is the *testing* forum. Pls post questions like yours in the os *development, design, FAQ* forum. It's above this one in the entry page.
Second: What errorneous lines dost thou mean? Canna check nor find anything if you don't tell which ones are failing.
Third: compiler/builder script? Where?
Oh, and *what* complains about locking?
Second: What errorneous lines dost thou mean? Canna check nor find anything if you don't tell which ones are failing.
Third: compiler/builder script? Where?
Oh, and *what* complains about locking?
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image
Re:Error loading Kernel from Unformatted floppy(image)
I guess he meant these:
Code: Select all
;Exception between here...
mov eax, cr0
or al, 1
mov cr0, eax
;...and here
[quote][/quote]
Every good solution is obvious once you've found it.
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:Error loading Kernel from Unformatted floppy(image)
@solar:oops. that's the art of reading I guess, which has failed me here. *chuckle*
@charris:
Possibilities: you enable protected mode with interrupts enabled and a timer interrupt occurs. As I don't see any lidt instruction nor any idt in your code, it is likely that the processor produces a triple fault because of this hurting lack of IDT.
I suppose you tell the processor to *cli* before doing the pmode thing and only enable 'em again after having provided a proper idt (and idtr). This will help you as long as you avoid triggering exceptions.
@charris:
Possibilities: you enable protected mode with interrupts enabled and a timer interrupt occurs. As I don't see any lidt instruction nor any idt in your code, it is likely that the processor produces a triple fault because of this hurting lack of IDT.
I suppose you tell the processor to *cli* before doing the pmode thing and only enable 'em again after having provided a proper idt (and idtr). This will help you as long as you avoid triggering exceptions.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image
Re:Error loading Kernel from Unformatted floppy(image)
Your not disabling interrupts before you enter protected mode. You need to add a cli before the pmode initiation code:
Hope this helps.
Code: Select all
cli ; Clear interrupts
; Enable protected mode
mov eax, cr0
or al, 1
mov cr0, eax
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Error loading Kernel from Unformatted floppy(image)
there are plenty of pmode tutorials in Bona Fide & OSRC (check the .:QuickLinkz:.) make sure you understand what they say if you wish to write your own custom bootloader
Entering ProtectedMode is certainly not the easiest thing to do ...
Entering ProtectedMode is certainly not the easiest thing to do ...