Linux X86-64 Protected Mode Kernel
As described in the Linux boot protocol for the X86 architecture, the boot loader should load the protected mode kernel at the address 0x100000 of the physical memory.
As I understood reading the code, the protected mode kernel should be made up of:
- The 32 bit code starting from the label startup_32 in the file head_64.S which does the transition to 64 bit mode and the 64 bit code which sets everything up for the kernel decompression(This part, as one can read in the linker script "vmlinux.lds.S" should be in the .head.text section at the very beginning of the protected mode kernel which is compiled starting from the address 0).
- The compressed kernel. This should be an object file with just the ".rodata..compressed" section so it can be linked in the ".rodata..compressed" section of the protected mode kernel, according to the "vmlinux.lds.S" script. Right?
- The kernel decompression code.
I would like to know:
- Where can I find (In the source tree after compilation) each of the object files of the 3 sections of the protected mode kernel I mentioned above? Which are these object file names?
- Where are they put/linked together in the Makefile to get the protected mode kernel that the boot loader can load?
- Which file in the source tree (After compilation) is the protected mode kernel made up of the 3 section I mentioned above?
Thank you very much in advance.
Giacomo
Last edited by Giacomo93; 01-12-2025 at 05:02 PM.
|