Hello everybody
I'm new to the osdev forum, and I've got a little problem understanding a certain piece of theory.
All the pages & wiki's I've read (and I've read them before asking my question) said that there are many kinds of boot loaders. But that they ultimately do the same thing: Transferring control to the kernel after setting up it's environment (stack, real/unreal/protected mode, enz, enz)
Thats all the wiki's have to say about it. But how am I supposed to do this? I've made the boot loader (I've c+pd it and then remade it) and a test environment.
But I don't understand how the kernel is loaded, sure the windows kernel is far bigger than 512 kb? So you switch to protected mode, but your kernel is still on the disk right?
So ultimately;
How to put the kernel in memory?
Jump form bootloader to kernel
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Jump form bootloader to kernel
Please search before posting.The wiki page on bootloaders wrote:How do I actually load bytes
BIOS interrupt 13h
Re: Jump form bootloader to kernel
I have searched:Combuster wrote:Please search before posting.The wiki page on bootloaders wrote:How do I actually load bytes
BIOS interrupt 13h
But I must have missed that, thank you for your response
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Jump form bootloader to kernel
There is a tutorial under booting.
There is a page called Bootloader.
There is an explicit "more info here" reference among the pages you have read.
Practice your search skills
There is a page called Bootloader.
There is an explicit "more info here" reference among the pages you have read.
Practice your search skills
Re: Jump form bootloader to kernel
The choices I can think of is:
1. Make the kernel fit into the lower 640KiB
2. Load a piece of the kernel in low memory, switch to PM and copy it to high memory, and switch back to real mode and repeat.
3. Use BIOS services that allows reading from disk to high memory.
4. Write code that is able to read directly from disk in PM.
I think the first alternative would be good for a starter (it will take some time before your kernel exceeds half a meg anyway).
1. Make the kernel fit into the lower 640KiB
2. Load a piece of the kernel in low memory, switch to PM and copy it to high memory, and switch back to real mode and repeat.
3. Use BIOS services that allows reading from disk to high memory.
4. Write code that is able to read directly from disk in PM.
I think the first alternative would be good for a starter (it will take some time before your kernel exceeds half a meg anyway).