OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 4:40 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: IDT's and GDT's
PostPosted: Sat Jul 28, 2001 11:00 pm 
I've been making a test kernel. Basically just
something to more or less play around with to learn
more about the PC and how it operates. Anyway,
When I define an IDT and I, then, enable interrupts,
the computer seems to triple fault. Another question
that I have is this...if you are in the bootloader and
you load a GDT, do you also have to reload this in
your kernel? If so, why? And if you have two differing
GDT's (kernel and bootloaders GDTs are different), can
this potentially make it to where when I create my IDT,
I have problems? Any help would be really appreciated.


Top
  
 
 Post subject: RE:IDT's and GDT's
PostPosted: Sat Jul 28, 2001 11:00 pm 
>On 2001-07-29 22:33:52, [email protected] wrote:
>I've been making a test kernel. Basically just
>something to more or less play around with to learn
>more about the PC and how it operates. Anyway,
>When I define an IDT and I, then, enable interrupts,
>the computer seems to triple fault. Another question
>that I have is this...if you are in the bootloader and
>you load a GDT, do you also have to reload this in
>your kernel? If so, why? And if you have two differing
>GDT's (kernel and bootloaders GDTs are different), can
>this potentially make it to where when I create my IDT,
>I have problems? Any help would be really appreciated.


Top
  
 
 Post subject: RE:IDT's and GDT's
PostPosted: Sat Jul 28, 2001 11:00 pm 
>On 2001-07-29 22:38:40, Anonymous wrote:
>>On 2001-07-29 22:33:52, [email protected] wrote:
>>I've been making a test kernel. Basically just
>>something to more or less play around with to learn
>>more about the PC and how it operates. Anyway,
>>When I define an IDT and I, then, enable interrupts,
>>the computer seems to triple fault.

Did you set up handlers(gates) in your IDT for the interrupts ??
Did you issue LIDT before STI ?
If you didn't and did not mask them,you will get tripple fault!
But In many cases the problem comes from setting wrong values
in the IDT ?

email: [email protected]









Another question
>>that I have is this...if you are in the bootloader and
>>you load a GDT, do you also have to reload this in
>>your kernel? If so, why? And if you have two differing
>>GDT's (kernel and bootloaders GDTs are different), can
>>this potentially make it to where when I create my IDT,
>>I have problems? Any help would be really appreciated.


Top
  
 
 Post subject: RE:IDT's and GDT's
PostPosted: Sun Jul 29, 2001 11:00 pm 
>On 2001-07-29 22:59:08, Anonymous wrote:
>>On 2001-07-29 22:38:40, Anonymous wrote:
>>>On 2001-07-29 22:33:52, [email protected] wrote:
>>>I've been making a test kernel. Basically just
>>>something to more or less play around with to learn
>>>more about the PC and how it operates. Anyway,
>>>When I define an IDT and I, then, enable interrupts,
>>>the computer seems to triple fault.
>
>Did you set up handlers(gates) in your IDT for the interrupts ??
>Did you issue LIDT before STI ?
>If you didn't and did not mask them,you will get tripple fault!
>But In many cases the problem comes from setting wrong values
>in the IDT ?
>
>email: [email protected]
>
Yes, I issued LIDT and created a table, but it's quite possible
that my values are screwy. The format of the IDT is

<16-bit offset of handler (low)>:<16-bit selector>:<16-bit "permissions" control (such as 8E, etc.)>:<16-bit offset of handler (high)>

Is this correct? Would anyone happen to know where I might see some
quick code that would just simply create an LDT, enough for me to do sti?
Nothing fancy ...just something simple? I really think something
in my LDT is wrong, personally.
>
>
>
>
>
>
>
>
> Another question
>>>that I have is this...if you are in the bootloader and
>>>you load a GDT, do you also have to reload this in
>>>your kernel? If so, why? And if you have two differing
>>>GDT's (kernel and bootloaders GDTs are different), can
>>>this potentially make it to where when I create my IDT,
>>>I have problems? Any help would be really appreciated.


Top
  
 
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: Bing [Bot], Google [Bot] and 81 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