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.
Clears all bits in the
eflagsregister.Fills the area of uninitialized data of the kernel identified by the
_edataand_endsymbols with zeros (see the section "Physical Memory Layout" in Chapter 2).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), ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access