OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Apr 18, 2024 4:16 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Loading IDT ISR's triple faults?!?!?
PostPosted: Thu Jan 12, 2017 5:50 am 
Offline
Member
Member
User avatar

Joined: Tue Jan 10, 2017 3:19 pm
Posts: 84
I'm trying to load the IDT.

However, when i try to load the IDT ISR's, it triple faults for whatever reason (suprisingly it doesn't at lidt, it does at adding the IDT ISR's).

Code at https://github.com/NunoLava1998/DixiumO ... rupt/idt.c (look at addisrfunctions)

How would i make this not triple fault?

_________________
(not so frequently updated) Code is at:

https://github.com/NunoLava1998/DixiumOS-1


Top
 Profile  
 
 Post subject: Re: Loading IDT ISR's triple faults?!?!?
PostPosted: Thu Jan 12, 2017 5:57 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4594
Location: Chichester, UK
DixiumOS wrote:
How would i make this not triple fault?
You fix what is wrong with the code.

Listing every mistake that you make (and listing the same mistake time after time) makes you look like an incompetent fool.


Top
 Profile  
 
 Post subject: Re: Loading IDT ISR's triple faults?!?!?
PostPosted: Thu Jan 12, 2017 6:01 am 
Offline
Member
Member
User avatar

Joined: Tue Jan 10, 2017 3:19 pm
Posts: 84
iansjack wrote:
DixiumOS wrote:
How would i make this not triple fault?
You fix what is wrong with the code.

Listing every mistake that you make (and listing the same mistake time after time) makes you look like an incompetent fool.


I don't list every mistake i make.
Besides, you normally just argue.

_________________
(not so frequently updated) Code is at:

https://github.com/NunoLava1998/DixiumOS-1


Top
 Profile  
 
 Post subject: Re: Loading IDT ISR's triple faults?!?!?
PostPosted: Thu Jan 12, 2017 6:01 am 
Offline
Member
Member

Joined: Tue Mar 04, 2014 5:27 am
Posts: 1108
Nuno, what exactly do you think the following does

Code:
(unsigned)isr0()


given
Code:
int isr0() {
   __asm__ volatile ("iret");
   return 0;
}

?


Top
 Profile  
 
 Post subject: Re: Loading IDT ISR's triple faults?!?!?
PostPosted: Thu Jan 12, 2017 6:03 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4594
Location: Chichester, UK
DixiumOS wrote:
Besides, you normally just argue.
I'm fed up with trying to help you as you have proven to be terminally incapable of learning.

If you aren't posting every mistake that you make then the mind boggles as to what the ones that you don't post are.


Top
 Profile  
 
 Post subject: Re: Loading IDT ISR's triple faults?!?!?
PostPosted: Thu Jan 12, 2017 6:05 am 
Offline
Member
Member
User avatar

Joined: Fri Mar 07, 2008 5:36 pm
Posts: 2111
Location: Bucharest, Romania
Wait, you mean as long as the compiler doesn't complain he can't just use a random combination of symbols and expect his code to work?

Seriously, if you don't understand what you are doing, how can you expect to explain it to a computer?

_________________
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]


Top
 Profile  
 
 Post subject: Re: Loading IDT ISR's triple faults?!?!?
PostPosted: Thu Jan 12, 2017 6:06 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5137
Remember all those "bugs" in the tutorial you "fixed"?

The tutorial was right and your "fixes" are wrong.


More specifically, this code from the tutorial is right:
Code:
idt_set_gate(0, (unsigned)isr0, 0x08, 0x8E);


And this code you're using is wrong:
Code:
idt_set_gate(0, (unsigned)isr0(), 0x08, 0x8E);


You can't write an OS unless you know the difference between those two lines of code.


Top
 Profile  
 
 Post subject: Re: Loading IDT ISR's triple faults?!?!?
PostPosted: Thu Jan 12, 2017 6:08 am 
Offline
Member
Member
User avatar

Joined: Fri Mar 07, 2008 5:36 pm
Posts: 2111
Location: Bucharest, Romania
Octocontrabass, stop being being like that. You are really not helping. Now his understanding is "oops, I added some extra parantheses, that was an easy fix" and will move on to the next thing to flood the forum with. He's supposed to try to understand something for once. On IRC he really showed that he doesn't even understand how variables work so if you stop pointing fixes out, he will be forced to get himself out of trouble.

_________________
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]


Last edited by Love4Boobies on Thu Jan 12, 2017 6:10 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Loading IDT ISR's triple faults?!?!?
PostPosted: Thu Jan 12, 2017 6:09 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5137
Sorry.

I'm just really annoyed by all these inane threads. I think I'll take a break for a while.


Top
 Profile  
 
 Post subject: Re: Loading IDT ISR's triple faults?!?!?
PostPosted: Thu Jan 12, 2017 6:49 am 
Offline
Member
Member
User avatar

Joined: Sun Dec 25, 2016 1:54 am
Posts: 204
Love4Boobies wrote:
Wait, you mean as long as the compiler doesn't complain he can't just use a random combination of symbols and expect his code to work?


That's called APL :lol:

_________________
Plagiarize. Plagiarize. Let not one line escape thine eyes...


Top
 Profile  
 
 Post subject: Re: Loading IDT ISR's triple faults?!?!?
PostPosted: Thu Jan 12, 2017 7:04 am 
Offline
Member
Member
User avatar

Joined: Tue Jan 10, 2017 3:19 pm
Posts: 84
Yeah, somehow that made it triple fault.

Finally i'm out of this hell called loading the GDT and IDT and now can continue.

_________________
(not so frequently updated) Code is at:

https://github.com/NunoLava1998/DixiumOS-1


Top
 Profile  
 
 Post subject: Re: Loading IDT ISR's triple faults?!?!?
PostPosted: Thu Jan 12, 2017 7:23 am 
Offline
Member
Member

Joined: Tue Mar 04, 2014 5:27 am
Posts: 1108
O rly?


Top
 Profile  
 
 Post subject: Re: Loading IDT ISR's triple faults?!?!?
PostPosted: Thu Jan 12, 2017 7:28 am 
Offline
Member
Member

Joined: Wed Jun 17, 2015 9:40 am
Posts: 501
Location: Athens, Greece
Hi,


DixiumOS wrote:
Finally i'm out of this hell called loading the GDT and IDT and now can continue.
The best thing to do now is to learn C.


Regards,
glauxosdever


Top
 Profile  
 
 Post subject: Re: Loading IDT ISR's triple faults?!?!?
PostPosted: Thu Jan 12, 2017 7:36 am 
Offline
Member
Member
User avatar

Joined: Fri Mar 07, 2008 5:36 pm
Posts: 2111
Location: Bucharest, Romania
Oh, good. The simplest part is done. Now you can continue getting stuck at the very next thing.

_________________
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]


Top
 Profile  
 
 Post subject: Re: Loading IDT ISR's triple faults?!?!?
PostPosted: Thu Jan 12, 2017 8:08 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4594
Location: Chichester, UK
I'm predicting the very next thing is that (for no reason whatsoever) it triple-faults when an interrupt is fired. Just a hunch.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 333 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