The job of the BIOS

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
Cervby
Posts: 4
Joined: Fri Dec 14, 2012 12:29 am

The job of the BIOS

Post by Cervby »

When I searched "bios" on google I found some sites that Said that the purpose of the BIOS also is to manage comunication between different hardware(keyboard, Hard drive, Graphics card, etc.), and I found some sites that didn'say anything about that. I thought the BIOS Only was used with BIOS functions in real mode.

Is the BIOS used while the os is running in modern operating systems?
rdos
Member
Member
Posts: 3297
Joined: Wed Oct 01, 2008 1:55 pm

Re: The job of the BIOS

Post by rdos »

Cervby wrote: Is the BIOS used while the os is running in modern operating systems?
Simple answer: No. The video BIOS might be used in V86 mode to switch modes dynamically, but other than that it isn't used.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: The job of the BIOS

Post by Brendan »

Hi,
Cervby wrote:When I searched "bios" on google I found some sites that Said that the purpose of the BIOS also is to manage comunication between different hardware(keyboard, Hard drive, Graphics card, etc.), and I found some sites that didn'say anything about that. I thought the BIOS Only was used with BIOS functions in real mode.

Is the BIOS used while the os is running in modern operating systems?
Most things depend on perspective. From my perspective "BIOS" is just an API (a set of interrupts that provide services to other software), that software could use to (for example) read/write data to disk, get keyboard input from user, etc.

The firmware is a larger thing, and includes initialising and testing parts of the computer (RAM chips, etc) during boot. Firmware may implement the "BIOS API" (and might implement UEFI instead, or both UEFI and BIOS). In addition, firmware may use SMM (System Management Mode) to do things in the background while an Operating System is running (typical examples include PS/2 keyboard and mouse emulation until the OS sets up USB drivers, and power management until the OS starts using ACPI).

From this perspective; you could say that (for most modern OSs) BIOS doesn't do anything in the background while an OS is running; but the firmware does do some things in the background while an OS is running.

However; people might use the terms "BIOS" and "firmware" interchangeably (e.g. saying "BIOS" when they really mean "firmware"). This is just a habit from when the firmware in all PC compatible systems provided the BIOS interface and no other interface/s.


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Antti
Member
Member
Posts: 923
Joined: Thu Jul 05, 2012 5:12 am
Location: Finland

Re: The job of the BIOS

Post by Antti »

What do you think would it had been reasonable to keep developing BIOS interfaces to support Protected Mode or even Long Mode also? Of course there might be some small technical details that cause problems. But if we are looking the big picture? What if there were well documented interfaces for networking, for example? This development path could have made things very different. Perhaps there were plenty of other mainstream operating systems.

UEFI might try to do something similar with the runtime services but I am not very convinced.
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: The job of the BIOS

Post by Owen »

Antti wrote:What do you think would it had been reasonable to keep developing BIOS interfaces to support Protected Mode or even Long Mode also? Of course there might be some small technical details that cause problems. But if we are looking the big picture?
The BIOS services are pretty much derived from the CP/M BDOS. They're entirely designed for a single tasking operating system - multitasking OSes couldn't use them, so extending them was purposeless
Antti wrote:What if there were well documented interfaces for networking, for example? This development path could have made things very different. Perhaps there were plenty of other mainstream operating systems.
There actually is! Look up UNDI - any NIC capable of PXE should supply a UNDI driver
Antti wrote:UEFI might try to do something similar with the runtime services but I am not very convinced.
UEFI runtime services are almost entirely restricted to the interactions with the firmware needed at runtime (e.g. setting UEFI NVRAM variables).
Post Reply