Friday February 10, 2012 11:30 AM AEST

Inside your system BIOS

By Ashton Mills
11:21 May 5, 2008
Tags: bios | efi | modding | flashing
Inside your system BIOS

At the heart of every system lies an old, but vital component - the humble BIOS. Ashton Mills takes a closer look.

If the CPU is the brain of your system, then the BIOS is the amygdala - the primitive, legacy, yet still essential core of your system. For as long as we’ve had our PCs we’ve had a BIOS, but just what’s it good for and why do we still need it?

The inner BIOS
Directly, the BIOS (Basic Input Output System) is a flash ROM that contains software to kick-start your system. This includes initialising memory, video, processor, clock generator, system chipsets, PCI devices and hard drives. Overall, this is known as the POST (Power On Self Test). It also provides a basic means to interface with components like the keyboard and screen, and performs a number of other critical functions - configuration, resource allocation, interrupt handling, and the boot sequence.

Configuration is something we’ve all come to know and love about our system’s BIOS. Any half-decent motherboard will allow you to tweak voltages, clock rates, timings and multipliers - but it hasn’t always been this way. It wasn’t until enthusiast computing became mainstream that these options were even made available to the general public, and many OEM systems (such as those from Dell or HP for example) completely hide or don’t include code to tweak many of the options we know from enthusiast boards.

Resource allocation is the BIOS assigning resources like interrupts (IRQs, Interrupt Requests) to the various components of your system. Traditionally, there are four interrupt lines that onboard and PCI devices share. This is why, despite being in different slots, some cards can be found to share an interrupt. Usually, this isn’t a bad thing except for some devices like sound cards, and here using a motherboard manual to determine which slots use which interrupt lines can help ensure sound cards get a dedicated IRQ.

Additionally, IRQs are allocated to more than just your video card, sound card or SATA controller. The system clock, keyboard, USB and other devices all need an IRQ as well. Today, although the BIOS still assigns IRQs (if only to get the system to a ready state) operating systems like Windows and Linux have the ability to re-assign IRQs for most devices, which can be especially important for devices that require drivers to properly operate from boot up.

Interrupt handling is the act of responding to hardware events, such as a key press or packets coming from a network card. Interrupts allow hardware to signal the CPU that they need attention. When this happens the CPU can pause what it’s doing and attend to the device before resuming its operation. Interrupts are vital to the operation of all hardware, and allow the CPU to continue on working while devices perform their functions without waiting for them to finish.

Finally, the boot sequence is of course the hard-coded system initialisation that happens every time you turn the machine on and usually starts with a POST and ends with the CPU seeking to load the boot sector of the primary drive into memory and the BIOS handing over control to it. For hard drives, the MBR (Main Boot Record) is loaded and this can point to boot sectors residing on any number of partitions. Naturally, this then kicks in to boot your chosen operating system. Without a BIOS and a boot sector, a machine will be unbootable. The boot sequence also initialises other BIOS’ in the system - primarily the video BIOS, but also of any pluggable or onboard storage cards like RAID controllers. Any errors encountered are usually communicated via beep codes as, in some cases, the errors might be preventing video display itself.

Modding and flashing
Of course, where would BIOS’ be without modding and flashing? For the hardcore, flashing is common to allow new features or compatibility to be added to a system. It has some risks, though rare, as power failures or flashing the wrong BIOS could render a system dead. This is, of course, the impetus for Gigabyte’s Dual BIOS feature that automatically boots the backup BIOS if the first one fails to respond. But how can a dead BIOS be detected if the BIOS itself is dead? Even flashable BIOS’ have a boot block that runs first and is used to run a checksum on the rest of the BIOS. It’s the boot block that runs the very basic code of searching for a replacement BIOS on floppies when it detects a corrupted BIOS, and has saved many a BIOS flasher’s hide.

click to view full size image


Modding BIOS’ is a little bit trickier, but can be handy for piecing together components like new onboard RAID BIOS’ paired with the system’s BIOS. Usually, this can be done without too much trouble and you can build a new BIOS out of modules.

Alternative BIOS
Even though you’re probably used to names like Phoenix, Award, or American Megatrends when it comes to the BIOS of systems, there are wide range of BIOS vendors. Years ago, there was even a third-party BIOS by the name of Mr.BIOS from Microid Research in the early 90s. Though now defunct, Mr.BIOS presented an alternative model to the PC’s BIOS that is today again taking off.

The original Mr.BIOS was made to work with a limited range of motherboards, but offered increased functionality over mainstream BIOS’ at the time. It offered, for example, RAID functionality without the need for a separate RAID controller, and it worked rather well - although Windows had to be told to access the ‘BIOS RAID’ as an ‘Int13’ device, aka directly.

Today, the complexity of hardware and the high rate of churn for motherboards doesn’t often allow third-party BIOS’ to be practical, but there are still two key and somewhat opposing alternatives:

Linux BIOS is a free software project aimed at replacing proprietary BIOS’. It’s designed to perform simple hardware initialisation and then run a payload that can include boot managers like GRUB, or even a Linux kernel. Linux BIOS is already used extensively for embedded devices, as well as the popular OLPC (One Laptop Per Child). It’s also designed to be extremely fast, and can boot to a Linux console in three seconds. The range of currently supported motherboards on the Linux BIOS homepage isn’t huge, but does include popular architectures like VIA EPIA based boards, server systems, and even a few ASUS boards.

EFI (the Extensible Firmware Interface), officially known as Unified EFI (UEFI) is, like Linux BIOS, intended as a replacement for the age-old PC BIOS. Originally developed by Intel, the EFI specification details unique boot services and even consoles directly accessible via EFI (i.e. before an OS is loaded). It also allows processor independent device drivers, meaning video or network devices could be driven before an OS and its drivers are loaded. Finally, EFI can include a boot manager, negating the need for third-party boot managers.

Vista was touted to support EFI originally, but lack of uptake of the new BIOS has seen very few hardware implementations. The exception is Apple, which adopted EFI for its Intel-based Macs, and so all recent versions of OS X support and use EFI. Because of its proprietary nature and ability to control hardware without an OS loaded, there are fears EFI could be used to forcibly limit users, and be abused as a form of DRM.

Although the BIOS once had a primitive role, these days they are much more complex with ACPI (Advanced Configuration and Power Interface) support and both power and thermal management features. All in all, this legacy from the early PC days is still with us and still an essential part of every PC. EFI may eventually make it obsolete, but it hasn’t gone just yet.

 
 
This article appeared in the October, 2007 issue of Atomic.

Behind the scenes with Mass Effect 3! GTX 560 VGA round-up! Essential Skyrim tweaks to improve your game! Plus reviews, news, hardware, more games, and easy to following modding guides for PC builders. ON SALE NOW!
 
Latest Competitions
 
Atomic Magazine

Issue: 133 | February, 2012

Atomic is a magazine aimed squarely at computer enthusiasts, gamers, and serious PC upgraders.

Every month we bring you the latest reviews of new technology and PC components, in depth features on everything from overclocking to console hacking, and gaming previews and interviews.
 
Latest Comments
 
Latest User Reviews
Battlefield 3 is the new benchmark online FPS
90%
A very fun and realistic multiplayer ride.
 
Antec Kuhler 920 - liquid cool
90%
Antec Kuhler 920 silent but effientive out of the box no maintence water cooling kit
 
Antec's Lanboy Air - our new favourite case
90%
Antec Lan boy Air in red a very cool design
 
Antec's Lanboy Air - our new favourite case
90%
This product overall is awesome.
 
MSI's GT780 laptop as fast as it gets
90%
Nice laptop
 
 
Close Get the February, 2012 issue of Atomic mailed to you for $8.95, including postage.

SubscribeBuy nowDigital Version