question: If ROM is 'Read Only Memory', why can you change BIOS?
comment: Because “read only” is a misnomer. There are almost always methods to overwrite read only memory, from swapping out the ROM chip itself, to using a UV light to erase it, to using a JTAG unit to flip a specific bit that enables reprogramming, to Flash ROM that can be programmatically rewritten by the right instructions. Having said all that, BIOS systems have been generally replaced in the last 15 years by UEFI which is based on firmware loaders that assume you’re loading the hardware description from a combination of flash memory and regular read/write storage — so there’s no assumption of read only memory in the architecture anymore.
passages: At this point, the extension ROM code takes over, typically testing and initializing the hardware it controls and registering interrupt vectors for use by post-boot applications. It may use BIOS services (including those provided by previously initialized option ROMs) to provide a user configuration interface, to display diagnostic information, or to do anything else that it requires. It is possible that an option ROM will not return to BIOS, pre-empting the BIOS's boot sequence altogether.
   Later, 386-class computers started integrating the BIOS setup utility in the ROM itself, alongside the BIOS code; these computers usually boot into the BIOS setup utility if a certain key or key combination is pressed, otherwise the BIOS POST and boot process are executed.
   For example, a SCSI 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.
   Peripheral cards such as some hard disk drive controllers and some video display adapters have their own BIOS extension option ROMs, which provide additional functionality to BIOS. Code in these extensions runs before the BIOS boots the system from mass storage. These ROMs typically test and initialize hardware, add new BIOS services, and augment or replace existing BIOS services with their own versions of those services. For example, a SCSI controller usually has a BIOS extension ROM that adds support for hard drives connected through that controller. Some video cards have extension ROMs that replace the video services of the motherboard BIOS with their own video services. BIOS extension ROMs gain total control of the machine, so they can in fact do anything, and they may never return control to the BIOS that invoked them. An extension ROM could in principle contain an entire operating system or an application program, or it could implement an entirely different boot process such as booting from a network. Operation of an IBM-compatible computer system can be completely changed by removing or inserting an adapter card (or a ROM chip) that contains a BIOS extension ROM.
   Also, if an expansion ROM wishes to change the way the system boots unilaterally, it can simply hook INT 19h or other interrupts normally called from interrupt 19h, such as INT 13h, the BIOS disk service, to intercept the BIOS boot process. Then it can replace the BIOS boot process with one of its own, or it can merely modify the boot sequence by inserting its own boot actions into it, by preventing the BIOS from detecting certain devices as bootable, or both. Before the BIOS Boot Specification was promulgated, this was the only way for expansion ROMs to implement boot capability for devices not supported for booting by the native BIOS of the motherboard.
   An option ROM should normally return to the BIOS after completing its initialization process. Once (and if) an option ROM returns, the BIOS continues searching for more option ROMs, calling each as it is found, until the entire option ROM area in the memory space has been scanned.
  
  Section::::Extensions (option ROMs).:Physical placement.
   The motherboard BIOS typically contains code to access hardware components necessary for bootstrapping the system, such as the keyboard, display, and storage. In addition, plug-in adapter cards such as SCSI, RAID, network interface cards, and video boards often include their own BIOS (e.g. Video BIOS), complementing or replacing the system BIOS code for the given component. Even devices built into the motherboard can behave in this way; their option ROMs can be stored as separate code on the main BIOS flash chip, and upgraded either in tandem with, or separately from, the main BIOS.
   In modern PCs, "ROM" (or flash) is used to store the basic bootstrapping firmware for the main processor, as well as the various firmware needed to internally control self-contained devices such as graphic cards, hard disks, DVD drives, TFT screens, etc., in the system. Today, many of these "read-only" memories – especially the BIOS – are often replaced with Flash memory (see below), to permit in-place reprogramming should the need for a firmware upgrade arise. However, simple and mature sub-systems (such as the keyboard or some communication controllers in the integrated circuits on the main board, for example) may employ mask ROM or OTP (one-time programmable).
   The ROM also contained a basic font set to upload to the video adapter font RAM, if the video card did not contain a font ROM with this font set instead.
   An add-in card requires an option ROM if the card is not supported by the main BIOS and the card needs to be initialized or made accessible through BIOS services before the operating system can be loaded (usually this means it is required in the bootstrapping process). Even when it is not required, an option ROM can allow an adapter card to be used without loading driver software from a storage device after booting begins with an option ROM, no time is taken to load the driver, the driver does not take up space in RAM nor on hard disk, and the driver software on the ROM always stays with the device so the two cannot be accidentally separated. Also, if the ROM is on the card, both the peripheral hardware and the driver software provided by the ROM are installed together with no extra effort to install the software. An additional advantage of ROM on some early PC systems (notably including the IBM PCjr) was that ROM was faster than main system RAM. (On modern systems, the case is very much the reverse of this, and BIOS ROM code is usually copied ("shadowed") into RAM so it will run faster.)
   There are many methods and utilities for examining the contents of various motherboard BIOS and expansion ROMs, such as Microsoft DEBUG or the Unix dd.
  
  Section::::Extensions (option ROMs).:Boot procedure.
   The contents of ROM chips can be extracted with special hardware devices and relevant controlling software. This practice is common for, as a main example, reading the contents of older video game console cartridges. Another example is making backups of firmware/OS ROMs from older computers or other devices - for archival purposes, as in many cases, the original chips are PROMs and thus at risk of exceeding their usable data lifetime.
   Historically, the BIOS in the IBM PC and XT had no built-in user interface. The BIOS versions in earlier PCs (XT-class) were not software configurable; instead, users set the options via DIP switches on the motherboard. Later computers, including all IBM-compatibles with 80286 CPUs, had a battery-backed nonvolatile BIOS memory (CMOS RAM chip) that held BIOS settings. These settings, such as video-adapter type, memory size, and hard-disk parameters, could only be configured by running a configuration program from a disk, not built into the ROM. A special "reference diskette" was inserted in an IBM AT to configure settings such as memory size.
   The newest Option ROM version is a 13 series ROM, this ROM will not be used by motherboard manufacturers for the X79 chipset BIOS, and it can be injected into a BIOS to use on the X79 with modded code, for those MFG's who have added a ROM switch, this is where the MFG has added both RST and RSTe to the RAID option of a BIOS, but there needs to be a code added for TRIM commands to be sent, when you inject the RST and replace the RSTe with RST option ROM in X79 boards that do not contain the ROM switch, TRIM can be dysfunctional.
   Although the relative speed of RAM vs. ROM has varied over time, large RAM chips can be read faster than most ROMs. For this reason (and to allow uniform access), ROM content is sometimes copied to RAM or shadowed before its first use, and subsequently read from RAM.
  
  Section::::Speed.:Writing.
   In the mid-1990s, a facility for supplying new microcode was initially referred to as the Pentium Pro Stepping data file, and BIOS Update Feature. It was intended that user mode applications should make a BIOS interrupt call to supply a new "BIOS Update Data Block", which the BIOS would partially validate and save to nonvolatile BIOS memory, this could be supplied to the installed processors on next boot.
  
  Intel distributed a program called codice_1, renamed codice_2 that could be run under DOS. Collections of multiple microcode updates were concatencated together and numerically numbered with the extension codice_3, such as codice_4.
   Section::::IBM PC and compatibles.:BIOS boot specification.
  
  Since these two methods do not 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.
  
  Section::::See also.
  
  BULLET::::- BIOS
  
  BULLET::::- Booting
  
  BULLET::::- Bootstrapping
  
  BULLET::::- Firmware
  
  BULLET::::- Legacy Plug and Play
  
  BULLET::::- PCI configuration space
  
  BULLET::::- ROM
   Modern DIMMs include a Serial Presence Detect (SPD) ROM chip that contains recommended memory timings for automatic configuration. The BIOS on a PC may allow the user to make adjustments in an effort to increase performance (with possible risk of decreased stability) or, in some cases, to increase stability (by using suggested timings).
   The BIOS in modern PCs initializes and tests the system hardware components, and loads a boot loader from a mass memory device which then initializes an operating system. In the era of DOS, the BIOS provided a hardware abstraction layer for the keyboard, display, and other input/output (I/O) devices that standardized an interface to application programs and the operating system. More recent operating systems do not use the BIOS after loading, instead accessing the hardware components directly.
   An exception to the need for a modified option ROM on motherboards with an X79 chipset is if the manufacturer has added a ROM switch; this entails both the RST and RST-E ROMs being inside the BIOS/UEFI. This allows the RST ROM to be used instead of the RST-E ROM, allowing TRIM to function. Intel notes that best performance can be achieved by using a driver with same version as the ROM; for example, if the BIOS/UEFI has an 11.0.0.0m option ROM, an 11.x version driver should be used.
  
  Section::::Implementation.:Enabling unsupported filesystems.
   Since then, the WPcom number is no longer even offered as a BIOS setting any more, as it is considered an obsolete technology.
  
  Floppy disk controllers still need to deal with precompensation, but since there have never been more than five or six common floppy drive types in use on PCs, all of which need the same kind of precompensation, there was never a need for a BIOS setting concerning precompensation on floppy disk drives.
   After the option ROM scan is completed and all detected ROM modules with valid checksums have been called, or immediately after POST in a BIOS version that does not scan for option ROMs, the BIOS calls INT 19h to start boot processing. Post-boot, programs loaded can also call INT 19h to reboot the system, but they must be careful to disable interrupts and other asynchronous hardware processes that may interfere with the BIOS rebooting process, or else the system may hang or crash while it is rebooting.
   The ROM BIOS starts the execution at the physical memory address FFFF0h. During this phase, BIOS first executes the Power-on self-test, then checks for the existence of a boot disk on drive A. If it is not found in drive A, the ROM BIOS checks for a hard disk. If the computer has a Plug and Play BIOS, in addition, BIOS checks the RAM for I/O port addresses, interrupt lines and DMA channels for Plug and Play devices, disables found devices, creates maps of used and unused resources and re-enables devices.
   After the motherboard BIOS completes its POST, most BIOS versions search for option ROM modules, also called BIOS extension ROMs, and execute them. The motherboard BIOS scans for extension ROMs in a portion of the "upper memory area" (the part of the x86 real-mode address space at and above address 0xA0000) and runs each ROM found, in order. To discover memory-mapped ISA option ROMs, a BIOS implementation scans the real-mode address space from codice_5 to codice_6 on 2 KiB boundaries, looking for a two-byte ROM "signature": 0x55 followed by 0xAA. In a valid expansion ROM, this signature is followed by a single byte indicating the number of 512-byte blocks the expansion ROM occupies in real memory, and the next byte is the option ROM's entry point (also known as its "entry offset"). A checksum of the specified number of 512-byte blocks is calculated, and if the ROM has a valid checksum, the BIOS transfers control to the entry address, which in a normal BIOS extension ROM should be the beginning of the extension's initialization routine.
   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.
  
  Section::::IBM PC and compatibles.:SCSI.
  
presuppositions:  'Read Only Memory' is a literal term. BIOS that has Read Only Memory cannot be overwritten.
corrections:  'Read Only Memory' is a misnomer. There are almost always methods to overwrite things with Read Only Memory.
raw_presuppositions:  'Read Only Memory' is a literal term. BIOS that has Read Only Memory cannot be overwritten.
raw_corrections:  'Read Only Memory' is a misnomer. There are almost always methods to overwrite things with Read Only Memory.