Loading IDT ISR's triple faults?!?!?

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.
User avatar
DixiumOS
Member
Member
Posts: 84
Joined: Tue Jan 10, 2017 3:19 pm
Libera.chat IRC: NunoLava1998

Loading IDT ISR's triple faults?!?!?

Post by DixiumOS »

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
User avatar
iansjack
Member
Member
Posts: 4706
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Loading IDT ISR's triple faults?!?!?

Post by iansjack »

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.
User avatar
DixiumOS
Member
Member
Posts: 84
Joined: Tue Jan 10, 2017 3:19 pm
Libera.chat IRC: NunoLava1998

Re: Loading IDT ISR's triple faults?!?!?

Post by DixiumOS »

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
alexfru
Member
Member
Posts: 1112
Joined: Tue Mar 04, 2014 5:27 am

Re: Loading IDT ISR's triple faults?!?!?

Post by alexfru »

Nuno, what exactly do you think the following does

Code: Select all

(unsigned)isr0()
given

Code: Select all

int isr0() {
	__asm__ volatile ("iret");
	return 0;
}
?
User avatar
iansjack
Member
Member
Posts: 4706
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Loading IDT ISR's triple faults?!?!?

Post by iansjack »

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.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Loading IDT ISR's triple faults?!?!?

Post by Love4Boobies »

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 ]
Octocontrabass
Member
Member
Posts: 5587
Joined: Mon Mar 25, 2013 7:01 pm

Re: Loading IDT ISR's triple faults?!?!?

Post by Octocontrabass »

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: Select all

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

Code: Select all

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.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Loading IDT ISR's triple faults?!?!?

Post by Love4Boobies »

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.
Last edited by Love4Boobies on Thu Jan 12, 2017 6:10 am, edited 1 time in total.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
Octocontrabass
Member
Member
Posts: 5587
Joined: Mon Mar 25, 2013 7:01 pm

Re: Loading IDT ISR's triple faults?!?!?

Post by Octocontrabass »

Sorry.

I'm just really annoyed by all these inane threads. I think I'll take a break for a while.
User avatar
dchapiesky
Member
Member
Posts: 204
Joined: Sun Dec 25, 2016 1:54 am
Libera.chat IRC: dchapiesky

Re: Loading IDT ISR's triple faults?!?!?

Post by dchapiesky »

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...
User avatar
DixiumOS
Member
Member
Posts: 84
Joined: Tue Jan 10, 2017 3:19 pm
Libera.chat IRC: NunoLava1998

Re: Loading IDT ISR's triple faults?!?!?

Post by DixiumOS »

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
alexfru
Member
Member
Posts: 1112
Joined: Tue Mar 04, 2014 5:27 am

Re: Loading IDT ISR's triple faults?!?!?

Post by alexfru »

O rly?
glauxosdever
Member
Member
Posts: 501
Joined: Wed Jun 17, 2015 9:40 am
Libera.chat IRC: glauxosdever
Location: Athens, Greece

Re: Loading IDT ISR's triple faults?!?!?

Post by glauxosdever »

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
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Loading IDT ISR's triple faults?!?!?

Post by Love4Boobies »

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 ]
User avatar
iansjack
Member
Member
Posts: 4706
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Loading IDT ISR's triple faults?!?!?

Post by iansjack »

I'm predicting the very next thing is that (for no reason whatsoever) it triple-faults when an interrupt is fired. Just a hunch.
Post Reply