What does the GDT do?
I know that IVT is and for what is used for. But GDT is needed for Protected Mode. What is it and where is useful?
Any nice and practical link would be also useful
Thanks in advance
Fandomas
What is GDT (Global Descriptor Table) ?
What is GDT (Global Descriptor Table) ?
Last edited by fandomas on Mon Dec 05, 2016 4:42 pm, edited 1 time in total.
Re: What is GDT (Global Descriptor Table) ?
First google result:
http://wiki.osdev.org/Global_Descriptor_Table
And here another one:
https://en.wikipedia.org/wiki/Global_Descriptor_Table
http://wiki.osdev.org/Global_Descriptor_Table
And here another one:
https://en.wikipedia.org/wiki/Global_Descriptor_Table
Re: What is GDT (Global Descriptor Table) ?
any more practical ones? (ASM)
-
- Member
- Posts: 232
- Joined: Mon Jul 25, 2016 6:54 pm
- Location: Adelaide, Australia
Re: What is GDT (Global Descriptor Table) ?
This what you're after?
http://wiki.osdev.org/GDT_Tutorial
I only just implemented a GDT myself (like 2 weeks back), so I recommend you read the wiki article but I can give you a quick answer to your questions.
Primarily the GDT is an array of elements describing segments, each one identifies a range of memory and a set of permissions for that memory. In protected mode, the segment registers - CS, DS, et al, don't store memory offsets, but offsets into the GDT.
You need to setup a GDT with at least one code segment and one r/w data segment for ring 0 and one code and one data segment for ring 3. If you attempt a switch to protected mode without a valid GDT the processor will attempt to access the code segment, find that there is no valid code segment, and fault.
Beyond that, the GDT can also store Task State Segments, which are used in hardware multitasking, Local Descriptor Tables (legacy memory protection feature) and Call Gate descriptors, used to implement calls across protection rings.
http://wiki.osdev.org/GDT_Tutorial
I only just implemented a GDT myself (like 2 weeks back), so I recommend you read the wiki article but I can give you a quick answer to your questions.
Primarily the GDT is an array of elements describing segments, each one identifies a range of memory and a set of permissions for that memory. In protected mode, the segment registers - CS, DS, et al, don't store memory offsets, but offsets into the GDT.
You need to setup a GDT with at least one code segment and one r/w data segment for ring 0 and one code and one data segment for ring 3. If you attempt a switch to protected mode without a valid GDT the processor will attempt to access the code segment, find that there is no valid code segment, and fault.
Beyond that, the GDT can also store Task State Segments, which are used in hardware multitasking, Local Descriptor Tables (legacy memory protection feature) and Call Gate descriptors, used to implement calls across protection rings.
Re: What is GDT (Global Descriptor Table) ?
Thank you very much. Very appreciated. I needed a short answer.
Again thanks.
Again thanks.
Re: What is GDT (Global Descriptor Table) ?
I was fighting with GDT several weeks ago and I recommend you reading this blog entry: http://duartes.org/gustavo/blog/post/me ... mentation/fandomas wrote:What does the GDT do?
I know that IVT is and for what is used for. But GDT is needed for Protected Mode. What is it and where is useful?
Any nice and practical link would be also useful
Thanks in advance
Fandomas
Also, wiki entries like http://wiki.osdev.org/GDT_Tutorial help me a lot, too.
Good lucky.