Renaissance: The startup_32( ) Functions
There are two different startup_32( )
functions;
the one we refer to here is coded in the
arch/i386/boot/compressed/head.S
file. After
setup( )
terminates, the function has been moved
either to physical address 0x00100000
or to
physical address 0x00001000
, depending on whether
the kernel image was loaded high or low in RAM.
This function performs the following operations:
Initializes the segmentation registers and a provisional stack.
Fills the area of uninitialized data of the kernel identified by the
_edata
and_end
symbols with zeros (see Section 2.5.3).Invokes the
decompress_kernel( )
function to decompress the kernel image. The “Uncompressing Linux . . . " message is displayed first. After the kernel image is decompressed, the “O K, booting the kernel.” message is shown. If the kernel image was loaded low, the decompressed kernel is placed at physical address0x00100000
. Otherwise, if the kernel image was loaded high, the decompressed kernel is placed in a temporary buffer located after the compressed image. The decompressed image is then moved into its final position, which starts at physical address0x00100000
.Jumps to physical address
0x00100000
.
The decompressed kernel image begins with another
startup_32( )
function included in the
arch/i386/kernel/head.S
file. Using the same name for both the functions does not create any problems (besides confusing our readers), since both functions are executed by jumping to their initial physical ...
Get Understanding the Linux Kernel, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.