This is a philosophical question that I am posing here for discussion.
What should the purpose of the BIOS be?
In my mind, the BIOS should be a minimal piece of code, used only to
initialize the hardware to the extent needed to boot the system. This would
include initializing the memory space and boot device, reading the first
block of code from the boot device and turning control over to that block
of code. This "boot block" would then finish initializing the hardware,
loading API's, OS's or whatever, from the boot device.
I believe that all API level services should be provided by the boot block
code that is loaded by the BIOS and not by the BIOS itself.
The idea of the BIOS providing an API is something that developed in the
early days of PC's when each card had its own BIOS/API supplied in ROM on
the card. IBM and the clone makers quickly tried to consolidate these
separate BIOS blocks into a single EPROM. The problem with this solution is
that the BIOS is not flexible, it is very hardware dependent, is optimized
for a single OS and is very complex.
A simple BIOS, whos only task is to initialize the CPU/Memory/Boot Device,
then load and execute a boot block (from the boot device) would be
preferable to trying to replicate the "BIOS as an API" model that is used
in todays PC's.
I think that the "BIOS as a boot loader" model is simple and flexible
enough that it will be easy to maintain (especially in a free software
environment) and easier to evolve as the hardware and software environments
change. All of the intelligence (system initialization and API's) reside
within the code stored on the boot block (rather than in the BIOS code
stored in EPROM/EEPROM).
Using this approach you would not have to worry about optimizing the BIOS
code for any specific OS. The BIOS's only job would be to load/execute the
first block from the boot device and then get out of the way. The first
block stored on the boot device could then contain low level hardware
initialization and API's (if needed) that are optimized for the OS that is
going to be used.
Once control passes from the BIOS boot loader you have complete
flexibility. You could set the system in any mode, load any OS, load a
multiple OS loader, even load an old fashioned 16 bit BIOS into shadow and
act like a legacy PC clone. But none of this code has to be in the BIOS
The BIOS as boot loader would also be well suited for embedded applications
because it is small, lightweight and can be specifically implemented to
boot from things such as flash, EPROM, network cards, radio modems or other
unusual boot devices.
In all cases the code would simply initialize the hardware then
load/execute the boot block from the boot device. The BIOS would only need
to be as complex as the hardware deems necessary. Support for new and
custom hardware (non boot devices) would only have to be implemented once,
in the OS. Not twice, once in the BIOS and once in the OS.