OSDev.org

The Place to Start for Operating System Developers
It is currently Wed Apr 24, 2024 7:27 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 30 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: How can i load the IDT?
PostPosted: Mon Jan 02, 2017 6:50 am 
Offline
Member
Member

Joined: Sun Oct 09, 2016 4:38 am
Posts: 273
I want to load the IDT. However, i can't find a page with steps on how to do it, and i can't find what order to do it in.

How can i load the Interrupt Descriptor Table?

github at https://github.com/NunoLava1998/DixiumOS

_________________
Developing TRIODIUM OS. Or call it Dixium if you want. It doesn't matter.

https://github.com/NunoLava1998/DixiumOS


Top
 Profile  
 
 Post subject: Re: How can i load the IDT?
PostPosted: Mon Jan 02, 2017 6:56 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4594
Location: Chichester, UK
http://wiki.osdev.org/IDT


Top
 Profile  
 
 Post subject: Re: How can i load the IDT?
PostPosted: Mon Jan 02, 2017 6:57 am 
Offline
Member
Member

Joined: Sun Oct 09, 2016 4:38 am
Posts: 273
iansjack wrote:
http://wiki.osdev.org/IDT

I'm pretty sure i've read that a million times (and there is no text that shows how to do things). Not trying to offend.

_________________
Developing TRIODIUM OS. Or call it Dixium if you want. It doesn't matter.

https://github.com/NunoLava1998/DixiumOS


Top
 Profile  
 
 Post subject: Re: How can i load the IDT?
PostPosted: Mon Jan 02, 2017 7:02 am 
Offline
Member
Member
User avatar

Joined: Fri Aug 07, 2015 6:13 am
Posts: 1134
You load it with "lidt" instruction. If that was your question.

_________________
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader


Top
 Profile  
 
 Post subject: Re: How can i load the IDT?
PostPosted: Mon Jan 02, 2017 7:04 am 
Offline
Member
Member

Joined: Sun Oct 09, 2016 4:38 am
Posts: 273
octacone wrote:
You load it with "lidt" instruction. If that was your question.


I meant something else. I know you have to load it with lidt.

I'm using C by the way. I'll use C++ when needed.

_________________
Developing TRIODIUM OS. Or call it Dixium if you want. It doesn't matter.

https://github.com/NunoLava1998/DixiumOS


Top
 Profile  
 
 Post subject: Re: How can i load the IDT?
PostPosted: Mon Jan 02, 2017 7:05 am 
Offline
Member
Member

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


Since you are starting over, you should already know how to implement the features you implemented previously. Didn't you load the IDT previously? If so, why are you asking again the same question?

It's true that over time the community gets more experience as a whole, but:

Also, the wiki should describe it clearly enough. If you however have issues understanding the wiki, you can try to ask. :)

Edit: Also, would you please remove the image from your signature (or at least replace it with a much smaller one)?


Regards,
glauxosdever


Last edited by glauxosdever on Mon Jan 02, 2017 7:07 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: How can i load the IDT?
PostPosted: Mon Jan 02, 2017 7:07 am 
Offline
Member
Member

Joined: Tue Mar 04, 2014 5:27 am
Posts: 1108
NunoLava1998 wrote:
I meant something else.


Then be constructive and tell us what it is that you don't understand or are doing (show your code) which isn't working. We have limited mind reading.


Top
 Profile  
 
 Post subject: Re: How can i load the IDT?
PostPosted: Mon Jan 02, 2017 7:13 am 
Offline
Member
Member

Joined: Sun Oct 09, 2016 4:38 am
Posts: 273
glauxosdever wrote:
Hi,


Since you are starting over, you should already know how to implement the features you implemented previously. Didn't you load the IDT previously? If so, why are you asking again the same question?

It's true that over time the community gets more experience as a whole, but:

Also, the wiki should describe it clearly enough. If you however have issues understanding the wiki, you can try to ask. :)

Edit: Also, would you please remove the image from your signature (or at least replace it with a much smaller one)?


Regards,
glauxosdever


I didn't really load it, just that QEMU probably was too nice and loaded it for me. And even then, it didn't work. I'm making everything (except the IDT, of course) with a pinch of salt now.

To anyone asking to remove the image:
okay

To anyone asking what i mean:

I mean about what to do when loading the IDT in a lot of detail, like what order to do functions, what to do, etc., the IDT page does not offer much information (and is confusing).
I am not asking for code.

_________________
Developing TRIODIUM OS. Or call it Dixium if you want. It doesn't matter.

https://github.com/NunoLava1998/DixiumOS


Last edited by NunoLava1998 on Mon Jan 02, 2017 7:14 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: How can i load the IDT?
PostPosted: Mon Jan 02, 2017 7:13 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4594
Location: Chichester, UK
NunoLava1998 wrote:
iansjack wrote:
http://wiki.osdev.org/IDT

I'm pretty sure i've read that a million times (and there is no text that shows how to do things). Not trying to offend.

It describes the whole process of creating the IDT and loading it. What part don't you understand?

Or are you, perhaps, telling us that you don't understand the interrupt mechanism and how to write an interrupt handler?


Top
 Profile  
 
 Post subject: Re: How can i load the IDT?
PostPosted: Mon Jan 02, 2017 7:16 am 
Offline
Member
Member

Joined: Sun Oct 09, 2016 4:38 am
Posts: 273
iansjack wrote:
NunoLava1998 wrote:
iansjack wrote:
http://wiki.osdev.org/IDT

I'm pretty sure i've read that a million times (and there is no text that shows how to do things). Not trying to offend.

It describes the whole process of creating the IDT and loading it. What part don't you understand?

Or are you, perhaps, telling us that you don't understand the interrupt mechanism and how to write an interrupt handler?


Uhh, not the latter part.

I don't understand a lot how the loading IDT process is like, etc.

I just need a (lot) more detail, which order to make, what to do.
I am not asking for code, by the way.

_________________
Developing TRIODIUM OS. Or call it Dixium if you want. It doesn't matter.

https://github.com/NunoLava1998/DixiumOS


Top
 Profile  
 
 Post subject: Re: How can i load the IDT?
PostPosted: Mon Jan 02, 2017 7:22 am 
Offline
Member
Member

Joined: Tue Mar 04, 2014 5:27 am
Posts: 1108
If you know how interrupts work and you know that the IDT must be prepared and IDTR must be loaded with LIDT prior to using interrupts, what's left that you don't understand? Do you understand how GDT, GDTR and LGDT work? This is very similar. Selectors, offsets, segment/gate types, privilege levels, etc.


Top
 Profile  
 
 Post subject: Re: How can i load the IDT?
PostPosted: Mon Jan 02, 2017 7:24 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4594
Location: Chichester, UK
OK. So you know how to write an interrupt handler. The wiki page tells you the format of the descriptors in the IDT and how to tell the processor where the table is located.

So what don't you understand?


Top
 Profile  
 
 Post subject: Re: How can i load the IDT?
PostPosted: Mon Jan 02, 2017 7:32 am 
Offline
Member
Member

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


If you don't understand something on the wiki, I'll try to rephrase it so it is more clear.


Regards,
glauxosdever


Top
 Profile  
 
 Post subject: Re: How can i load the IDT?
PostPosted: Mon Jan 02, 2017 7:49 am 
Offline
Member
Member

Joined: Sun Oct 09, 2016 4:38 am
Posts: 273
iansjack wrote:
OK. So you know how to write an interrupt handler. The wiki page tells you the format of the descriptors in the IDT and how to tell the processor where the table is located.

So what don't you understand?


how to actually load the IDT (what do i need to prepare, what do i put in the lidt instruction, etc.)

alexfru wrote:
If you know how interrupts work and you know that the IDT must be prepared and IDTR must be loaded with LIDT prior to using interrupts, what's left that you don't understand? Do you understand how GDT, GDTR and LGDT work? This is very similar. Selectors, offsets, segment/gate types, privilege levels, etc.


I don't understand the GDT too, however GRUB already loads this.

glauxosdever wrote:
Hi,


If you don't understand something on the wiki, I'll try to rephrase it so it is more clear.


Regards,
glauxosdever


Okay. The IDT page doesn't offer much, so you can try to add more information.

_________________
Developing TRIODIUM OS. Or call it Dixium if you want. It doesn't matter.

https://github.com/NunoLava1998/DixiumOS


Top
 Profile  
 
 Post subject: Re: How can i load the IDT?
PostPosted: Mon Jan 02, 2017 7:55 am 
Offline
Member
Member

Joined: Tue Mar 04, 2014 5:27 am
Posts: 1108
NunoLava1998 wrote:
iansjack wrote:
OK. So you know how to write an interrupt handler. The wiki page tells you the format of the descriptors in the IDT and how to tell the processor where the table is located.

So what don't you understand?


how to actually load the IDT (what do i need to prepare, what do i put in the lidt instruction, etc.)


Perhaps, you should follow your own advice?:
NunoLava1998 wrote:
Read a bit more of your books and the wiki and you should be able to get it working.


Have you downloaded the CPU manual and located the descriptions of GDT, GDTR, LGDT? Ditto for IDT, IDTR, LIDT?


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

All times are UTC - 6 hours


Who is online

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