OSDev.org

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

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Is it normal to be in a reboot loop after STI?
PostPosted: Sun Sep 18, 2022 6:38 pm 
Offline

Joined: Sun Sep 18, 2022 6:33 pm
Posts: 1
I followed https://wiki.osdev.org/Interrupts_tutorial, and did not proceed to any of the "next steps". I did not want to move on until the reboot loop problem is solved, and spent a whole day searching around for a fix with no result. I'm starting to wonder if it is supposed to be like this, before Initialize the PIC like the "next steps" said?


Top
 Profile  
 
 Post subject: Re: Is it normal to be in a reboot loop after STI?
PostPosted: Fri Sep 23, 2022 8:10 am 
Offline
Member
Member

Joined: Fri Feb 11, 2022 4:55 am
Posts: 435
Location: behind the keyboard
The reboot at "STI" instruction means that a CPU Tripple fault happened. How do you initialize your IDT ?

When you activate irqs with STI, it is probably that a pending interrupt fires and you have not a correct handler for it, or you didn't setup your IDT Well.

Devc1,


Top
 Profile  
 
 Post subject: Re: Is it normal to be in a reboot loop after STI?
PostPosted: Fri Sep 23, 2022 9:36 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
32-bit or 64-bit?

How are you booting your code?

Are you using a cross-compiler?

Which emulator are you using to run your code?


Top
 Profile  
 
 Post subject: Re: Is it normal to be in a reboot loop after STI?
PostPosted: Fri Sep 23, 2022 11:15 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
KirkKD wrote:
I'm starting to wonder if it is supposed to be like this, before Initialize the PIC like the "next steps" said?

Since you haven't yet initialized the PIC, you have no control over which interrupts will arrive when you use the STI instruction, and it's very likely that it will either cause an exception or directly call one of the exception vectors. Your exception handlers should halt the CPU. Since the CPU doesn't halt, something isn't working correctly.


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: SemrushBot [Bot] and 87 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group