GPF

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
dilipcs1992
Posts: 5
Joined: Sat Dec 03, 2011 8:58 am

GPF

Post 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
Last edited by dilipcs1992 on Thu Apr 19, 2012 1:22 pm, edited 1 time in total.
User avatar
Griwes
Member
Member
Posts: 374
Joined: Sat Jul 30, 2011 10:07 am
Libera.chat IRC: Griwes
Location: Wrocław/Racibórz, Poland
Contact:

Re: GPF

Post 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?
Reaver Project :: Repository :: Ohloh project page
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: GPF

Post by AJ »

Hi,

Your IRQ handler is trashing the stack.

Cheers,
Adam
User avatar
iansjack
Member
Member
Posts: 4711
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: GPF

Post 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?
Post Reply