LOGO

BIOS After Boot: What Happens Next?

September 18, 2012
BIOS After Boot: What Happens Next?

The Role of BIOS After System Boot

After your computer has completed the startup sequence and the operating system is fully loaded and running, one might question whether the BIOS still has any functions to perform.

BIOS Responsibilities Beyond Initial Startup

While the BIOS (Basic Input/Output System) is most visibly active during the boot process, its duties don't entirely cease once the operating system takes control.

The BIOS continues to provide low-level control of the computer’s hardware. This includes managing communication between the operating system and devices like the hard drive, keyboard, and display.

Ongoing Hardware Management

Specifically, the BIOS offers routines for accessing and controlling hardware components. The operating system utilizes these routines when it needs to interact with the hardware directly.

For example, when you save a file, the operating system doesn’t directly write to the hard drive. It requests the BIOS to handle the low-level data transfer.

Power Management and System Monitoring

Furthermore, the BIOS often handles power management functions. It can control things like fan speeds and voltage levels to optimize energy consumption.

It also continuously monitors system health, checking temperatures and voltages, and reporting any issues that may arise.

Source of the Question

This question and its answer originated from SuperUser, a question-and-answer website that is part of the Stack Exchange network.

SuperUser is a community-driven platform where users can ask and answer technical questions related to computing.

BIOS Functionality Beyond Startup

A SuperUser user, Indrek, recently inquired about the role of the BIOS beyond the initial boot process. His question centers on whether the BIOS maintains any functionality once the operating system has taken control.

The Initial Role of the BIOS

The BIOS (Basic Input/Output System) is fundamentally responsible for several key tasks upon system power-on. These include performing the Power-On Self-Test (POST), initiating the bootloader, and ultimately transferring control to the operating system.

Does the OS Interact with the BIOS?

The core of Indrek’s question asks if communication continues between the operating system and the BIOS after the OS has begun running. The answer is yes, although the nature of this interaction is often subtle.

BIOS Services During OS Operation

While the OS largely manages hardware directly, it frequently relies on the BIOS for low-level hardware access. This is particularly true for tasks that require direct interaction with hardware components without going through device drivers.

Specific Examples of BIOS Interaction

Here are some instances where the operating system might utilize BIOS services:

  • Interrupt Handling: The OS can leverage BIOS interrupts for specific hardware operations.
  • Low-Level Hardware Access: Accessing certain hardware features not fully supported by the OS or device drivers.
  • System Configuration: Retrieving system configuration information stored within the BIOS.

Legacy Support and Compatibility

The BIOS also provides a layer of compatibility for older hardware and software. This ensures that systems can continue to function with devices that may not have modern driver support.

Modern Systems and UEFI

It’s important to note that modern systems are increasingly utilizing UEFI (Unified Extensible Firmware Interface) instead of the traditional BIOS. UEFI offers enhanced features and capabilities, but the fundamental principle of providing low-level hardware access during OS operation remains consistent.

Therefore, the BIOS, or its modern equivalent UEFI, doesn’t simply become inactive after the operating system loads. It continues to provide essential services and support throughout the system’s operation.

The Evolving Role of the BIOS

As explained by Mechanical Snail on SuperUser, the function of the BIOS has undergone significant changes over time. Today, its primary purpose is simply to initiate the operating system’s loading process and then relinquish control.

The Diminished Role of the BIOS

Historically, older operating systems, such as MS-DOS, heavily depended on the BIOS for numerous tasks, including disk access, through the use of interrupt calls.

Modern operating systems, however, operate differently. The bootloader swiftly transitions to 32- or 64-bit mode and directly launches the OS kernel.

The kernel then has the capability to register its own interrupt handlers, accessible to applications running in user space. This approach offers several advantages.

These include improved portability, greater flexibility, enhanced sophistication, and heightened security. The OS can manage resource access and implement custom permission schemes.

Operating systems now utilize their own device drivers to interact with hardware, reducing the need to call BIOS routines. For security reasons, BIOS interrupts are often disabled.

Although its use is limited during OS operation, the BIOS still plays a peripheral role. For instance, during sleep mode, the firmware manages hardware states for pausing and resuming the OS.

These functions typically involve ACPI calls, an extension of the BIOS that places power management under the operating system’s control. ACPI differs from the traditional BIOS-centric system.

It’s important to note that “BIOS” technically refers to a specific firmware interface, but the term is often used generically for all computer firmware. Some newer systems, particularly those from Apple, have adopted UEFI in place of the traditional BIOS.

Further details on the historical decline in the BIOS’s role can be found on Wikipedia.

what-does-my-bios-do-after-booting-1.jpg

Simon Richter, another SuperUser contributor, provides an overview of the remaining functions performed by the BIOS.

BIOS and Power Management Functions

The BIOS continues to offer several services to operating systems, primarily related to power management. These include:

  • Adjusting CPU and bus speeds.
  • Enabling or disabling motherboard devices.
  • Controlling power to expansion ports.
  • Managing suspend-to-disk and suspend-to-RAM operations.
  • Configuring resume event settings.

While suspend-to-disk is often handled by the OS for faster restoration, the functionality remains within the BIOS specification.

Suspend-to-RAM, however, requires BIOS support. The OS must instruct the BIOS to preserve the RAM contents during the suspend process.

The interface between the OS and the BIOS utilizes a virtual machine code emulator. This generates the necessary I/O operations to interact with the hardware.

For suspend operations, executing specific hardware writes triggers an interrupt, transferring control to the BIOS.

Do you have additional insights to share? Please contribute in the comments section. For a more comprehensive discussion and further answers from other tech experts, visit the original Stack Exchange thread here.

#BIOS#boot process#system startup#POST#firmware#computer basics