Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
After the completion of Boot loader program, Which is the kernel code that may be executed(Architecture Dependent assembly/C code)?
I simply meant the very first code of kernel in which directory?
Shall I get some links to PDF/Books for tracing the kernel sequences?
The initial startup sequences are always architecture-specific.
For instance, in the x86 architecture, the first part is probably /usr/src/linux/arch/x86/boot/main.c. (At least, for the primary CPU...)
This very-first stage of the boot process (on the x86...) finds itself in "real mode." That is to say, virtual-memory and other fundamental capabilities do not yet exist. So, the very first job is to set up the processor data-structures necessary to enter the so-called "protected mode." From there, remaining data structures are set-up to allow the kernel to avail itself of other fundamental capacities, such as memory-management, multi-CPU handling, and processes.
Each CPU-type upon which Linux has been implemented ... from the smallest handheld device to the biggest "big iron" mainframe ... has its own specific version of this startup sequence.
Related with this issue I have a question which I am wondering
about for a long time.
While loading the kernel the processor is still in real mode.
However in real mode it can only address about 1MB + upper memory.
Usually a Kernel is much bigger than that amount.
thanks nigelc, its a real interesting page. However
I did not get the point yet. Must the kernel be small
enough before decompressing to fit in to the available
memory in real mode?
It is my distinct impression that the compressed image must fit there, but the uncompressed image does not. It will be relocated into protected-mode memory.
There are various curiosities about the initial-stage of the boot process on the x86 processors, which after all was designed with floppy disks in mind. The black actually-floppy ones with a big slot.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.