Chapter 31: Legends and Myths about Flashing BIOS

image from book  Download CD Content

Overview

No other PC component is surrounded by as many myths, legends, and rumors as the Basic Input/Output System (BIOS). But its mystical influence on the performance and stability of the system is strongly overexaggerated. Striving for new BIOS versions isn't worth the time and effort you might spend on it. This chapter considers the most important issues related to BIOS, explains when and how you should update it, and describes the benefits would you gain after doing this. Despite the titanic efforts of hardware manufacturers, updating BIOS still remains a nontrivial task available only to advanced users and characterized by many specific features that are not self-evident at first glance. To begin with, there are lots of BIOS models from different manufacturers, and the differences among them are considerable (Fig. 31.1). Nevertheless, hopefully, this operation will soon become as simple and easy as installing and removing standard applications. For example, the Award WinFlash program allows you to update BIOS without exiting Windows (Fig. 31.2).

image from book
Figure 31.1: There are various types of BIOS
image from book
Figure 31.2: The Award WinFlash program allows you to update BIOS without exiting Windows

The future is dark and unpredictable, so instead of pretending to be a prophet I will proceed with considering BIOS-related issues important today.

BIOS is a complex set of hardware and software intended for serving the motherboard components and main peripheral devices (such as hard disks, CD/DVD drives , and modems). Architecturally, BIOS is a memory chip connected to the south bridge of the chipset (Fig. 31.3) that stores all microprograms and some configuration settings. The remainder of the configuration settings are stored in the CMOS chip powered by a battery.

image from book
Figure 31.3: Depending on the design, BIOS is connected to the south bridge using either an ISA bus or a special-purpose internal bus

Microprograms are stored in the packed form (for example, in Award BIOS this is a sequence of LHA archives separated by checksums). This sequence of archives is followed by the unpacked BOOTBLOCK , which gains control at system start-up and automatically unpacks the main BIOS code into the main memory. This complicates disassembling of BIOS code. Thus, hackers must excessively use their hands and brains .

Microprograms can be classified into the following types (note that the names are conventional and need not correspond to the names encountered in BIOS implementations ):

  • BOOTBLOCK ” BIOS loader, which is responsible for chipset initialization at start-up, unpacking the main part of BIOS, and loading it into the main memory. BOOTBLOCK also checks the BIOS checksum and starts the emergency recovery program or switches to the standby BIOS (see " BIOS Versions That Can Stick up for Themselves " for more details).

  • bios.rom ” Main code of BIOS that initializes and tests hardware.

  • xxxext.rom ” Various extensions of the main part of BIOS. In particular, these extensions output information about the hardware configuration or information from the sensors.

  • cpucode.bin ” Updated set of the microprograms that fix the manufacturer's bugs .

  • acpi.bin ” Low-level Advanced Configuration and Power Interface (ACPI) components responsible for hibernation and wakening ACPI devices. These components are called by the operating system.

  • pnp.bin ” Low-level components of the PNP Manager that distribute system resources among devices, supply the operating system with information about the hardware configuration, and notify it about events related to adding new devices to the system or removing existing ones.

  • CALLBACK ” All other microprograms called by the operating system as necessary.

Configuration settings, in turn , are divided into the following types (their names are generally adopted):

  • LOGO ” A color image displayed on the BIOS black screen.

  • ESCD (Extended System Configuration Data) ” data block that stores information about PnP devices.

  • DMI (Desktop Management Interface) ” Data block that contains information about the system hardware.

Usually, only the main block, which includes bios.rom, xxxext.rom, and cpu-code.bin, acpi.bin, pnp.bin and CALLBACK modules, is overwritten when updating BIOS. Sometimes, this block isn't overwritten entirely and only a small part of this block is updated (for example, acpi.bin, which is known as the most faulty one).

Normal operating systems (such as Windows XP) do not use BIOS in the course of data exchange, and all input and output operations are carried out through ports and Direct Memory Access (DMA). BIOS only configures devices, by specifying their initial parameters and operating modes, but the operating system can reconfigure everything at its own discretion. The type of data exchange with the drive is set by slow programmed input/output in BIOS settings, which won't prevent the driver from using Ultra DMA. However, some devices are configured only once and do not support the possibility of dynamic configuration. In particular, this relates to bus controllers and memory controllers. However, such devices are gradually becoming fewer in number.

Thus, BIOS has no direct effect on the system performance. Windows NT 4.x doesn't even map BIOS code to its address space. Windows 2000 and Windows XP, in contrast to their predecessor, do this mapping, but only because contemporary BIOS implementations contain low-level components of PNP Manager and ACPI Manager, which cause a persistent headache for driver developers. Note that these low-level components represent the "original sin," which is the origin of most bugs and critical errors.



Shellcoder's Programming Uncovered
Shellcoders Programming Uncovered (Uncovered series)
ISBN: 193176946X
EAN: 2147483647
Year: 2003
Pages: 164

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net