What all you think dose BootLoader needs to provide to the kernel?
Dont say A20 ,PMode,etc
Just what information it needs, somewhat like Multiboot structure.
EDIT:
Sorry for lack of information.
What I mean is what information do I need to give the kernel before jumping to the kernel.I have planned to develop a structure and pass the base address in "ebx" and the size in "edx" registers before giving control to the kernel.I have done things to supply the memory map.
Bootloader
-
- Member
- Posts: 63
- Joined: Sat Apr 28, 2012 9:41 am
- Location: Earth -> Asia
Bootloader
Anyone has a idea of making a ntfs bootsector?if yes PM me , plz.
Re: Bootloader
IMO, the boot loader need to provide to kernel:
1. basic information that comes handy from BIOS, for example:
- memory map
- video modes
- kernel loaded address and size
- list of modules with loaded address and size
2. safe and consistence environment expected by the kernel
- cpu flags, I would set to 2
- pmode, long mode (if expected by kernel)
- page directory layout (if expected by kernel)
- machine met the minimal hardware requirement (eg. if kernel assume 1~4MiB is usable, but the memory map say that there is a hole and not usable, the kernel may crash if it is executed)
ps. there are much more to add for a good loader.
1. basic information that comes handy from BIOS, for example:
- memory map
- video modes
- kernel loaded address and size
- list of modules with loaded address and size
2. safe and consistence environment expected by the kernel
- cpu flags, I would set to 2
- pmode, long mode (if expected by kernel)
- page directory layout (if expected by kernel)
- machine met the minimal hardware requirement (eg. if kernel assume 1~4MiB is usable, but the memory map say that there is a hole and not usable, the kernel may crash if it is executed)
ps. there are much more to add for a good loader.
Re: Bootloader
It depends on what the kernel estimates from bootloader. I prefer to pass only data that could not be get in any other way than through bootloader. At this moment I know only one that info: drive and partition from which the kernel is loaded. That is what my bootloader passes.LindusSystem wrote:What all you think dose BootLoader needs to provide to the kernel?
Re: Bootloader
My kernel/stage 2 is loaded together with one additional file (loaded directly after it) and usually takes control in RM so it needs system disk/partition/folder and size of additional file:LindusSystem wrote:What all you think dose BootLoader needs to provide to the kernel?
dl - BIOS disk number;
dh - partition number in current partitioning scheme or 0 (whole device or default partition);
ax:cx - size of additional file or 0 (autodetect);
bx != 0xAA55 (reserved for future extensions).
System folder name is passed in special structure stored at the end of kernel image. When Multiboot-compliant boot loader was used all required parameters are passed through Multiboot structures (system folder name can be taken from Multiboot command line).
If you have seen bad English in my words, tell me what's wrong, please.
-
- Member
- Posts: 63
- Joined: Sat Apr 28, 2012 9:41 am
- Location: Earth -> Asia
Re: Bootloader
Ok, thank you all.
So I have planned to create a structure in the bootloader keep all the info and pass the address and limit of it in "ebx" and "edx" register.
Will this work?
@Voltek, I am in booloader stage, not a kernel stage.
Anyway Thanks for your consideration
So I have planned to create a structure in the bootloader keep all the info and pass the address and limit of it in "ebx" and "edx" register.
Will this work?
@Voltek, I am in booloader stage, not a kernel stage.
Anyway Thanks for your consideration
Anyone has a idea of making a ntfs bootsector?if yes PM me , plz.
Re: Bootloader
LindusSystem wrote:@Voltek, I am in booloader stage, not a kernel stage.
No, no your not.
-
- Member
- Posts: 63
- Joined: Sat Apr 28, 2012 9:41 am
- Location: Earth -> Asia
Re: Bootloader
I did not get you ,VolTek.
Anyone has a idea of making a ntfs bootsector?if yes PM me , plz.