HOME

TheInfoList



OR:

In
computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes, and development of both hardware and software. Computing has scientific, ...
, a non-maskable interrupt (NMI) is a hardware
interrupt In digital computers, an interrupt (sometimes referred to as a trap) is a request for the processor to ''interrupt'' currently executing code (when permitted), so that the event can be processed in a timely manner. If the request is accepted ...
that standard interrupt-masking techniques in the system cannot ignore. It typically occurs to signal attention for non-recoverable hardware
error An error (from the Latin ''error'', meaning "wandering") is an action which is inaccurate or incorrect. In some usages, an error is synonymous with a mistake. The etymology derives from the Latin term 'errare', meaning 'to stray'. In statistic ...
s. Some NMIs may be masked, but only by using proprietary methods specific to the particular NMI. An NMI is often used when response time is critical or when an interrupt should never be disabled during normal system operation. Such uses include reporting non-recoverable hardware errors, system debugging and profiling, and handling of special cases like system resets. Modern
computer architecture In computer engineering, computer architecture is a description of the structure of a computer system made from component parts. It can sometimes be a high-level description that ignores details of the implementation. At a more detailed level, the ...
s typically use NMIs 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 In a computer system, a chipset is a set of electronic components in one or more integrated circuits known as a "Data Flow Management System" that manages the data flow between the processor, memory and peripherals. It is usually found on t ...
errors, corruption in system memory such as
parity Parity may refer to: * Parity (computing) ** Parity bit in computing, sets the parity of data for the purpose of error detection ** Parity flag in computing, indicates if the number of set bits is odd or even in the binary representation of the r ...
and ECC errors, and data corruption detected on system and peripheral buses. On some systems, a computer user can trigger an NMI through hardware and software
debugging In computer programming and software development, debugging is the process of finding and resolving ''bugs'' (defects or problems that prevent correct operation) within computer programs, software, or systems. Debugging tactics can involve in ...
interfaces and system reset buttons. Programmers typically use debugging NMIs to diagnose and fix faulty code. In such cases, an NMI can execute an
interrupt handler In computer systems programming, an interrupt handler, also known as an interrupt service routine or ISR, is a special block of code associated with a specific interrupt condition. Interrupt handlers are initiated by hardware interrupts, softw ...
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. This also allows the debugging or diagnosing of computers which appear hung.


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 A floppy disk or floppy diskette (casually referred to as a floppy, or a diskette) is an obsolescent type of disk storage composed of a thin and flexible disk of a magnetic storage medium in a square or nearly square plastic enclosure lined ...
controller on the
Amstrad PCW The Amstrad PCW series is a range of personal computers produced by United Kingdom, British company Amstrad from 1985 to 1998, and also sold under licence in Europe as the "Joyce" by the German electronics company Schneider Computer Division, Schne ...
, 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), and the Low Battery signal on the HP 95LX. In the original
IBM PC The IBM Personal Computer (model 5150, commonly known as the IBM PC) is the first microcomputer released in the IBM PC model line and the basis for the IBM PC compatible de facto standard. Released on August 12, 1981, it was created by a tea ...
, 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 IBM PC compatible computers are similar to the original IBM PC, XT, and AT, all from computer giant IBM, that are able to use the same software and expansion cards. Such computers were referred to as PC clones, IBM clones or IBM 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 In computing, BIOS (, ; Basic Input/Output System, also known as the System BIOS, ROM BIOS, BIOS ROM or PC BIOS) is firmware used to provide runtime services for operating systems and programs and to perform hardware initialization during the ...
interrupt handler In computer systems programming, an interrupt handler, also known as an interrupt service routine or ISR, is a special block of code associated with a specific interrupt condition. Interrupt handlers are initiated by hardware interrupts, softw ...
would then translate the program's request to match the hardware that was actually present. The SMM in the
386SL The Intel 386, originally released as 80386 and later renamed i386, is a 32-bit microprocessor introduced in 1985. The first versions had 275,000 transistorshome 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 key was hooked up directly or indirectly to the NMI line on the 6502-series CPU, but the reset would take place only if the NMI handler routine in ROM detected that was also being held down when was struck (this combination being the Commodore version of a three finger salute). Commodore also connected the
MOS Technology MOS Technology, Inc. ("MOS" being short for Metal Oxide Semiconductor), later known as CSG (Commodore Semiconductor Group) and GMT Microelectronics, was a semiconductor design and fabrication company based in Audubon, Pennsylvania. It is mo ...
6526 The 6526/8520 Complex Interface Adapter (CIA) was an integrated circuit made by MOS Technology. It served as an I/O port controller for the 6502 family of microprocessors, providing for parallel and serial I/O capabilities as well as ti ...
CIA #2 in the
C64 The Commodore 64, also known as the C64, is an 8-bit home computer introduced in January 1982 by Commodore International (first shown at the Consumer Electronics Show, January 7–10, 1982, in Las Vegas). It has been listed in the Guinness Wo ...
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 button for this same purpose. Debugging NMIs have appeared in a number of forms, including the
Apple Macintosh The Mac (known as Macintosh until 1999) is a family of personal computers designed and marketed by Apple Inc. Macs are known for their ease of use and minimalist designs, and are popular among students, creative professionals, and software ...
's "programmers' button", and certain key combinations on Sun workstations. With the introduction of
Windows 2000 Windows 2000 is a major release of the Windows NT operating system developed by Microsoft and oriented towards businesses. It was the direct successor to Windows NT 4.0, and was released to manufacturing on December 15, 1999, and was official ...
,
Microsoft Microsoft Corporation is an American multinational corporation, multinational technology company, technology corporation producing Software, computer software, consumer electronics, personal computers, and related services headquartered at th ...
allowed the use of an NMI to cause a system to either break into a
debugger A debugger or debugging tool is a computer program used to test and debug other programs (the "target" program). The main use of a debugger is to run the target program under controlled conditions that permit the programmer to track its execut ...
, or dump the contents of memory to disk and reboot. 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 A 19-inch rack is a standardized frame or enclosure for mounting multiple electronic equipment modules. Each module has a front panel that is wide. The 19 inch dimension includes the edges or "ears" that protrude from each side of the equ ...
servers) provide a physical button specifically for this purpose. Other machines may expose this functionality via an expansion card. Miles Gordon Technology's
DISCiPLE A disciple is a follower and student of a mentor, teacher, or other figure. It can refer to: Religion * Disciple (Christianity), a student of Jesus Christ * Twelve Apostles of Jesus, sometimes called the Twelve Disciples * Seventy disciples in t ...
and +D products for the
ZX Spectrum The ZX Spectrum () is an 8-bit home computer that was developed by Sinclair Research. It was released in the United Kingdom on 23 April 1982, and became Britain's best-selling microcomputer. Referred to during development as the ''ZX81 Colou ...
featured an NMI-producing "magic button". On the
Nintendo Entertainment System The Nintendo Entertainment System (NES) is an 8-bit third-generation home video game console produced by Nintendo. It was first released in Japan in 1983 as the commonly known as the The NES, a redesigned version, was released in American ...
, an NMI is generated during each
vertical blanking interval In a raster scan display, the vertical blanking interval (VBI), also known as the vertical interval or VBLANK, is the time between the end of the final visible line of a frame or field and the beginning of the first visible line of the next fram ...
. 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 register disables vblank interrupts, and setting it enables them.


See also

*
Advanced Programmable Interrupt Controller In computing, Intel's Advanced Programmable Interrupt Controller (APIC) is a family of interrupt controllers. As its name suggests, the APIC is more advanced than Intel's 8259 Programmable Interrupt Controller (PIC), particularly enabling the co ...
(APIC) * Inter-processor interrupt (IPI) *
Interrupt In digital computers, an interrupt (sometimes referred to as a trap) is a request for the processor to ''interrupt'' currently executing code (when permitted), so that the event can be processed in a timely manner. If the request is accepted ...
*
Interrupt handler In computer systems programming, an interrupt handler, also known as an interrupt service routine or ISR, is a special block of code associated with a specific interrupt condition. Interrupt handlers are initiated by hardware interrupts, softw ...
*
Interrupt latency In computing, interrupt latency refers to the delay between the start of an Interrupt Request (IRQ) and the start of the respective Interrupt Service Routine (ISR). For many operating systems, devices are serviced as soon as the device's interrup ...
* Programmable Interrupt Controller (PIC)


Notes


External links

* * {{cite web , url=http://www.seasip.info/AmstradXT/ppctech/section1.html#1.11.5.4 , title=CGA Mode CRTC initialization , work=Amstrad PPC Technical Manual , publisher=seasip.info , accessdate=2013-08-31 Interrupts Debugging pt:Interrupção não-mascarada