In electronic systems and computing, firmware is a term often used to denote the fixed, usually rather small, programs and/or data structures that internally control various electronic devices.  firmware is typically involved with very basic low-level operations without which a device would be completely non-functional.

Low-level firmware typically resides in a PLA structure or in a ROM (or OTP/PROM), while higher level firmware typically employs flash memory to allow for updates, at least in modern devices. (Common reasons for updating firmware include fixing bugs or adding features to the device. Doing so usually involves loading a binary image file provided by the manufacturer into the device, according to a specific procedure; this is sometimes intended to be done by the end user.)

Until the mid 1990s, updating firmware to a new version typically involved replacing a storage-medium containing firmware, usually a socketed ROM. As of 2009 firmware-upgraders have largely abandoned this approach in favor of using firmware’s capability to overwrite itself in a convenient, purely electronic operation called “flashing”

Currently, devices like video cards, sound cards or modems in a modern PC often rely on firmware dynamically loaded by a device driver and may thus get transparently updated through the operating system update mechanisms.

Most computer peripherals are themselves special-purpose computers. While external devices (printers, scanners, cameras, USB drives,…) have firmware stored internally, modern graphics cards and peripheral expansion cards often have parts of the firmware loaded by the host system at start-up, as this provides greater flexibility. Such hardware may therefore fail to function fully until the host computer has “fed” it the requisite firmware, typically via a specific device driver (more exactly: via a start-up subsystem within a device driver package). Modern device drivers, whether for internal or external “peripheral” devices, may also expose a direct graphical user-interface for configuration, often using parts of a normal application programming interface in addition to lower level operating system calls, hooks, and/or other interfaces designed for device drivers.

In IBM PC compatible computers, the basic input/output system (BIOS), also known as the System BIOS or ROM BIOS (pronounced /ˈbaɪ.oʊs/), is a de facto standard defining a firmware interface.

A BIOS will also have a user interface (or UI for short). Typically this is a menu system accessed by pressing a certain key on the keyboard when the PC starts. In the BIOS UI, a user can:

configure hardware
set the system clock
enable or disable system components
select which devices are eligible to be a potential boot device
set various password prompts

The BIOS provides a small library of basic input/output functions used to operate and control the peripherals such as the keyboard, text display functions and so forth, and these software library functions are callable by external software. In the IBM PC and AT, certain peripheral cards such as hard-drive controllers and video display adapters carried their own BIOS extension Option ROM, which provided additional functionality.

The first flash chips were attached to the ISA bus.  Starting in 1997, the BIOS flash moved to the LPC bus, a functional replacement for ISA, following a new standard implementation known as “firmware hub” (FWH).  In 2006, the first systems supporting a Serial Peripheral Interface (SPI) appeared, and the BIOS flash moved again.

The size of the BIOS, and the capacities of the ROM, EEPROM and other media it may be stored on, has increased over time as new features have been added to the code; BIOS versions now exist with sizes up to 16 megabytes. Some modern motherboards are including even bigger NAND flash memory ICs on board which are capable of storing whole compact operating system distribution like some Linux distributions.

In modern PCs the BIOS is stored in rewritable memory, allowing the contents to be replaced or ‘rewritten’. This rewriting of the contents is sometimes termed flashing. This can be done by a special program, usually provided by the system’s manufacturer, or at POST, with a BIOS image in a hard drive or USB flash drive. A file containing such contents is sometimes termed ‘a BIOS image’. A BIOS might be reflashed in order to upgrade to a newer version to fix bugs or provide improved performance or to support newer hardware, or a reflashing operation might be needed to fix a damaged BIOS. A BIOS may also be “flashed” by putting the file on the root of a USB drive and booting.

EEPROM chips are advantageous because they can be easily updated by the user; hardware manufacturers frequently issue BIOS updates to upgrade their products, improve compatibility and remove bugs. However, this advantage had the risk that an improperly executed or aborted BIOS update could render the computer or device unusable. To avoid these situations, more recent BIOSes use a “boot block”; a portion of the BIOS which runs first and must be updated separately. This code verifies if the rest of the BIOS is intact (using hash checksums or other methods) before transferring control to it. If the boot block detects any corruption in the main BIOS, it will typically warn the user that a recovery process must be initiated by booting from removable media (floppy, CD or USB memory) so the user can try flashing the BIOS again. Some motherboards have a backup BIOS (sometimes referred to as DualBIOS boards) to recover from BIOS corruptions

BIOS is primarily associated with the 16-bit, 32-bit, and the beginning of the 64-bit architecture eras, while EFI is used for some newer 32-bit and 64-bit architectures.

The role of the BIOS has changed over time; today BIOS is a legacy system, superseded by the more complex Extensible Firmware Interface (EFI), but BIOS remains in widespread use, and EFI booting has only been supported in Microsoft’s operating system products supporting GPT and Linux kernels 2.6.1 and greater builds (and in Mac OS X on Intel-based Macs)

Computer literature commonly uses “EFI” to refer to “UEFI”.

The Unified Extensible Firmware Interface (UEFI) is a specification that defines a software interface between an operating system and platform firmware. UEFI is a more secure replacement for the older BIOS firmware interface present in all IBM PC-compatible personal computers that makes them vulnerable to bootkits.

The original EFI (Extensible Firmware Interface) specification was developed by Intel. From 2005, development of the EFI specification ceased in favour of UEFI, which was evolved from EFI 1.10.

UEFI is not restricted to any specific processor architecture and can run on top of (or instead of) traditional BIOS implementations.

UEFI firmware provides several technical advantages:[9]

Ability to boot from large disks (over 2 TiB)
Faster boot-up
CPU-independent architecture
CPU-independent drivers
Flexible pre-OS environment, including network capability
Modular design

In addition to the standard PC disk partition scheme, which uses a master boot record (MBR), EFI works with a new partitioning scheme: GUID Partition Table (GPT). GPT does not suffer from many of the limitations of DOS MBR. In particular, the DOS MBR limits on the number and size of disk partitions (up to 4 partitions per disk, up to 2.2 TB (241 bytes) per disk) are relaxed. GPT allows for a maximum disk and partition size of 9.4 ZB (273 bytes). The EFI specification does not prescribe any particular file system.

The only Microsoft Windows versions that can boot from disks larger than 2.2 TB are 64-bit Windows Vista/7, Windows Server 2008 and later, as well as the Itanium versions of Windows Server 2003 and Windows XP.

The BIOS is limited to a 16-bit processor mode and 1 MB of addressable space due to the design being based on the IBM 5150 which used the 16-bit Intel 8088.  In comparison, the UEFI processor mode can be either 32-bit (x86-32, ARM) or 64-bit (x86-64 and Itanium).  64-bit UEFI understands long mode which allows applications in the pre-boot execution environment to have direct access to all of the memory using 64-bit addressing.

EFI defines two types of services: boot services and runtime services. Boot services are only available while the firmware owns the platform (before the “ExitBootServices” call). Boot services include text and graphical consoles on various devices and bus, block and file services. Runtime services are still accessible while the operating system is running; they include services such as date, time and NVRAM access.

All EFI drivers must provide services to others via protocols.

In addition to standard architecture-specific device drivers, the EFI specification provides for a processor-independent device driver environment, called EFI Byte Code or EBC. System firmware is required by the UEFI specification to carry an interpreter for any EBC images that reside in or are loaded into the environment.

An EFI boot manager is also used to select and load the operating system, removing the need for a dedicated boot loader mechanism (the OS boot loader is an EFI application).

EFI provides a shell environment. The shell can be used to execute other EFI applications.

Extensions to EFI can be loaded from virtually any non-volatile storage device attached to the computer.

An operating system that can be booted from a (U)EFI is called a (U)EFI-aware OS, defined by (U)EFI specification. Here the term booted from a (U)EFI means directly booting the system using a (U)EFI OS loader stored on any storage device.

Linux has been able to use EFI at boot time since early 2000, using the elilo EFI boot loader or, more recently, EFI versions of GRUB.

Apple uses EFI for its line of Intel-based Macs. Mac OS X v10.4 Tiger for Intel and Mac OS X v10.5 Leopard implement EFI v1.10 in 32-bit mode, even on 64-bit CPUs (newer Macs have 64-bit EFI)

Microsoft introduced UEFI for x86-64 Windows operating systems with Windows Server 2008 and Windows Vista Service Pack 1, so the 64-bit versions of Windows 7 are compatible with EFI.

Microsoft does not implement 32-bit UEFI since vendors did not have any interest in producing native 32-bit UEFI firmware because of the mainstream status of 64-bit computing.

Microsoft will require computers with the “Designed for Windows 8″ logo to use UEFI with secure booting enabled by default.

Related External Links

This entry was posted in Notes and tagged , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>