Power-on self-test

Last updated
Typical POST screen (AMI BIOS) POST of ASUS P5KPL on SyncMaster 740N 20081006.jpg
Typical POST screen (AMI BIOS)
Summary screen after POST and before booting an operating system (AMI BIOS) POST2.png
Summary screen after POST and before booting an operating system (AMI BIOS)

A power-on self-test (POST) is a process performed by firmware or software routines immediately after a computer or other digital electronic device is powered on. [1]

Contents

POST processes may set the initial state of the device from firmware and detect if any hardware components are non-functional. The results of the POST may be displayed on a panel that is part of the device, output to an external device, or stored for future retrieval by a diagnostic tool. In some computers, an indicator lamp or a speaker may be provided to show error codes as a sequence of flashes or beeps in the event that a computer display malfunctions.

POST routines are part of a computer's pre-boot sequence. If they complete successfully, the bootstrap loader code is invoked to load an operating system.

In IBM PC compatible computers, the main duties of POST are handled by the BIOS or UEFI.

IBM-compatible PC POST

In IBM PC compatible computers, the main duties of POST are handled by the BIOS or UEFI, which may hand some of these duties to other programs designed to initialize very specific peripheral devices, notably for video and SCSI initialization. These other duty-specific programs are generally known collectively as option ROMs or individually as the video BIOS, SCSI BIOS, etc.

History

In earlier BIOSes, up to around the turn of the millennium, the POST would perform a thorough test of all devices, including a complete memory test. This design by IBM was modeled after their larger mainframe systems, which would perform a complete hardware test as part of their cold-start process. As the PC platform evolved into more of a commodity consumer device, the mainframe and minicomputer-inspired high-reliability features such as parity memory and the thorough memory test in every POST were dropped from most models. The exponential growth of PC memory sizes, driven by the equally exponential drop in memory prices, was also a factor in this, as the duration of a memory test using a given CPU is directly proportional to the memory size.

The original IBM PC could be equipped with as little as 16 KB of RAM and typically had between 64 and 640 KB; depending on the amount of equipped memory, the computer's 4.77 MHz 8088 required between 5 seconds and 1.5 minutes to complete the POST and there was no way to skip it. Beginning with the IBM XT, a memory count was displayed during POST instead of a blank screen. [2] A modern PC with a bus rate of around 1 GHz and a 32-bit bus might be 2000x or even 5000x faster, but might have many more GB's of memory. With boot times more of a concern now than in the 1980s, the 30- to 60-second memory test adds undesirable delay for a benefit of confidence that is not perceived to be worth that cost by most users. Most clone PC BIOSes allowed the user to skip the POST RAM check by pressing a key, and more modern machines often performed no RAM test at all unless it was enabled via the BIOS setup. In addition, modern DRAM is significantly more reliable than DRAM was in the 1980s.

Purposes

During the POST, the BIOS must integrate multiple competing, changing, and even mutually exclusive standards and initiatives for the matrix of hardware and operating systems the PC is expected to support, although at most only simple memory tests and the setup screen are displayed. The principal duties of the main BIOS during POST include:

The functions above are served by the POST in all BIOS versions back to the very first. In later BIOS versions, POST will also:

In early BIOSes, POST did not organize or select boot devices, it simply identified floppy or hard disks, which the system would always try to boot in that order.

Process

The BIOS begins its POST when the CPU is reset. The first memory location the CPU tries to execute is known as the reset vector. In the case of a hard reboot, the northbridge will direct a code fetch request to the BIOS located on the system flash memory. For a warm boot, the BIOS will be located in the proper place in RAM and the northbridge will direct the reset vector call to the RAM. In earlier PC systems, before chipsets were standard, the BIOS ROM would be located at an address range that included the reset vector, and BIOS ran directly out of ROM. This is why the motherboard BIOS ROM is in segment F000 in the conventional memory map.

During the POST flow of a contemporary BIOS, one of the first things a BIOS should do is determine the reason it is executing. For a cold boot, for example, it may need to execute all of its functionality. If, however, the system supports power saving or quick boot methods, the BIOS may be able to circumvent the standard POST device discovery, and simply program the devices from a preloaded system device table.

As part of the starting sequence the POST routines may display a prompt to the user for a key press to access built-in setup functions of the BIOS. This allows the user to set various options particular to the motherboard before the operating system is loaded. If no key is pressed, the POST will proceed on to the boot sequence required to load the installed operating system.

Many modern BIOS and UEFI implementations show a manufacturers logo during POST and hide the classic text screens unless an error occurs. The text screen can often be enabled in the BIOS settings by disabling the "Quiet Boot" option.

Progress and error reporting

BIOS POST card for ISA bus BIOS POST card.jpg
BIOS POST card for ISA bus
BIOS POST card for PCI bus POST card 3usd.jpg
BIOS POST card for PCI bus
Professional BIOS POST card for PCI bus POST card 98usd.jpg
Professional BIOS POST card for PCI bus
Two POST seven-segment displays integrated on a computer motherboard POST ("port 80") displays on a computer motherboard.jpg
Two POST seven-segment displays integrated on a computer motherboard

The original IBM BIOS made POST diagnostic information available by outputting a number to I/O port 0x80 (a screen display was not possible with some failure modes). Both progress indication and error codes were generated; in the case of a failure which did not generate a code, the code of the last successful operation was available to aid in diagnosing the problem. Using a logic analyzer or a dedicated POST card an interface card that shows port 0x80 output on a small displaya technician could determine the origin of the problem. Once an operating system is running on the computer the code displayed by such a board may become meaningless, since some OSes, e.g. Linux, use port 0x80 for I/O timing operations. The actual numeric codes for the possible stages and error conditions differ from one BIOS supplier to another. Codes for different BIOS versions from a single supplier may also vary, although many codes remain unchanged in different versions.

Later BIOSes used a sequence of beeps from the motherboard-attached PC speaker (if present and working) to signal error codes. Some vendors developed proprietary variants or enhancements, such as MSI's D-Bracket. POST beep codes vary from manufacturer to manufacturer.

Information on numeric and beep codes is available from manufacturers of BIOSes and motherboards. There are websites which collect codes for many BIOSes. [3]

Original IBM POST beep codes

BeepsMeaning
1 short beepNormal POST – system is OK
2 short beepsPOST error – error code shown on screen
No beepPower supply, system board problem, disconnected CPU, or disconnected speaker
Continuous beepPower supply, system board, RAM or keyboard problem
Repeating short beeps Power supply, system board or keyboard problem
1 long, 1 short beep System board problem
1 long, 2 short beeps Display adapter problem (MDA, CGA)
1 long, 3 short beeps Enhanced Graphics Adapter problem (EGA)
3 long beeps3270 keyboard card error

POST AMI BIOS beep codes [4]

BeepsMeaning
1 Memory refresh timer error
2 Parity error in base memory (first 64 KiB block)
3 Base memory read/write test error
4 Motherboard timer not operational (check all PSU to MB connectors seated)
5Processor failure
68042 Gate A20 test error (cannot switch to protected mode)
7General exception error (processor exception interrupt error)
8Display memory error (system video adapter)
9AMI BIOS ROM checksum fix
10 CMOS shutdown register read/write fix
11 Cache memory test failed
continuous beeping Motherboard does not detect a RAM module

POST beep codes on CompTIA A+ certification exam

These POST beep codes are covered specifically on the CompTIA A+ Exam:

BeepsMeaning
Steady, short beepsPower supply may be bad
Long continuous beep toneMemory failure
Steady, long beepsPower supply bad
No beepPower supply bad, system not plugged in, or power not turned on
No beepIf everything seems to be functioning correctly there may be a problem with the 'beeper' itself. The system will normally beep one short beep.
One long, two short beepsVideo card failure

IBM POST diagnostic code descriptions

CodeMeaning
100–199System boards
200–299Memory
300–399Keyboard
400–499Monochrome display
500–599Color/graphics display
600–699Floppy-disk drive or adapter
700–799Math coprocessor
900–999Parallel printer port
1000–1099Alternate printer adapter
1100–1299Asynchronous communication device, adapter, or port
1300–1399Game port
1400–1499Color/graphics printer
1500–1599Synchronous communication device, adapter, or port
1700–1799Hard drive or adapter (or both)
1800–1899Expansion unit (XT)
2000–2199Bisynchronous communication adapter
2400–2599EGA system-board video (MCA)
3000–3199LAN adapter
4800–4999Internal modem
7000–7099Phoenix BIOS chips
7300–73993.5-inch disk drive
8900–8999MIDI adapter
11200–11299SCSI adapter
21000–21099SCSI fixed disk and controller
21500–21599SCSI CD-ROM system

Macintosh POST

Apple's Macintosh computers also perform a POST after a cold boot. In the event of a fatal error, the Mac will not make its startup chime.

Old World Macs (until 1998)

Macs made prior to 1987, upon failing the POST, crashed silently without playing any sound and freeze, with a single hexadecimal string and a Sad Mac icon on the screen, if working. Macs made after 1987 but prior to 1998, upon failing the POST, will immediately halt with a "death chime", which is a sound that varies by model; it can be a simple beep, a car crash sound, the sound of shattering glass, a short musical tone, or more. On the screen, if working, will be the Sad Mac icon, along with two hexadecimal strings, which can be used to identify the problem. Some Macs made around this time do not use a death chime like Macs made prior to 1987, but retained the same format as those that used the death chimes, such as the presence of the Sad Mac icon and two hexadecimal strings on screen. Later Old World Macs based on PCI architecture prior to 1998 don’t display a Sad Mac icon nor the hexadecimal strings on screen and only plays the death chime.

New World Macs (1998–1999)

When Apple introduced the iMac in 1998, it was a radical departure from other Macs of the time. The iMac began the production of New World Macs, as they are called; New World Macs, such as the iMac G3, Power Macintosh G3 (Blue & White), Power Mac G4 (PCI Graphics), PowerBook G3 (bronze keyboard), and PowerBook G3 (FireWire), load the Mac OS ROM from the hard drive. In the event of an error that is not a fatal hardware error, they display the same screen as seen when holding ⌘ Command+⌥ Option+O+F at startup but with the error message instead of the "0 >" prompt. In the event of a fatal hardware error, they give these beeps: [5]

BeepsMeaning
1No RAM installed/detected
2Incompatible RAM type installed (for example, EDO)
3No RAM banks passed memory testing
4Bad checksum for the remainder of the boot ROM
5Bad checksum for the ROM boot block

New World Macs (1999 onward)

The beep codes were revised in October 1999. [6] In addition, on some models, the power LED will flash in cadence.

BeepsMeaning
1No RAM installed/detected
2Incompatible RAM types
3No good banks
4No good boot images in the boot ROM, bad sys config block, or both
5Processor is not usable

Intel-based Macs

With the introduction of Intel-based Macs with EFI-based firmware, the startup tones were changed again. [7] [8] These are not present in Intel-based Macs equipped with a T2 security chip, [7] as its POST process is different from those without a T2 security chip.

TonesMeaning
One tone, repeating every five secondsNo RAM installed/detected
Three successive tones followed by a repeating five-second pauseIncompatible RAM types; No good banks
One long tone while the power button is held downEFI ROM update in progress (For Macs made until 2012)
Three long tones, three short tones, three long tonesEFI ROM corruption detected, ROM recovery in process

Apple silicon-based Macs

The Mac transition to Apple silicon marked a radical change in the POST process in Macs. Unlike most Intel-based Macs that use EFI-based firmware, these Apple silicon-based Macs uses a boot ROM that loads the Low-Level Bootloader (LLB), similar to that of the firmware found in the iPhone and iPad. Like Intel-based Macs with a T2 security chip, the startup tones are absent. In the event of an error that is not a fatal hardware error, an exclamation mark will be displayed on the screen or the device will go into Device Firmware Update (DFU) mode. In the event of a fatal hardware error, nothing will be displayed on screen with no sound being heard. In addition, on some models, the power LED will flash in cadence.

Amiga POST

Amiga historical line of computers, from A1000 to 4000 present an interesting POST sequence that prompts the user with a sequence of flashing screens of different colors (rather than audible beeps as in other systems) to show if various hardware POST tests were correct or else if they failed:

POST sequence of Amiga

The Amiga system performs the following steps at boot:

  1. Delays beginning the tests a fraction of a second to allow the hardware to stabilize.
  2. Jumps to ROM code in diagnostic card (if found)
  3. Disables and clears all DMA and interrupts.
  4. Turns on the screen.
  5. Checks the general hardware configuration. If the screen remains a light gray color and the tests continue, the hardware is OK. If an error occurs, the system halts.
  6. Performs checksum test on ROMs.

If the system fails the ROM test, the screen display turns red and the system halts.

Sequence for all main Amiga models

Almost all Amiga models present the same color sequence when turned on: black screen, dark gray, light gray color screens filling all monitor screen in a rapid sequence (Amigas usually take between 2 and 3 seconds to turn on and boot). [9]

Color screens scheme

ColorMeaning
RedBad ROM [9]
YellowCPU Exception Before Bootstrap Code is Loaded [9]
GreenBad Chip RAM or fail of Agnus Chip (check seating of Agnus)
BlackNo CPU
WhiteExpansion passed test successfully
GreyTurn on
Constant whiteFailure of CPU
PurpleReturn from InitCode() [9]

Sequence for A4000

Correct tests color sequence scheme

A4000 presents just a light gray screen during its boot time (it just occurs in 2 or max 3 seconds)

  • Light Gray
  • = Initial hardware configuration tests passed
  • = Initial system software tests passed
  • = Final initialization test passed

Failed tests color scheme

ColorMeaning
RedROM Error - Reset or replace
GreenCHIP RAM error (reset AGNUS and re-test)
BlueCustom Chip(s) Error
Yellow68000 detected error before software trapped it (GURU)

Amiga keyboard LED error signals

The keyboards of historical Amiga models are not proprietary as it happened in early computer ages, but more pragmatically it was based on international standard ANSI/ISO 8859-1. The keyboard itself was an intelligent device and had its own processor and 4 kilobytes of RAM for keeping a buffer of the sequence of keys that were being pressed, thus can communicate with the user if a fault is found by flashing its main LED in sequence:

BlinksMeaning
1ROM checksum failure
2RAM test failed
3 Watchdog timer failed
4A shortcut exists between two row lines or one of the seven special keys (not implemented)

Embedded systems

Many embedded systems such as those in major appliances, avionics, communications, or medical equipment have built-in self-test routines that are automatically invoked at power-on. [10]

See also

Related Research Articles

<span class="mw-page-title-main">BIOS</span> Firmware for hardware initialization and OS runtime services

In computing, BIOS is firmware used to provide runtime services for operating systems and programs and to perform hardware initialization during the booting process. The firmware comes pre-installed on the computer's motherboard.

<span class="mw-page-title-main">Motherboard</span> Main printed circuit board used for a computing device

A motherboard is the main printed circuit board (PCB) in general-purpose computers and other expandable systems. It holds and allows communication between many of the crucial electronic components of a system, such as the central processing unit (CPU) and memory, and provides connectors for other peripherals. Unlike a backplane, a motherboard usually contains significant sub-systems, such as the central processor, the chipset's input/output and memory controllers, interface connectors, and other components integrated for general use.

<span class="mw-page-title-main">Booting</span> Process of starting a computer

In computing, booting is the process of starting a computer as initiated via hardware such as a button on the computer or by a software command. After it is switched on, a computer's central processing unit (CPU) has no software in its main memory, so some process must load software into memory before it can be executed. This may be done by hardware or firmware in the CPU, or by a separate processor in the computer system.

<span class="mw-page-title-main">Boot sector</span> Sector of a persistent data storage device

A boot sector is the sector of a persistent data storage device which contains machine code to be loaded into random-access memory (RAM) and then executed by a computer system's built-in firmware.

A boot disk is a removable digital data storage medium from which a computer can load and run (boot) an operating system or utility program. The computer must have a built-in program which will load and execute a program from a boot disk meeting certain standards.

<span class="mw-page-title-main">PC speaker</span> Internal loudspeaker built into some (older) IBM PC-compatible computers

A PC speaker is a loudspeaker built into some IBM PC compatible computers. The first IBM Personal Computer, model 5150, employed a standard 2.25 inch magnetic driven (dynamic) speaker. More recent computers use a tiny moving-iron or piezo speaker instead. The speaker allows software and firmware to provide auditory feedback to a user, such as to report a hardware fault. A PC speaker generates waveforms using the programmable interval timer, an Intel 8253 or 8254 chip.

<span class="mw-page-title-main">POST card</span>

In computing, a POST card is a plug-in diagnostic interface card that displays progress and error codes generated during power-on self-test (POST) of a computer. It is used to troubleshoot computers that do not start up.

The Macintosh Toolbox implements many of the high-level features of the Classic Mac OS, including a set of application programming interfaces for software development on the platform. The Toolbox consists of a number of "managers," software components such as QuickDraw, responsible for drawing onscreen graphics, and the Menu Manager, which maintain data structures describing the menu bar. As the original Macintosh was designed without virtual memory or memory protection, it was important to classify code according to when it should be loaded into memory or kept on disk, and how it should be accessed. The Toolbox consists of subroutines essential enough to be permanently kept in memory and accessible by a two-byte machine instruction; however it excludes core "kernel" functionality such as memory management and the file system. Note that the Toolbox does not draw the menu onscreen: menus were designed to have a customizable appearance, so the drawing code was stored in a resource, which could be on a disk.

BIOS implementations provide interrupts that can be invoked by operating systems and application programs to use the facilities of the firmware on IBM PC compatible computers. Traditionally, BIOS calls are mainly used by DOS programs and some other software such as boot loaders. BIOS runs in the real address mode of the x86 CPU, so programs that call BIOS either must also run in real mode or must switch from protected mode to real mode before calling BIOS and then switching back again. For this reason, modern operating systems that use the CPU in Protected mode or Long mode generally do not use the BIOS interrupt calls to support system functions, although they use the BIOS interrupt calls to probe and initialize hardware during booting. Real mode has the 1MB memory limitation, modern boot loaders use the unreal mode or protected mode to access up to 4GB memory.

An option ROM for the PC platform is a piece of firmware that resides in ROM on an expansion card, which gets executed to initialize the device and (optionally) add support for the device to the BIOS. In its usual use, it is essentially a driver that interfaces between the BIOS API and hardware. Technically, an option ROM is firmware that is executed by the BIOS after POST and before the BIOS boot process, gaining complete control of the system and being generally unrestricted in what it can do. The BIOS relies on each option ROM to return control to the BIOS so that it can either call the next option ROM or commence the boot process. For this reason, it is possible for an option ROM to keep control and preempt the BIOS boot process. The BIOS generally scans for and initializes option ROMs in ascending address order at 2 KB address intervals within two different address ranges above address C0000h in the conventional (20-bit) memory address space; later systems may also scan additional address ranges in the 24-bit or 32-bit extended address space.

The Apple Network Server (ANS) was a line of PowerPC-based server computers designed, manufactured and sold by Apple Computer, Inc. from February 1996 to April 1997. It was codenamed "Shiner" and originally consisted of two models, the Network Server 500/132 and the Network Server 700/150, which got a companion model, the Network Server 700/200 with a faster CPU in November 1996.

<span class="mw-page-title-main">Brick (electronics)</span> Non-functioning electronic device

A brick is a mobile device, game console, router, computer or other electronic device that is no longer functional due to corrupted firmware, a hardware problem, or other damage. The term analogizes the device to a brick's modern technological usefulness.

A volume boot record (VBR) is a type of boot sector introduced by the IBM Personal Computer. It may be found on a partitioned data storage device, such as a hard disk, or an unpartitioned device, such as a floppy disk, and contains machine code for bootstrapping programs stored in other parts of the device. On non-partitioned storage devices, it is the first sector of the device. On partitioned devices, it is the first sector of an individual partition on the device, with the first sector of the entire device being a Master Boot Record (MBR) containing the partition table.

The Linux booting process involves multiple stages and is in many ways similar to the BSD and other Unix-style boot processes, from which it derives. Although the Linux booting process depends very much on the computer architecture, those architectures share similar stages and software components, including system startup, bootloader execution, loading and startup of a Linux kernel image, and execution of various startup scripts and daemons. Those are grouped into 4 steps: system startup, bootloader stage, kernel stage, and init process. When a Linux system is powered up or reset, its processor will execute a specific firmware/program for system initialization, such as the power-on self-test, invoking the reset vector to start a program at a known address in flash/ROM, then load the bootloader into RAM for later execution. In IBM PC–compatible personal computers (PCs), this firmware/program is either a BIOS or a UEFI monitor, and is stored in the mainboard. In embedded Linux systems, this firmware/program is called boot ROM. After being loaded into RAM, the bootloader will execute to load the second-stage bootloader. The second-stage bootloader will load the kernel image into memory, decompress and initialize it, and then pass control to this kernel image. The second-stage bootloader also performs several operation on the system such as system hardware check, mounting the root device, loading the necessary kernel modules, etc. Finally, the first user-space process starts, and other high-level system initializations are performed.

<span class="mw-page-title-main">Kickstart (Amiga)</span> Bootstrap firmware used by Amiga computers

Kickstart is the bootstrap firmware of the Amiga computers developed by Commodore International. Its purpose is to initialize the Amiga hardware and core components of AmigaOS and then attempt to boot from a bootable volume, such as a floppy disk. Most Amiga models were shipped with the Kickstart firmware stored on ROM chips.

<span class="mw-page-title-main">AmigaOS</span> Operating system for Amiga computers

AmigaOS is a family of proprietary native operating systems of the Amiga and AmigaOne personal computers. It was developed first by Commodore International and introduced with the launch of the first Amiga, the Amiga 1000, in 1985. Early versions of AmigaOS required the Motorola 68000 series of 16-bit and 32-bit microprocessors. Later versions, after Commodore's demise, were developed by Haage & Partner and then Hyperion Entertainment. A PowerPC microprocessor is required for the most recent release, AmigaOS 4.

<span class="mw-page-title-main">BootX (Apple)</span> Boot loader developed by Apple Inc.

BootX is a software-based bootloader designed and developed by Apple Inc. for use on the company's Macintosh computer range. BootX is used to prepare the computer for use, by loading all required device drivers and then starting-up Mac OS X by booting the kernel on all PowerPC Macintoshes running the Mac OS X 10.2 operating system or later versions.

A master boot record (MBR) is a type of boot sector in the first block of partitioned computer mass storage devices like fixed disks or removable drives intended for use with IBM PC-compatible systems and beyond. The concept of MBRs was publicly introduced in 1983 with PC DOS 2.0.

The classic Macintosh startup sequence includes hardware tests which can trigger the startup chimes, Happy Mac, Sad Mac, and Chimes of Death.

In computing, rebooting is the process by which a running computer system is restarted, either intentionally or unintentionally. Reboots can be either a cold reboot in which the power to the system is physically turned off and back on again ; or a warm reboot in which the system restarts while still powered up. The term restart is used to refer to a reboot when the operating system closes all programs and finalizes all pending input and output operations before initiating a soft reboot.

References

  1. "How BIOS Works". flint.cs.yale.edu. Retrieved 2021-10-22.
  2. Williams, Gregg (January 1982). "A Closer Look at the IBM Personal Computer". BYTE. p. 36. Retrieved 19 October 2013.
  3. "Post Code Master - PC BIOS Power On Self Test POST Codes & Diagnostic Beep Codes". Archived from the original on June 28, 2019.
  4. "AMIBIOS8 Check Point and Beep Code List Version 2.0 - June 10, 2008" (PDF). 2008-06-10. Archived from the original (PDF) on 2015-08-07.
  5. "Power-On Self-Test Beep Definition - Part 1". Apple Support. February 18, 2012.
  6. "Power On Self-Test Beep Definition - Part 2". Apple Support. January 10, 2012.
  7. 1 2 "About Mac startup tones". Apple Support. November 8, 2018. Archived from the original on April 8, 2019.
  8. "If your Mac beeps during startup". Apple Support. August 22, 2023. Retrieved May 23, 2024.
  9. 1 2 3 4 "A3000 Booting Problems". Archived from the original on December 3, 2019.
  10. "Hardware Diagnostics and Power on Self Tests". www.eventhelix.com. Retrieved 2021-10-22.