OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Apr 16, 2024 9:56 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: GDT, IDT
PostPosted: Mon Feb 25, 2002 6:11 pm 
Okay, I think that I have this right, your OS doesn't have sevral GDTs it has one GDT with several descriptors in it. Right?

Also, does anyone know where I can find a good example of setting up a IDT?

Thanks in advance,
K.J.


Top
  
 
 Post subject: Re: GDT, IDT
PostPosted: Tue Feb 26, 2002 11:15 am 
Could someone please at least confirm the first part?

Thanks,
K.J.


Top
  
 
 Post subject: Re: GDT, IDT
PostPosted: Tue Feb 26, 2002 5:09 pm 
>Okay, I think that I have this right, your OS doesn't have sevral GDTs it has one GDT with several descriptors in it. Right?

Right.

>Also, does anyone know where I can find a good example of setting up a IDT?

This (NASM) code sets up handlers for all 256 INTs. There are also setvect() and getvect() functions to change the handlers from C:
http://www.execpc.com/~geezer/osd/code/osd6/kstart.asm

Similar code:
http://www.execpc.com/~geezer/osd/intr/x86-32.zip

In the current version of my Cosmos OS, there is no setvect() or getvect(): all interrupts go through one handler. This is simpler, but slower:
http://www.execpc.com/~geezer/os/index.htm#cosmos


Top
  
 
 Post subject: Re: GDT, IDT
PostPosted: Tue Feb 26, 2002 6:18 pm 
Thanks, that was just what I needed. :)

K.J.


Top
  
 
 Post subject: Re: GDT, IDT
PostPosted: Wed Mar 06, 2002 10:17 am 
Could you maybe give me an example of using the getvect() and setvect functions please(from kstart.asm)?

Thanks,
K.J.


Top
  
 
 Post subject: Re: GDT, IDT
PostPosted: Wed Mar 06, 2002 4:29 pm 
>Could you maybe give me an example of using the getvect() and setvect functions please(from kstart.asm)?

http://www.execpc.com/~geezer/osd/code/osd6/main.c

down at the bottom, in main()


Top
  
 
 Post subject: Re: GDT, IDT
PostPosted: Wed Mar 06, 2002 6:23 pm 
Thanks, that's what I needed. However, your link to the file didn't work, but I found it in osd.zip.

Thanks,
K.J.


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: 0xY, DotBot [Bot], MichaelPetch, osdev199 and 756 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