Hello,

I'm trying to understand the boot process of a 64-bit kernel but i'm having some trouble.

The comments in http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/i86pc/dboot/dboot_grub.s state that

"The multiboot header has to be at the start of the file

The 32 bit kernel is ELF32, so the MB header is mostly ignored.

The 64 bit kernel is ELF64, so we get grub to load the entire
ELF file into memory and trick it into jumping into this code.
The trick is done by a binary utility run after unix is linked,
that rewrites the mb_header."

So, in order to load a 64 bit kernel, grub first loads the 32-bit dboot program. But, from what i understand, dboot is a part of the elf64 kernel. How does grub starts loading the dboot program? The above comments say that grub loads the whole 64-bit kernel. How does this happen since grub cannot load elf64 images?

The comments also mention a trick which involves extract64() from http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/tools/elfextract/elfextract.c. However i am totally confused about the function of this procedure and what exactly it rewrites.

Please excuse me for writing so much. I hope you can help me.

Thank you in advance for any replies.

Regards,
Constantine
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to