Bootloader not working.
-
- Member
- Posts: 40
- Joined: Tue Nov 13, 2012 2:54 pm
Bootloader not working.
My bootsector works fine and dandy but my bootloader keeps restarting my emulator when I try to jump to my kernel at the end of my bootloader. The code is in the file attached.
- Attachments
-
- bootload.asm
- (1.42 KiB) Downloaded 88 times
Code: Select all
var myCat="marshmallow"
Re: Bootloader not working.
I think you might need to include the selector for the kernel code segment:
Does that work?
Code: Select all
jmp 08h:startkernel
-
- Member
- Posts: 40
- Joined: Tue Nov 13, 2012 2:54 pm
Re: Bootloader not working.
No, it keeps restarting in bochs and aborts in qemu.
Code: Select all
var myCat="marshmallow"
- Kazinsal
- Member
- Posts: 559
- Joined: Wed Jul 13, 2011 7:38 pm
- Libera.chat IRC: Kazinsal
- Location: Vancouver
- Contact:
Re: Bootloader not working.
Look at bochsout. Check to see if it shows any errors, like "not a valid cs segment".
Re: Bootloader not working.
Hmm, ok I thought of one more thing. You probably want BITS 32 before your protected mode code.
-
- Member
- Posts: 40
- Joined: Tue Nov 13, 2012 2:54 pm
Re: Bootloader not working.
It still restarts. How do I access bochsout?
Code: Select all
var myCat="marshmallow"
Re: Bootloader not working.
How do you know that the fault is when it tries to jump to the kernel code rather than some error in that code? The problem may not be with the bootloader. It can be misleading to make assumptions.
Re: Bootloader not working.
Are you sure that "kernel" code was loaded? I don't.
gabemaiberger, what values registers have at loadkernel? Are you sure that es=0 during reading?
gabemaiberger, what values registers have at loadkernel? Are you sure that es=0 during reading?
If you have seen bad English in my words, tell me what's wrong, please.
Re: Bootloader not working.
You didn't add the TIMES directive to the end, nor the BIOS magic number.
-
- Member
- Posts: 40
- Joined: Tue Nov 13, 2012 2:54 pm
Re: Bootloader not working.
It wasn't the bootloader at all. It was the kernel calling an interrupt in protected mode.
Code: Select all
var myCat="marshmallow"
- Kazinsal
- Member
- Posts: 559
- Joined: Wed Jul 13, 2011 7:38 pm
- Libera.chat IRC: Kazinsal
- Location: Vancouver
- Contact:
Re: Bootloader not working.
In bochsrc:gabemaiberger wrote:It still restarts. How do I access bochsout?
Code: Select all
log: bochsout.txt