General protection fault on interrupts > 0x2F

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
Cl9
Posts: 7
Joined: Sun Apr 24, 2016 9:08 am
Libera.chat IRC: Cl9

General protection fault on interrupts > 0x2F

Post by Cl9 »

Hi, I've been following the Kernel tutorials by James Molloy (and have applied the fixes listed in the known issues wiki page), and have been testing out interrupts.

Interrupts work fine, and call the appropriate handler up to 0x2F (47), but any larger than that and I get a general protection fault. Interrupt 0x30 (48) for example gives a general protection fault with error code 386.

Is this a known issue with the tutorial, has anyone else experienced this issue?
Techel
Member
Member
Posts: 215
Joined: Fri Jan 30, 2015 4:57 pm
Location: Germany
Contact:

Re: General protection fault on interrupts > 0x2F

Post by Techel »

Have a look at the error Code: http://wiki.osdev.org/Exceptions#Genera ... tion_Fault
Is interrupt descriptor 48 and following properly set up?
Cl9
Posts: 7
Joined: Sun Apr 24, 2016 9:08 am
Libera.chat IRC: Cl9

Re: General protection fault on interrupts > 0x2F

Post by Cl9 »

It should be, I've registered an interrupt handler from it and created the interrupt properly. The exact same code works for interrupts below that number after altering the handler/interrupt registering.

It's also still running in ring 0 where paging isn't yet set up, so it shouldn't be a permissions issue.
User avatar
BrightLight
Member
Member
Posts: 901
Joined: Sat Dec 27, 2014 9:11 am
Location: Maadi, Cairo, Egypt
Contact:

Re: General protection fault on interrupts > 0x2F

Post by BrightLight »

Cl9 wrote:It should be, I've registered an interrupt handler from it and created the interrupt properly. The exact same code works for interrupts below that number after altering the handler/interrupt registering.

It's also still running in ring 0 where paging isn't yet set up, so it shouldn't be a permissions issue.
Permission issues cause Page Faults, not General Protection Faults. Check the error code and let us see it.
You know your OS is advanced when you stop using the Intel programming guide as a reference.
Cl9
Posts: 7
Joined: Sun Apr 24, 2016 9:08 am
Libera.chat IRC: Cl9

Re: General protection fault on interrupts > 0x2F

Post by Cl9 »

Erm, I might have forgotten to register it properly before hand with the descriptor tables....

That took me a few hours too long to figure out :'(
Post Reply