Re: Linux/ix86 booting process and BIOS

From: Strohm Thomas (FV/SLD) * (Thomas.Strohm@de.bosch.com)
Date: Mon Feb 21 2000 - 08:28:53 EST


> > - To which extent is the initialization stuff performed by the BIOS
repeated
> > by Linux kernel?
>
> Only in part
>
> > - Which tasks really have to be performed by the BIOS? What does Linux
rely
> > on?
>
> o CPU initialisation sequences - eg the very undocumented L2 cache
> programming on earlier PII chips and the MTRR setups for early
> steppings to disable (we think) some CPU optimisations
> o Chipset initialisation sequences
> o PCI bus configuration including boot rom execution
> o Memory sizing

... I just want to give some background information on why I'm interested in
finding
some 'lean' and open substitute for the PC BIOS.

Actually I'm interested in booting *very* fast. In my case, this is more
important
than flexibility (modules etc.).

The following steps happen when booting:
(1) BIOS executes
(2) LILO loads vmlinuz and gunzips it
(3) the kernel does initializations (I start counting when entering
start_kernel())
(4) init executes /etc/rc <rl> (rl=2)

On a PII/350 system with 128MB of memory and running 2.2.4 (SuSE 6.2,
non-SCSI), the
measured times are: (1) 8s, (2) 1s, (3) 4s, (4) app. 25s.

Optimizations:
(1) Not optimized so far. Perhaps I will consider some OpenBIOS solution...
(2) LILO: This 1s is almost bound by I/O time.
(3) I know my hardware! -> Customize kernel.
    most of the time is spent in ide_init() (3.3s). Kernel spends 1.7s to
figure
    out that IDE1..5 are empty :-) -> probe_for_drive(unit=0) only.
    This improves the 4s to almost only 1s. Most of the time now is spent in
    a) calibrate_delay() (0.23s) -> could skip this because I know the clock
rate
    b) probe_for_drive(IDE0,master) (0.64s) -> needed :-)
(4) Kill most of the daemons, merge rc scripts, kill ldconfig [:-(], avoid
modules,
    put functionality into kernel. 25s->8s.

Note that after these steps, the time spent in the BIOS is a considerable
amount
of the booting time (almost half of it).

Thomas.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Feb 23 2000 - 21:00:27 EST