Hi,

I would be interested in finding out what are the cases in which a NMI is triggered.
If anyone knows any site where I might find a list of these NMIs could you please tell me.

Thanks. :)
Posted on 2009-01-05 12:26:07 by razvi9
NMI's are 'always' serviced... there's no trigger cases.
Posted on 2009-01-05 15:42:16 by Homer

NMI's are 'always' serviced... there's no trigger cases.



The "Non-Maskable" in Non-Maskable Interrupt ;)


Hi,

I would be interested in finding out what are the cases in which a NMI is triggered.
If anyone knows any site where I might find a list of these NMIs could you please tell me.

Thanks. :)


IIRC, there isn't any standard list. Unless you want to go diving into manufacturer/model-specific chipset documentation, if even available, the best thing to do on an NMI is to dump as much info about the current run-state as possible and halt the system.
Posted on 2009-01-05 20:14:20 by SpooK
It usually goes something like this...

Super critical error -> NMI -> BSOD

Though it is occasionally accompanied by technicians scratching their heads and on rare occasions replacement parts.

Joking ofcourse, you might want to check some non-Windows open source OSes, they will likely have service routines for a few NMIs.
Posted on 2009-01-05 22:56:52 by donkey
NMI (INT 02) occurs (usually) when a piece of hardware signals the NMI pin of the CPU (the APIC can also signal it).
It occurs regardless of IF/cli and takes precedence over any IRQ happening.

The only time I saw it in action was a memory parity error on a 286/dos4, but any hardware can signal the cpu's NMI pin.
Usually it is a really bad problem with hardware - unfortunately this can mean a little chip on the mainboard  :sad:
Posted on 2009-01-05 23:34:05 by sinsi
They're a real pain to code too, because of 're-entrancy' ... NMI are always services IMMEDIATELY, they are the lowest level interrupt request on the machine.

If you replace the system NMI routine with your own (which must jump to the system NMI when its done), and your NMI takes too long to complete, the hardware can trigger another NMI, which will be serviced IMMEDIATELY, even if the current NMI isn't finished yet. Think about what that means.

Suggestion: if you write your own NMI, make it short and sweet.


Posted on 2009-01-05 23:47:44 by Homer
Suggestion: if you write your own NMI, make it short and sweet.

Forget it I reckon...something really really bad has happened (hey, BSOD anyone?)  :lol:

edit: Isn't a triple-fault part of NMI? Wading through the intel pdf's seems to trigger a memory...
Posted on 2009-01-05 23:59:14 by sinsi
Triple fault is somewhat different topic.

One of my professors who specializes in low-level hardware stuff said that NMI is used to inform about fatal hardware errors. You can't do very much about them. The idea is to enable the OS to "do whatever it can to save user's work and then shut down". The most frequent situation which triggers NMI is RAM's parity error. When it occurrs, the OS knows that last processed byte(s) is/are invalid. It can try to remedy the situation (for example it may try to read/write/whatever these bytes again), and/or display BSOD.
Posted on 2009-01-06 07:13:43 by ti_mo_n
Not accurate... NMI can be used for any purpose, with some care and some caveats.
Posted on 2009-01-11 08:00:38 by Homer
At our college, we had a custom programming board. It had a big NMI button that triggered a built-in debugger on the console.
Posted on 2009-03-08 06:45:25 by comrade