iocoder
You mean to say in every task's page directory GDT's linear address is mapped. So it's like GDT's page is shared by all the tasks in system.
GDTR linear address to physical address
Re: GDTR linear address to physical address
if your GDT is located in kernel space (like it should anyway) typically, the kernel space is always the same in every process anyway (because every process needs access to other things as well, such as the physical/virtual memory managers, exception handlers, and kernel services) so as long as the GDT is mapped into kernel space, then it will automatically be mapped identically in every process without you having to worry about it
- iocoder
- Member
- Posts: 208
- Joined: Sun Oct 18, 2009 5:47 pm
- Libera.chat IRC: iocoder
- Location: Alexandria, Egypt | Ottawa, Canada
- Contact:
Re: GDTR linear address to physical address
EXACTLY. One GDT table for the whole system (stored in physical memory) appears at certain linear base address x for every page directory. GDTR contains that x and the limit.Dinesh wrote:iocoder
You mean to say in every task's page directory GDT's linear address is mapped. So it's like GDT's page is shared by all the tasks in system.
Re: GDTR linear address to physical address
iocoder JAAman iansjack
Thanks guys
Thanks guys
Re: GDTR linear address to physical address
You should probably be more clear here.Brendan wrote: The LGDT and SGDT instructions use a linear address. This is not necessarily the same as a virtual address (if you use segmentation), and not necessarily the same as a physical address (if you use paging).
LGDT, SGDT, LIDT and SIDT use the logical address (segment selector:offset) of the instruction operand to access it. Logical is then translated into linear/virtual, which is then either the final physical address or subject to further virtual-to-physical translation using the page tables.
The operand (resides in memory) contains the table address and its limit (the limit ultimately gives the table size).
The table address is linear/virtual, which, again, may be subject to further virtual-to-physical translation.
Re: GDTR linear address to physical address
And who are those people? Is there anyone else who believe that having the GDTR pointing to invalid memory is a good design?iocoder wrote:In this case you may simply let GDT appear in the address space of every process, although some may argue that this is a bad design.