x86 Boot enhancements, boot parameters 1/11
Linus please apply,
This is the first in a series of mostly independent patches to enhance and cleanup the x86 boot code.
Major features:
- 32bit entry point, bypassing all of the 16bit BIOS calls. This is useful for booting from LinuxBIOS (where there is no 16bit BIOS).
This is useful for Linux booting Linux when you aren't certain the 16bit BIOS hasn't been stomped.
This is convenient for bootloaders that are already running in protected mode, allowing them to skip the hassle of switching back to real mode, (the kernel will do that later).
- Boot image bean counting.
This is a listing of what memory the kernel actually uses while bootstrapping.
This is useful for converting bzImages, into ELF bootable images, and for allowing static placement of ramdisks. If you know where the kernel will sit it is easy to avoid it.
- Compiled in command line.
For the static case where you have a stupid bootloader a compiled in command line allows continued access to advanced kernel features.
- Boot footprint reduction.
Currently the kernel decompresser asks bootloaders to make a choice between the amount of memory used, and reliability. The higher in real mode memory the kernel places the real mode code, the less total memory the decompresser uses but you are also much more likely to run into large EBDA's, and fail to boot entirely.
- Boot code cleanup
Both the work done for bean counting and some other patches clean up the boot process making it easier to understand and enhance.
- LinuxBIOS support.
My real motive. Enhance the boot process enough so it is easy to handle LinuxBIOS.
The patches are archived at:
ftp://download.lnxi.com/pub/src/linux-kernel-patches/boot/linux-2.5.8.boot.*.diff A patch containing all of the work is:
ftp://download.lnxi.com/pub/src/linux-kernel-patches/boot/linux-2.5.8.boot.diff
This first patch introduces a structure of boot parameters placed in asm-i386/boot_param.h and implemented in misc.c and setup.c.
This removes a lot of magic macros and by keeping all of the boot parameters in a structure it becomes much easier to track which boot_paramters we have and where they live. Additionally this keeps the names more uniform making grepping easier.
Eric
Documentation/i386/zero-page.txt +6 -2
@@ -9,7 +9,11 @@ arch/i386/boot/video.S arch/i386/kernel/head.S arch/i386/kernel/setup.c - + +See include/asm-i386/boot_param.h a structure is kept there with +uptodate information. The kernel no longer copies this information +into the empty zero page, but instead uses it directly. + Offset Type Description ------ ---- -----------
@@ -65,7 +69,7 @@ 0x21c unsigned long INITRD_SIZE, size in bytes of ramdisk image 0x220 4 bytes (setup.S) 0x224 unsigned short setup.S heap end pointer -0x2d0 - 0x600 E820MAP +0x2d0 - 0x550 E820MAP 0x800 string, 2K max COMMAND_LINE, the kernel commandline as copied using CL_OFFSET.
arch/i386/boot/compressed/misc.c +34 -30
113 lines not on this page · raw message
arch/i386/kernel/setup.c +41 -62
167 lines not on this page · raw message
include/asm-i386/boot_param.h +79 -0
79 lines not on this page · raw message