Random interrupt bug

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
dschatz
Member
Member
Posts: 61
Joined: Wed Nov 10, 2010 10:55 pm

Random interrupt bug

Post by dschatz »

Hi All,

I'm working on a 64 bit kernel and I've been testing under bochs and I can't seem to understand what is happening with my kernel. I boot and disable pic, pit, rtc, setup idt, enable apic, then I send an IPI to myself, and turn on interrupts. I receive the correct IPI vector and continue executing. Then, I send an IPI to another core (after starting it up) and I rfi from my original self ipi (this enables interrupts again). When I do this, I immediately receive exception 15 (0xf). This makes no sense to me though. Its not a processor exception, and I don't think its a valid vector from the APIC or IOAPIC. I've tried to get info from bochs but I can't figure out how to know what caused the exception. Any ideas?
dschatz
Member
Member
Posts: 61
Joined: Wed Nov 10, 2010 10:55 pm

Re: Random interrupt bug

Post by dschatz »

I've solved this issue. I never initialized the PIC before masking all the IRQs and for some reason this gave me an interrupt when I turned on interrupts (but only when I didn't already have a pending one).
Post Reply