Re: bootloader-bios interaction
From: Tauno Voipio (tauno.voipio_at_iki.fi.NOSPAM.invalid)
Date: 11/21/04
- Next message: John Williams: "Re: uxlinux and microblaze"
- Previous message: du: "Re: bootloader-bios interaction"
- In reply to: Uday Mullangi: "bootloader-bios interaction"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 21 Nov 2004 21:11:51 GMT
Uday Mullangi wrote:
> 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 ??
>
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
- Next message: John Williams: "Re: uxlinux and microblaze"
- Previous message: du: "Re: bootloader-bios interaction"
- In reply to: Uday Mullangi: "bootloader-bios interaction"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|