Option ROM
Encyclopedia
An Option ROM typically consists of firmware
that is called by the system BIOS
. For example, an adapter card that controls a boot device might contain firmware that is used to connect the device to the system once the Option ROM is loaded.
BIOSes (Most desktop Computers.)
A common example of an option ROM is the Video BIOS
found on all standard PC video cards. This is a special case of an option ROM, as it is loaded very early on in the boot process (otherwise nothing would appear on the screen during the POST
.) It is usually easy to tell when this particular ROM is initialized, as it is the first time something appears on the monitor since the computer was switched on. Unless working with an embedded system
, the video BIOS is almost always located in the C0000 memory segment (i.e. the very start of the memory area reserved for option ROMs.) Other ROMs can be located from segments
After the basic POST
checks are complete, the option ROMs are normally initialized. This gives them the chance to hook
(intercept) system interrupts, in order to provide increased functionality to the system.
controller card may hook INT 13
which is responsible for providing disk services. Once it has done this, any subsequent calls to INT 13H will be "caught" by the SCSI option ROM (or "SCSI BIOS"), allowing it to insert details about any disks that may exist on the SCSI bus. Before it had hooked the interrupt there may have been no disks on the system, but by intercepting the interrupt and altering the values returned, the SCSI BIOS can make all the disks on the SCSI bus visible to the system.
In this particular case, the BIOS itself may call INT 13 to provide a list of possible boot devices to the user, and because the SCSI BIOS has hooked the interrupt the user will be able to choose not only which standard system devices to boot from, but also which SCSI disks as well.
ROM (e.g., a PXE
option ROM). This allows a computer without any disks or persistent storage to run an operating system by downloading the necessary software over the network. Of course there needs to be some program to do this download of code, and this is what is stored in the option ROM. This option ROM works differently to the SCSI example above, as it does not provide any new devices to the system. Older ROMs hooked either INT 18H or INT 19H as these two interrupts are called when the boot process is about to begin - INT 19H is called to initiate the boot process, while INT 18H is called when the system has tried to boot from all possible devices and none were bootable. By hooking INT 18H, the system would try to boot from the network when all other boot devices (floppy drives, hard drives, etc.) had failed. By hooking INT 19H, the system would attempt to boot from the network before any other devices.
Firmware
In electronic systems and computing, firmware is a term often used to denote the fixed, usually rather small, programs and/or data structures that internally control various electronic devices...
that is called by the system BIOS
BIOS
In IBM PC compatible computers, the basic input/output system , also known as the System BIOS or ROM BIOS , is a de facto standard defining a firmware interface....
. For example, an adapter card that controls a boot device might contain firmware that is used to connect the device to the system once the Option ROM is loaded.
Standard IBM PC BIOS
This section refers to how option ROMs are used with standard IBM PC compatibleIBM PC compatible
IBM PC compatible computers are those generally similar to the original IBM PC, XT, and AT. Such computers used to be referred to as PC clones, or IBM clones since they almost exactly duplicated all the significant features of the PC architecture, facilitated by various manufacturers' ability to...
BIOSes (Most desktop Computers.)
A common example of an option ROM is the Video BIOS
Video BIOS
Video BIOS is the BIOS of a graphics card in a computer.Much the way the system BIOS provides a set of functions that are used by software programs to access the system hardware, the video BIOS provides a set of video-related functions that are used by programs to access the video hardware...
found on all standard PC video cards. This is a special case of an option ROM, as it is loaded very early on in the boot process (otherwise nothing would appear on the screen during the POST
Power-on self-test
Power-On Self-Test refers to routines run immediately after power is applied, by nearly all electronic devices. Perhaps the most widely-known usage pertains to computing devices...
.) It is usually easy to tell when this particular ROM is initialized, as it is the first time something appears on the monitor since the computer was switched on. Unless working with an embedded system
Embedded system
An embedded system is a computer system designed for specific control functions within a larger system. often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts. By contrast, a general-purpose computer, such as a personal...
, the video BIOS is almost always located in the C0000 memory segment (i.e. the very start of the memory area reserved for option ROMs.) Other ROMs can be located from segments
C8000
all the way up to E0000
. The BIOS Boot Specification (BBS) requires that option ROMs be aligned to 2kB boundaries (e.g. segments C8000, C8800, C9000, C9800
, etc.).After the basic POST
Power-on self-test
Power-On Self-Test refers to routines run immediately after power is applied, by nearly all electronic devices. Perhaps the most widely-known usage pertains to computing devices...
checks are complete, the option ROMs are normally initialized. This gives them the chance to hook
Hooking
In computer programming, the term hooking covers a range of techniques used to alter or augment the behavior of an operating system, of applications, or of other software components by intercepting function calls or messages or events passed between software components...
(intercept) system interrupts, in order to provide increased functionality to the system.
SCSI
For example, a SCSISCSI
Small Computer System Interface is a set of standards for physically connecting and transferring data between computers and peripheral devices. The SCSI standards define commands, protocols, and electrical and optical interfaces. SCSI is most commonly used for hard disks and tape drives, but it...
controller card may hook INT 13
INT 13
INT 13H or INT 19 is shorthand for BIOS interrupt call 13hex, the 20th interrupt vector in an x86-based computer system. The BIOS typically sets up a real mode interrupt handler at this vector that provides sector-based hard disk and floppy disk read and write services using cylinder-head-sector ...
which is responsible for providing disk services. Once it has done this, any subsequent calls to INT 13H will be "caught" by the SCSI option ROM (or "SCSI BIOS"), allowing it to insert details about any disks that may exist on the SCSI bus. Before it had hooked the interrupt there may have been no disks on the system, but by intercepting the interrupt and altering the values returned, the SCSI BIOS can make all the disks on the SCSI bus visible to the system.
In this particular case, the BIOS itself may call INT 13 to provide a list of possible boot devices to the user, and because the SCSI BIOS has hooked the interrupt the user will be able to choose not only which standard system devices to boot from, but also which SCSI disks as well.
Network boot ROM
Another common option ROM is a network bootNetwork booting
Network booting is the process of booting a computer from a network rather than a local drive. This method of booting can be used by routers, diskless workstations and centrally managed computers such as public computers at libraries and schools...
ROM (e.g., a PXE
Preboot Execution Environment
The Preboot eXecution Environment is an environment to boot computers using a network interface independently of data storage devices or installed operating systems.PXE was introduced as part of the Wired for Management framework by Intel and is described in the specification The Preboot...
option ROM). This allows a computer without any disks or persistent storage to run an operating system by downloading the necessary software over the network. Of course there needs to be some program to do this download of code, and this is what is stored in the option ROM. This option ROM works differently to the SCSI example above, as it does not provide any new devices to the system. Older ROMs hooked either INT 18H or INT 19H as these two interrupts are called when the boot process is about to begin - INT 19H is called to initiate the boot process, while INT 18H is called when the system has tried to boot from all possible devices and none were bootable. By hooking INT 18H, the system would try to boot from the network when all other boot devices (floppy drives, hard drives, etc.) had failed. By hooking INT 19H, the system would attempt to boot from the network before any other devices.
BIOS Boot Specification
Since these two methods don't offer a large amount of control over the boot process, the BIOS Boot Specification (BBS) was developed. This provided a more standardized approach where an option ROM could be initialized at the start of the boot process, it could inform the BIOS about its functionality, and then it could be called later on in the boot process depending on the order the user had selected.See also
- BIOSBIOSIn IBM PC compatible computers, the basic input/output system , also known as the System BIOS or ROM BIOS , is a de facto standard defining a firmware interface....
- FirmwareFirmwareIn electronic systems and computing, firmware is a term often used to denote the fixed, usually rather small, programs and/or data structures that internally control various electronic devices...
- ROMRead-only memoryRead-only memory is a class of storage medium used in computers and other electronic devices. Data stored in ROM cannot be modified, or can be modified only slowly or with difficulty, so it is mainly used to distribute firmware .In its strictest sense, ROM refers only...
- BootingBootingIn computing, booting is a process that begins when a user turns on a computer system and prepares the computer to perform its normal operations. On modern computers, this typically involves loading and starting an operating system. The boot sequence is the initial set of operations that the...
- BootstrappingBootstrappingBootstrapping or booting refers to a group of metaphors that share a common meaning: a self-sustaining process that proceeds without external help....