I encountered some problems.
First of all I want to say I did search in wiki and in forum but wiki is too generic and forum keep telling me "The following words are too common".
Anyway the first stage boot loader works fine, it does load the 2nd stage from floppy and passes control to it (A little question: where is the best place to load the kernel? I know that 0x00000500 to 0x00007BFF are not used and also 0x00007E00 till 0x0009FFFF not used too is it a good place to load the kernel?).
Now the problems are that I don't know how exactly load GDT and IDT (and also do I need LDT? It too few information about it on the web).
I know that GDT is a descriptors that allows to map more that 1MB of memory, each descriptor is 8Byte, and the first on is always zero (the NULL descriptor), now I found the following table:
http://www.brokenthorn.com/Resources/OSDev8.html
Is this table correct? And also most of the GDT I don't understand (Seems like I cant understand what is Descriptor in global).
And last questions I would like to ask, do I load the GDT and IDT (and LDT if needed) before I pass control to kernel? I mean Bootloader stage 1 loads stage 2, stage 2 enables A20 Line, load GDT, IDT (LDT), set PMode bit and executes main function of kernel OR stage 2 just passes control to kernel and kernel loads all this stuff? (The kernel will be written in C/C++ so is it a good way to declare the GDT/IDT/LDT structures in C/C++ and the load them with assembly?)
I pretty sure most of the questions already have been asked but as I said I tried to search and found nothing help full.
Thanks a lot for help!
TCP/IP: Connecting people...