Sunday November 22, 2009 8:03 AM AEST

Inside your system BIOS

  • Email a Friend
  • Print Page
Inside your system BIOS
By Ashton Mills
May 5, 2008
Tags: bios | efi | modding | flashing

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.

The latest issue is on sale now!

Want to learn all about Diablo III? Want to find out what the best Solid State Drive is on the market today, and how to look after it? Want to catch up on the latest hardware, games and in depth tech from Australia's best enthusiast mag?

Get your copy today :)
Comments

Be the first to comment on this article.
Thoughts on this article? Add a comment below.
Login or register to submit a comment.
 
 
 
Atomic Magazine

Issue: 107 | December, 2009

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
"TonyB Wouldn't Win 7 SP2 be classified as Vista SP 5??"
by sUpEr gEEk | Nov 22, 2009 7:19 AM
 
"happy morning to you all. decided to make use of my optus off-peak usage and watch the HD ..."
by SlickGrunt | Nov 22, 2009 5:48 AM
 
"Signed"
by Vanoyen | Nov 22, 2009 3:32 AM
 
"Holy shit, batman.

*runs"
by colganaitor | Nov 21, 2009 7:17 PM
 
""sudo preupgrade"
...failed to download installer metadata
------------
So ..."
by wlayton27 | Nov 21, 2009 8:16 AM
Latest User Reviews
Shenmue II
10%
asdfasdf
 
EVGA X58 Classified
90%
great board, a few things could be better
 
EVGA X58 Classified
90%
Gorgeous looking
 
Sapphire 4890
90%
So good, I immediately wanted a second one!
 
MSI 790FX-GD70 motherboard
90%
Allmost the prefect gaming board