Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How is the BIOS used by a modern OS?

What's the function of the BIOS in a modern OS? Is it still used after booting? And is there some kind of BIOS API?

like image 304
compie Avatar asked Mar 29 '10 18:03

compie


People also ask

How does a OS work with BIOS?

BIOS identifies, configures, tests and connects computer hardware to the OS immediately after a computer is turned on. The combination of these steps is called the boot process. These tasks are each carried out by BIOS' four main functions: Power-on self-test (POST).

Do modern computers use BIOS?

In modern PCs running modern operating systems (such as Windows and Linux) the BIOS interrupt calls is used only during booting and initial loading of operating systems. Before the operating system's first graphical screen is displayed, input and output are typically handled through BIOS.

How a modern computer system works in OS?

It takes information or data from one end, store it to process, and finally, after completing the processing, it output the result on the other hand. The information it takes at one end is known as Computer Input, and the result that it provides after processing is known as Computer Output.

Does the OS manage the BIOS?

The operating system does not work alone. It depends not only on the cooperation of other programs, but also on meshing smoothly with the BIOS and software drivers. The BIOS-or basic input/output system is made of code contained on chips in a Pc.


2 Answers

The BIOS is still the first thing that runs on the just-started CPU and responsible for getting the motherboard hardware turned on, setting basic chipset modes and registers, initializing some hardware, and running the code that loads the kernel.

The BIOS is usually not used once the kernel is loaded, and depends on a 16-bit execution environment as opposed to the 32- or 64-bit protected mode environment that a modern kernel operates in.

The boot loader normally does require the BIOS IO calls to get the kernel into memory. The BIOS is being replaced even in this role by newer boot-time software such as Coreboot to provide faster boot times. EFI will one day replace the traditional BIOS, and hopefully the boot loader, passing control directly to the kernel after loading it from storage.

The discovered hardware configuration, memory range settings, and ACPI metadata tables are probably the only BIOS-based data used by the OS after the kernel is loaded. Any runnable ACPI code is encoded as ACPI Machine Language and is interpreted by the OS.

Any good traditional book on MS-DOS assembly programming will include information on the BIOS programming interface. Check out The Art of ASSEMBLY LANGUAGE PROGRAMMING

like image 174
Joe Koberg Avatar answered Sep 28 '22 18:09

Joe Koberg


I wrote BIOS for notebook computers for several years. The BIOS does a lot of things while the OS is running.

A major task is to inform the OS when many events happen so the OS can look smart (as if it somehow figured these things out on its own). For example, the BIOS tells the OS when: the power button is pressed, batteries are inserted or removed, AC power comes or goes, the system connects to or disconnects from a docking station, hard drives and or certain types of optical drives are inserted or removed.

Most portable computers have features that you can access/control through Fn keys and through OS-level applications provided by the manufacturers. The BIOS responds to these hotkeys and has code to interface with the OS-level apps. Features like controlling screen brightness (which certain OSes want to appear to control) or controlling bling LEDs fall into this category.

Perhaps the most important task of the BIOS is to shut down the system when the power button is held down for more than 4 seconds (to recover from OS hangs!).

like image 20
ReluctantBIOSGuy Avatar answered Sep 28 '22 19:09

ReluctantBIOSGuy