Hi, i am just adding the part to my bootloader where is actuially loads the kernel, and i have noticed that every other bootloader i have seen ( i have only been looking at hobby or example ones though) have loaded thier kernel while in real mode. i am wondering why this is, is it just because it is easy to find the physical address in real mode? is there any reason i couldn't load my kernel while in protected mode?
also, i am wondering about booting my kernel from cdrom as opposed to floppy. i haven't been able to find any documentation on how to do this, does anyone have any clues/tips/ideas about doing this?
thanks for your time
libber
loading kernel from floppy
Re:loading kernel from floppy
They do the loading in real mode because you can't use the BIOS (where the disk I/O routines are) from protected mode. It's virtually pointless switching to protected mode then using your own direct disk access code when you can stay in real mode and use the BIOS.
Re:loading kernel from floppy
Might I recommend taking a look at Chuck Moore's ColorForth? His bootsector contains a protected mode floppy driver to load the rest of the system. It is, unfortunately, a non-DMA driver, but it demonstrates that it -is- possible.
For booting from CD, I'd look at El Torrito. I -think- that takes a floppy image and has the BIOS pretend that it is drive A: when you use the BIOS disk functions.
--Jamethiel
For booting from CD, I'd look at El Torrito. I -think- that takes a floppy image and has the BIOS pretend that it is drive A: when you use the BIOS disk functions.
--Jamethiel