Prehistoric Age: the BIOS
The moment after a computer is powered on, it is
practically useless because the RAM chips contain random data and no
operating system is running. To begin the boot, a special hardware
circuit raises the logical value of the RESET pin of the CPU. After
RESET is asserted, some registers of the processor (including cs and eip)
are set to fixed values, and the code found at physical address 0xfffffff0 is executed. This address is mapped
by the hardware to a certain read-only, persistent memory chip that is
often called Read-Only Memory (ROM). The set of programs stored in ROM
is traditionally called the Basic Input/Output
System (BIOS) in the 80 × 86
architecture, because it includes several interrupt-driven low-level
procedures used by all operating systems in the booting phase to handle
the hardware devices that make up the computer. Some operating systems,
such as Microsoft’s MS-DOS , rely on BIOS to implement most system calls.
Once in protected mode (see the section "Segmentation in Hardware" in Chapter 2), Linux does not use BIOS any longer, but it provides its own device driver for every hardware device on the computer. In fact, the BIOS procedures must be executed in real mode, so they cannot share functions even if that would be beneficial.
The BIOS uses Real Mode addresses because they are the only ones available when the computer is turned on. A Real Mode address is composed of a seg segment and an off offset; the corresponding physical address is ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access