Embedded Linux >> bootloader-bios interaction

by Uday Mullangi » Thu, 18 Nov 2004 20:37:22 GMT

Hi,

I am looking for the boot sequence for Linux OS (Intel P4 processor)
In particular, where the BIOS finisies the POST and jumps to the predefined
location where the bootloader code is executed. I believe while the BIOS is
running the processor is configured in real mode. So when the bootloader
code is executing, will the processor switch to protected mode?( i am not
sure). If the processor runs the bootloader in real mode then it can see
only 1MB of RAM. In this case if the linux image is greater than 1MB how can
it uncompress the image?
Could anyone give me some pointers about this execution ??

Thanks
Uday




Embedded Linux >> bootloader-bios interaction

by du » Sun, 21 Nov 2004 21:11:27 GMT



"Uday Mullangi" < XXXX@XXXXX.COM >
predefined
is

No,bootloader running in real mode then it do not load the whole kernel
image.
Bootloader only load part of kernel,and jump to it.
In the kernel ,there is a asm function named setup() switch the processor to
protected mode and call startup_32().The startup_32 do something and load
other
part of kernel image

can





Embedded Linux >> bootloader-bios interaction

by Tauno Voipio » Mon, 22 Nov 2004 05:11:51 GMT




If you have a kernel up to 2.4.x with sources, look at the directory
/usr/src/linux/arch/i386/boot/. These kernels are able to self-boot
if they are copied at the start of a diskette. The file first executed
is bootsect.S.

The standard loaders (LILO, GRUB) do their own loading, and
they are much more complicated than the simple self-loader.

The whole kernel is read into the memory by the boot loader,
and it has to use the BIOS disk drivers, as there are no
other disk drivers in the system yet.

The code continues from bootsect.S to setup.S which changes
the CPU to protected mode and continues to startup32() function
in /usr/src/linux/arch/i386/boot/compressed/head.S. The function
calls the function decompress_kernel() in misc.c in the same
directory. A LILO or GRUB -loaded kernel is also started
from startup32().

The decompressed kernel starts at startup32() in
/usr/src/linux/arch/i386/kernel/head.S. It sets up the rest
of the 32 bit runtime environment and calls the start_kernel()
function in /usr/src/linux/init/main.c

HTH

--

Tauno Voipio
tauno voipio (at) iki fi



bootloader-bios interaction

by Craig Bergren » Thu, 25 Nov 2004 06:54:10 GMT





For a description of the boot process, see this file in the kernel source
distribution "linux/Documentation/i386/boot.txt". You can download a copy
from kernel.org.


I think this is the sequence for Windoze. I've never seen setup() and
setup_32() in Linux.


Look in "linux/arch/i386/boot/setup.S" this is where the bios calls in
real mode and the switch to protected happens.



Similar Threads

1. Bios-Bootloader details

Hi,

I am looking for the boot sequence for Linux OS (Intel P4 processor)
In particular, where the BIOS finisies the POST and jumps to the predefined
location where the bootloader code is executed. I believe while the BIOS is
running the processor is configured in real mode. So when the bootloader
code is executing, will the processor switch to protected mode?( i am not
sure). If the processor runs the bootloader in real mode then it can see
only 1MB of RAM. In this case if the linux image is greater than 1MB how can
it uncompress the image?
Could anyone give me some pointers about this execution ??

Thanks
Uday


2. BIOS not seeing bootloader

3. bios interaction with linux kernel after uncompression.

4. [News] Open BIOS Quicker Than Proprietary BIOS - Linux

5. Moving motherboard BIOS to embedded Linux BIOS

6. BIOS CHIPS : New Replacement Bios Chips or Re - Flash

7. [OHCI] BIOS handoff failed (BIOS bug?)

8. uClinux bootloader on Spartan-3e Starter Kit