D21 Subsystem Initialization

Figure D-1 shows a code flow diagram to briefly illustrate the function's tasks and goals.

The first step is to output the version message. The message text is held in the linux_banner global variable defined in init/version.c. This is followed by a further architecture-specific initialization step, which no longer deals with lower-level processor details but is written in C and which, on most systems, has the primary task of setting the framework for initialization of high-level memory management. The bulk of the initialization work — setting up the central data structures of the various kernel subsystems — is performed in start_kernel once the command-line arguments passed to the kernel at startup have been interpreted. This is a very comprehensive task because it involves practically all subsystems. It is therefore broken down into a large number of short procedures, which are described in the subsequent sections. The final step is to generate the idle process that the kernel calls when it has absolutely nothing else to do. The init process is also started with PID 1 — this runs the initialization routines of various subsystems and then starts /sbin/init as the first user space process. This concludes kernel-side initialization.

Linux Subsystem Diagram
Figure D-1: Code flow diagram for start_kernel.

Continue reading here: Architecture Specific Setup

Was this article helpful?

0 0