question about catching hardware traps in Linux Kernel

Submitted by maui
on November 4, 2008 - 6:02am

Hi people,

I work with a fpga with a sparc architecture. In the processor which I programed is a hardware buffer over/underflow checker. And if a buffer over/underflow happens, the processor sends a trap.

I work with a snapgear-2.6-p36c/linux-2.6.21.1 kernel from gaisler.

On this fpga is a linux running. And here are my questions. Where have I catch the traps? I know that this happens in the kernel mode and that the kernel has to handle it (There are the files etrap.S, rtrap.S, traps.c in the file kernel). But it is really hard to find a documentation about this. How can I catch the traps? And where can I find a documentation about this?
Is there existing a table with the different traps? What is necessary to handle it in the correct way?

Thanks for help!

Nice greetings

Maria