Jump to content

Coreboot

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 160.36.119.134 (talk) at 20:54, 5 March 2007. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

LinuxBIOS
Original author(s)Ronald G Minnich
Repository
Platformx86
TypeFirmware (BIOS)
LicenseGNU General Public License
Websitewww.linuxbios.org

LinuxBIOS is a free software project, endorsed by the Free Software Foundation [1], aimed at replacing the proprietary BIOS firmware found in most computers with a lightweight BIOS designed to perform only the minimum of tasks necessary to load and run a modern 32-bit operating system. The LinuxBIOS project was started in the winter of 1999 in the Advanced Computing Laboratory at Los Alamos National Laboratory.[2] It is licensed under the GNU General Public License. Main contributors have been LANL, AMD, coresystems GmbH and Linux Networx, Inc.

Google sponsors the LinuxBIOS project.[3]

General information

LinuxBIOS usually loads a Linux kernel, but it can load any other stand-alone ELF executable, such as etherboot which can boot Linux from a boot server or ADLO which loads Microsoft Windows 2000/XP. LinuxBIOS can also load almost any operating system from any supported device, such as Myrinet, Quadrics, or SCI cluster interconnects. Some OSes require legacy BIOS functions (such as Windows XP) and will not run without adaptation.

LinuxBIOS does whatever hardware initialization Linux doesn't do and lets Linux finish the hardware initialization.

A unique feature of LinuxBIOS is that the x86 version runs in 32-bit mode after executing only sixteen instructions (almost all other x86 BIOSes run exclusively in 16-bit mode). Running in 32-bit mode makes it run very fast[citation needed], its current cold boot record is 3 seconds to command interface.

Although "Linux" is in the name, LinuxBIOS can boot other kernels, or pass control to a boot loader to boot a kernel/image instead. It can also boot a Plan 9 from Bell Labs kernel directly. A LinuxBIOS capable version of grub2 is still in development.

Developing and debugging LinuxBIOS

Since LinuxBIOS must initialize the bare hardware, it must be ported to every chipset and motherboard that it supports. Before initializing RAM, LinuxBIOS initializes the serial port (addressing Cache and Registers only), so it can send out debug text to a connected terminal emulator. It can also send byte codes to port 0x80 that are displayed on a two-hex-digit display of a connected POST card. Another aid is the BIOS Savior, which is a combination of two BIOS devices that plugs into the BIOS socket and has a manual switch to select between them. A more expensive alternative is an EPROM/flash programmer. There are also CPU emulators that either replace the CPU or connect via a JTAG port. Code can be built on, or downloaded to, BIOS emulators rather than flashing the BIOS device.

Initializing DRAM

The most difficult hardware that LinuxBIOS initializes is the DRAM controllers and DRAM. In some cases, technical documentation how to do this is NDA protected or unavailable - rendering it impossible to build a LinuxBIOS. RAM setup is particularly difficult because until the RAM is initialized, there is no RAM available for use. The way to initialize DRAM controllers and DRAM without using RAM is to use the CPU's general purpose registers. To make this hard task easy, a C compiler that uses registers instead of RAM, called romcc, was built. Using romcc, it is relatively easy to make SMBus accesses to the SPD ROMs of the DRAM DIMMs, that allows the RAM to be used. With newer x86 processors, the processor cache can be used as RAM until DRAM is initialized. The processor cache has to be initialized into Cache-as-RAM mode as well, but this needs fewer instructions than initializing DRAM.

See also

References