> I am using Linux on a Compact PCI system with a System Controller and > a set > of Peripheral boards. Each time one of these peripheral boards is hot > swapped a NMI interrupt is generated on the System Controller board. > I have > in mind to write a driver that handles these NMI interrupts. I don't > really > want to start hacking the kernel source, but would rather like to > build a > module that can be loaded at some point. Why ? Modify the kernel source, it's not difficult and is almost definitely the best solution. > My idea is to get the module to > replace the NMI vector to the existing NMI handler function (in > linux/arch/i386/kernel/entry.S that is set from the trap_init function > in > /linux/arch/i386/kernel/traps.c) with my own handler function, calling > the > previous handler if necessary after my handler has done its bit. A > pretty > standard idea. Now, in terms of swimming, I still have my inflatable > armbands on here! So I was wondering if this were possible? It's possible, but is horrifically ugly. If you really really want to do this, check out oprofile.sf.net source code, particularly the code that calls _set_gate(). > module? Looking through the traps.c file I see that there is a > function > trap_init_f00f_bug which makes the IDT read only? It makes a copy read only iirc john -- "I know I believe in nothing but it is my nothing" - Manic Street Preachers -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/