Non-maskable interrupt

Non-maskable interrupt

A non-maskable interrupt (NMI) is a computer processor interrupt that cannot be ignored by standard interrupt masking techniques in the system. It is typically used to signal attention for non-recoverable hardware errors. (Some NMIs may be masked, but only by using proprietary methods specific to the particular NMI.)

Contents

Overview

An NMI is often used when response time is critical, and when an interrupt should never be disabled in the normal operation of the system. Such uses include the reporting of non-recoverable hardware errors, methods for system debugging and profiling, and special case handling such as system resets.

In modern architectures, NMIs are typically used to handle non-recoverable errors, which need immediate attention. Therefore, such interrupts should not be masked in the normal operation of the system. These errors include non-recoverable internal system chipset errors, corruption in system memory such as parity and ECC errors, and data corruption detected on system and peripheral buses.

On some systems, an NMI can be triggered by the computer's user.[1] Such applications include hardware and software debugging interfaces, and system reset buttons.

Debugging NMIs are typically used to diagnose and fix faulty code. In such cases an NMI is used to execute an interrupt handler that transfers control to a special monitor program. From this program a developer can inspect the machine's memory, and examine the internal state of the program at the instant of its interruption. Such NMIs also allow computers which appear to be hung to be debugged or diagnosed.

History

In older architectures, NMIs were used for interrupts which were typically never disabled because of the required response time. They were hidden signals. Examples include the floppy disk controller on the Amstrad PCW, the 8087 coprocessor on the x86 when used in the IBM PC or its compatibles (even though Intel recommended connecting it to a normal interrupt, causing the error pin on the 287 when used in the IBM PC/AT to be connected to a normal interrupt rather than directly to the 286 error pin, for which the handler jumps to the NMI handler, and later causing Intel, in the 486, to add the MS-DOS compatibility mode to it[2]),[clarification needed] and the Low Battery signal on the HP 95LX.

In the original IBM PC, an NMI was triggered if a parity error was detected in system memory, or reported by an external device. In either case, the PC would display an error message and halt. Some later PC clones used an NMI to conceal the hardware differences from that of a standard PC. On such computers, an NMI would be generated when a program attempted to access incompatible hardware. A BIOS interrupt handler would then translate the program's request to match the hardware that was actually present. The SMM in the 386SL is a better way to do this.

Some 8-bit home computers used the NMI line to permit a "warm start" if the system had locked up. Typically, this would restore the control registers to known good values stored in ROM, without destroying whatever data that the user might currently have loaded. On the Commodore 8-bit machines, the RESTORE key was hooked up directly to the NMI line on the 6510 CPU, but the reset would take place only if RUN/STOP was also being held down when RESTORE was struck (this combination being the Commodore version of a three finger salute). Commodore also connected the MOS Technology 6526 CIA #2 in the C64 and C128 to the processor's NMI line, which was part of the means by which software emulation of the 6551 ACIA was accomplished. Atari's 8-bit line used a SYSTEM RESET button for this same purpose.

Debugging NMIs have appeared in a number of forms, including the Apple Macintosh's "programmers' button", and certain key combinations on SUN workstations. With the introduction of Windows 2000, Microsoft allowed the use of an NMI to cause a system to either break into a debugger, or dump the contents of memory to disk and reboot.[3]

Debugging NMIs have also been used by devices that allow leisure users and gamers to manipulate running programs. Devices which added a button to generate an NMI, such as Romantic Robot's Multiface, were a popular accessory for 1980s 8-bit and 16-bit home computers. These peripherals had a small amount of ROM and an NMI button. Pressing the button transferred control to the software in the peripheral's ROM, allowing the suspended program to be saved to disk (very useful for tape-based games with no disk support, but also for saving games in progress), screenshots to be saved or printed, or values in memory to be manipulated—a cheating technique to acquire extra lives, for example.

Not all computers provide a mechanism for triggering NMIs; however, many machines (typically rackmount servers) provide a physical button specifically for this purpose. Other machines may expose this functionality via an expansion card.[4]

Miles Gordon Technology's DISCiPLE and +D products for the ZX Spectrum featured an NMI-producing "magic button".

On the Nintendo Entertainment System, an NMI is generated during each vertical blanking interval. Because these NMIs (often referred to as "vblank interrupts") occur at frequent, regular intervals, code that manipulates game graphics and audio is often executed inside of the NMI handler routine. Clearing the 7th bit of the PPU's $2000 register disables vblank interrupts, and setting it enables them.

Notes

See also

External links


Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • non-maskable interrupt — noun A hardware level interrupt that cannot be masked by software, such as a memory parity error …   Wiktionary

  • Interrupt — This article is about computer interrupts. For the study of the effect of disruptions on job performance, see Interruption science. In computing, an interrupt is an asynchronous signal indicating the need for attention or a synchronous event in… …   Wikipedia

  • Interrupt latency — In Realtime Operating Systems, Interrupt latency is the time between the generation of an interrupt by a device and the servicing of the device which generated the interrupt. For many operating systems, devices are serviced as soon as the device… …   Wikipedia

  • Interrupt storm — In operating systems, an interrupt storm is an event during which a processor receives an inordinate number of interrupts that consume the majority of the processor s time. Interrupt storms are typically caused by hardware devices that do not… …   Wikipedia

  • Interrupt handler — An interrupt handler, also known as an interrupt service routine (ISR), is a callback subroutine in an operating system or device driver whose execution is triggered by the reception of an interrupt. Interrupt handlers have a multitude of… …   Wikipedia

  • Interrupt Request — Die Artikel Interrupt und Unterbrechungsanforderung überschneiden sich thematisch. Hilf mit, die Artikel besser voneinander abzugrenzen oder zu vereinigen. Beteilige dich dazu an der Diskussion über diese Überschneidungen. Bitte entferne diesen… …   Deutsch Wikipedia

  • Interrupt vector — An interrupt vector is the memory address of an interrupt handler, or an index into an array called an interrupt vector table or dispatch table . Interrupt vector tables contain the memory addresses of interrupt handlers. When an interrupt is… …   Wikipedia

  • Interrupt — In der Informatik versteht man unter Interrupt (engl. to interrupt, unterbrechen) die kurzfristige Unterbrechung der normalen Programmausführung[1], um eine andere, meist kurze, aber zeitkritische Verarbeitung durchzuführen. Das auslösende… …   Deutsch Wikipedia

  • Advanced Programmable Interrupt Controller — In computing, an Advanced Programmable Interrupt Controller (APIC) is a more complex Programmable Interrupt Controller (PIC) than Intel s original types such as the 8259A. APIC devices permit more complex priority models, and Advanced IRQ… …   Wikipedia

  • Programmable Interrupt Controller — A Programmable Interrupt Controller (PIC) is a device which allows priority levels to be assigned to its interrupt outputs. When the device has multiple interrupt outputs to assert, it will assert them in the order of their relative priority.… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”