The GDT

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
karim
Posts: 11
Joined: Mon Jun 23, 2025 8:03 pm

The GDT

Post by karim »

The idea of the GDT is that I define the address of the code, where it starts, like from address X to Y, and the data has a size from this to that, and the stack has a size from this to that, so I can enter Protected Mode. All of this is set up just for the code, data, and stack, so when the Kernel executes, it determines the size of all these based on the Kernel’s own size. In other words, I allocate fixed parts of the RAM for the Kernel, which is the operating system. Is my understanding correct?
Octocontrabass
Member
Member
Posts: 5889
Joined: Mon Mar 25, 2013 7:01 pm

Re: The GDT

Post by Octocontrabass »

I see you asked this question elsewhere.
karim wrote: Thu Jul 10, 2025 4:46 pmIs my understanding correct?
Yes and no. Yes, you understand how segmentation works. No, modern OSes don't use segmentation for memory management, they use paging instead.
Post Reply