Page 1 of 1

GPF

Posted: Thu Apr 19, 2012 1:00 pm
by dilipcs1992
Hey Everyone,
i have problem with my kernel code,
i'm getting #GPF exception , when irq is disabled every thing works fine,
if irq is enabled i get #GPF , i read the intel's developer manual and
i tried to debugg but not success full to clear the error
please help me
when i run kernel on bochs
the console shows iret: return CS selector null

Re: GPF

Posted: Thu Apr 19, 2012 1:01 pm
by Griwes
You have provided only one important information (the problem), where is your source code that causes the #GPF and what does it try to do?

Re: GPF

Posted: Thu Apr 19, 2012 1:52 pm
by AJ
Hi,

Your IRQ handler is trashing the stack.

Cheers,
Adam

Re: GPF

Posted: Thu Apr 19, 2012 2:05 pm
by iansjack
Read my advice in the General Programming forum. Single-step through your interrupt code in a debugger and the answer should be obvious.

You have written interrupt handlers for all enabled interrupts, and set up the appropriate interrupt table of descriptors, haven't you?