GDT and IDT memory locations

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.
Post Reply
ManOfSteel

GDT and IDT memory locations

Post by ManOfSteel »

Hello,
I would like to know, in your opinion, where is the best locations (pro and cons) for the GDT and the IDT: at a fixed memory location (for example, bases = 0x500 and 0xD00) or along with the kernel code (bases = GDT and IDT first entries).
I ask this because I've tried them both and while both of them worked fine on any real computer, the fixed location technique caused me a lot of troubles on Bochs, like tripple faulting for no clear reason when loading the kernel at 1mb and using any interrupt or adding entries to the GDT (new segments and call-gates).
Thanks in advance.
ManOfSteel

Re:GDT and IDT memory locations

Post by ManOfSteel »

Is my question so silly that noone here wants to answer it or is it me who didn't ask it in the right way?
Mr. L

Re:GDT and IDT memory locations

Post by Mr. L »

well, it is new years eve/day so I guess everyone is out partying. ;D
User avatar
Neo
Member
Member
Posts: 842
Joined: Wed Oct 18, 2006 9:01 am

Re:GDT and IDT memory locations

Post by Neo »

I dont see anything wrong with either approach.
But using the fixed address method may prove a hindrance sometime later on if you accidentally overwrite etc. or use it in some other way (Hmm... actually this makes me think it might be better if it was fixed as it would be easier to debug).
Ah Well... I guess it your choice after all.
Only Human
Post Reply