by October 11, 2003 0 comments



BIOS stands for Basic Input Output System, and is the first program that runs when you turn on your PC. It performs some of the functions like POST (Power On Self Test) and loading of the OS. Currently PCs are dependent on proprietary BIOS for booting.

This results in feature differences across different BIOS programs and unfamiliarity with particular BIOS. 

Also, to get support for a particular hardware, the user is at the mercy of the BIOS vendor to provide an upgrade patch. 

A noteworthy point is that much of the functionality of the BIOS is already implemented in the OS. The OS repeats some of it during system boot and runtime. 

Hence, it is possible to replace the BIOS with the OS after a few modifications and customization. Linux is a good option for BIOS, as it is open source and well supported by many developers. 

So a request for new hardware support may be worked upon by millions of Linux developers across the globe, resulting in the earliest availability of the upgrade patch. 

LinuxBIOS
There are a number of projects going on in the open source community to develop an open source BIOS, and some sample projects are OpenBIOS, FreeBIOS and of course
LinuxBIOS.

The LinuxBIOS project was initially started by Ron Minnich, and is currently well developed with support for many standard motherboards. With LinuxBIOS, the normal BIOS boot and setup process is eliminated and replaced by a simple initialization phase, followed by uncompressing of the Linux kernel. 

After this the Linux kernel starts and the remaining boot-up proceeds normally. LinuxBIOS doesn’t write over the BIOS code. It just transfers all control to the Linux kernel. 

How it works
LinuxBIOS extracts the Linux kernel directly into NVRAM (Non-Volatile RAM) and does a minimal amount of hardware initialization before handing over control to the Linux kernel. 

At power on or reset, an x86 processor jumps to the address 0xffff:0 (all x86 processors still emulate the 20-year-old 16-bit microprocessor, the 8086). GDT (Global Descriptor Table) is turned on and a jump is made to the 32-bit assembly code. 

This takes about 15 instructions in total. After this point the processor is in 32-bit protected mode. The 32-bit assembly initializes SDRAM, turns on minimal serial support if needed, and jumps to C code. 

The C code configures PCI, any remaining chipset setup, the building of SMP tables if needed, configuration of interrupts, configuration of MTRRs (Memory Type Rage Registers), and patching microcode. All this code fits in less than 32 KB of memory space.

The final step is to gunzip (extract/uncompress) the Linux image out of NVRAM and jump to it. From this point on the Linux kernel is loaded and running. 

If the Linux kernel is so equipped, it can locate a different Linux kernel or another OS kernel to run and boot that instead.

Some pros and cons 
LinuxBIOS has some advantages and disadvantages. One advantage is that the size of LinuxBIOS is very small compared to PC BIOS. It is around 32 KB. It boots very fast, the time is calculated to be under a second for booting from power off state to mounting Linux root file system. It is open source, easily downloadable and customizable as per our requirements. 

Its source code does not contain much of assemble language, most of the code is written in C language, which makes it easier to understand. 

Finally, developments are going on to boot other operating systems apart from Linux using
LinuxBIOS.

LinuxBIOS requires the Linux OS to be packaged together along with the BIOS. So there are only two ways to boot another version of the Linux OS. One is to burn the new Linux version with the same LinuxBIOS each time when you plan to use a new Linux version. 

Second, use utilities like kexec or boot.img. These utilities let you boot another version of the Linux OS from the current one. 

These utilities also have their own limitations. Finally, one more disadvantage of LinuxBIOS is that it doesn’t support industry specifications like
APM.

Vendors supporting LinuxBIOS include Cluster Labs, CW Linux, i-TECH Corp, Linux Labs, Linux NetworX, and O.N.E
Technologies. 

The source code and images of LinuxBIOS can be downloaded from http://www.linuxbios.org/index.html.

Sivakumar Subramani Wipro Technologies

No Comments so far

Jump into a conversation

No Comments Yet!

You can be the one to start a conversation.

Your data will be safe!Your e-mail address will not be published. Also other data will not be shared with third person.