> Sorry if this is a silly question - I'm not remarkably familiar with
> RTLinux.
> I'm trying to decide if using RTL is a good way to approach a problem.
> 
> Is it possible to intercept an NMI (specifically an interrupt generated
> by an ISA bus IO CHANNEL CHECK condition)? I have a device 
> (a hw watchdog) which will generate an IOCHCHK upon timeout.
> 
> I want to do some logging on this condition before the board is reset ...
> 
> I see an rtl_request_irq() interface to register a handler, but I'm not
> sure what the irq passed here actually indicates - a vector number? 

not realy its a IRQ number that maps to vector NUM_IRQ+32 

> 
> If anyone could clarify this for me, I'd appreciate it! I'm not really an
> expert on x86 interrupt controller architecture ... 

I'll try....

basically there is no difference between IRQ's and NMI's , that is the 
mechanism of handling them is the same, the diffenence is only that the
NMI's (obviously) ignore the IF and that NMI's have vectors of 0-31 as
opposed to IRQ's that are at IRQ_NUM+32 .

To catch an NMI you need to modify the handler, which is set up during system 
initialization. All vectors are set to a dummy handler first (setup.S: rp_sidt)
that will only printk a message about a unknown interrupt exept for the ones
that are associated with real exeptions those are later initialized to point
to the appropriate handlers (traps.c:trap_init() by calling set_trap_gate()
and set_system_gate()). So if you do receive a message on the console or in 
the logfiles ("unknown interrupt") then you should be able to install a real 
handler for this event and thus catch it or modify the dummy handler to dump 
the stack or whatever you need (the dummy handler should never be called 
anyway....).

hofrat
*------------------------------------------------------------------------*
*THERE           {__}                         Universitaet Wien          *
*IS              oo )                      Inst. f. Materialphysik       *
*LIFE           O_   `_-------.              Mc  Guire  Nicholas         *
*IN               (-.         ,-\                                        *
*THE               || )---<  )            [EMAIL PROTECTED] *
*NET !             |||     | |          privat: [EMAIL PROTECTED]         *
*                                     [EMAIL PROTECTED]   *
*------------------------------------------------------------------------*
*ASCII-COW (C) 1996-2001 [EMAIL PROTECTED]   http://www.hofr.at           *
*------------------------------------------------------------------------*
 Hinweis fuer HNA und HAA: englisch ist KEIN verschluesselungsverfahren ! 

-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to