hello, my kernel is running in ring0(or at least is suppose to!). When a thread returns i make it issue an int instruction and I get a GPF with error code 0x7fa. Is that normal?? what should i do then?
thank you for your help
GPF and int instruction
tanks for your answer.
yes i tried to debug the code. I' m also sure the segment is good and the IDT segment has been setted up the same way as the isr interrupt vector. I think that if the problem were comming from here, i would get another exeption than a GPF. Actually, the GPF occures on the "int" instruction, not while loading the handler.
I finally choose to handle it in my GPF handler near the v86 handler.
yes i tried to debug the code. I' m also sure the segment is good and the IDT segment has been setted up the same way as the isr interrupt vector. I think that if the problem were comming from here, i would get another exeption than a GPF. Actually, the GPF occures on the "int" instruction, not while loading the handler.
I finally choose to handle it in my GPF handler near the v86 handler.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
If your GPF handler points to the INT instruction, then it is indeed that instruction that causes the GPF. Given that you are in protected mode, it will always look at the IDT and try to load the corresponding entry. If if finds something unusual there the result can very easily become that the GPF handler is called because it fails to enter the normal handler.jtlb wrote:Actually, the GPF occures on the "int" instruction, not while loading the handler.