OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 1:11 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: (IDT) General protection fault after a few key presses
PostPosted: Wed Jan 12, 2022 3:14 pm 
Offline

Joined: Mon Jan 10, 2022 12:04 pm
Posts: 3
Hey, I've recently been working on implementing an IDT and everything seems to be working fine, but after quite a few key presses a general protection fault occurs and I'm unable to identify what's wrong. Help would be greatly appreciated.

Code: https://github.com/LeonTheDev/Trout/tree/main/Kernel/src/cpu/idt


Top
 Profile  
 
 Post subject: Re: (IDT) General protection fault after a few key presses
PostPosted: Wed Jan 12, 2022 4:08 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5100
Your assembly stub does not save registers that will be clobbered by the C++ code. Your assembly stub does not ensure registers contain values that are appropriate for the C++ ABI (particularly RFLAGS.DF and RSP). Your "irq" variable will be clobbered by any nested interrupts. Your assembly stub for exceptions that push error codes onto the stack does not pass the error code to the exception handler.

What have you tried so far to debug the issue?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: SemrushBot [Bot] and 63 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group