[SOLVED] Odd number in General Protection Fault error code?

Programming, for all ages and all languages.
Post Reply
HugeCode
Member
Member
Posts: 112
Joined: Mon Dec 17, 2012 9:12 am

[SOLVED] Odd number in General Protection Fault error code?

Post by HugeCode »

Have you ever seen GPF error code to be odd?
When set up an invalid user-mode GDT entry, it threw me exception with error code with first three bits clear.
Is it possible since the GDT and IDT entries are 8 bytes long?

This happened to me:
Image
What can be wrong here?
Last edited by HugeCode on Sat Jun 29, 2013 2:09 am, edited 2 times in total.
User avatar
iansjack
Member
Member
Posts: 4706
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Odd number in General Protection Fault error code?

Post by iansjack »

Difficult to tell with such scant information, but I suspect it's a case of GIGO. Just single-step through the code to see what you are doing wrong.
HugeCode
Member
Member
Posts: 112
Joined: Mon Dec 17, 2012 9:12 am

Re: Odd number in General Protection Fault error code?

Post by HugeCode »

I'm not invoking any interrupt there. I tried to clear HW ints and it doesn't occur.... Interesting... The only thing I set is timer, and that is located on 0x100 (0 -timer mapped to 0x20). So if it's timer, why are there additional 3? Does it have something to do with user mode?
Gigasoft
Member
Member
Posts: 856
Joined: Sat Nov 21, 2009 5:11 pm

Re: Odd number in General Protection Fault error code?

Post by Gigasoft »

Why is it that some people consider this forum as an alternative to reading the manual? If you had read it, you would have known what the error code meant, namely that there was a problem with IDT entry 0x20 when processing a hardware interrupt.
Post Reply