Do you ever need to reload a second GDT ? what is the reason behind ?
thank you
need a secong GDT ?
Re: need a secong GDT ?
There only one GTD that you reload when add descriptor in it, for example when you add a process
[ Grub 2 | Visual Studio 2013 | PE File ]
The OsDev E.T.
Don't send OsDev MIB !
The OsDev E.T.
Don't send OsDev MIB !
- Masterkiller
- Member
- Posts: 153
- Joined: Sat May 05, 2007 6:20 pm
Re: need a secong GDT ?
If your OS handle memory as segments (not paging), you will have to limit every process of the system by a segment. On process switch you will have to remap address space, so you reload LDT (if using one GDT/multiple LDT) or reload GDT (if using multiple GDT). Anyway both are bad ideas, segmentation (and thus GDT/LDT) exist only for compability, all modern system will use paging mechanism.
P.S. you can preload your GDT if plan to switch between (un)real and protected mode more times.
P.S. you can preload your GDT if plan to switch between (un)real and protected mode more times.
ALCA OS: Project temporarity suspended!
Current state: real-mode kernel-FS reader...
Current state: real-mode kernel-FS reader...
Re: need a secong GDT ?
if you've made a gdt table in real mode, and you need to protected mode, maybe there is the need to new gdt table that is same previous one in protected mode....
because probably the real mode gdt is located in first 640k region and you'll want to put it to more than 1MB address...
because probably the real mode gdt is located in first 640k region and you'll want to put it to more than 1MB address...