On 10-5-19 下午10:42, Samuel Thibault wrote: > Zheng Da, le Thu 13 May 2010 08:59:59 -0400, a écrit : >> general protection trap. I tried several drivers and always got the >> same problem. >> The error can be seen at http://i.imagehost.org/0382/Screenshot.png. >> >> addr2line shows me 0x1076e6 is at >> /root/gnumach-build/../gnumach/i386/i386/spl.S:217 >> I don't know whether the error is caused by my change in gnumach or >> the error exists in >> gnumach itself. It's probably not very easy to check as the error >> occurs when a user-level >> driver runs. > > I'd tend to guess that what happens is that some interrupt was disabled > before the spl() call but got triggered and is thus pending. As soon as > spl() enables it, the chipset actually raises the interrupt, the CPU > enters the interrupt handler, etc. and somehow that handler doesn't > properly restore the stack (i.e. the bug would not be in spl() at all, > but in some interrupt handler). > > How do you route interrupts from GNU Mach to the user-level driver? interrupts for dde drivers are captured in linux_intr(). I first record the interrupt in the list and then use a dedicated thread to deliver interrupt messages to the user space.
Zheng Da