About the GDT in the kernel...

If you are new to OS Development, plan on spending some time here first before going into the other forums.

Moderator:Moderators

Post Reply
Sir Assembler
Posts:7
Joined:Sun Apr 24, 2011 3:32 pm
About the GDT in the kernel...

Post by Sir Assembler » Tue May 10, 2011 11:39 pm

Why do we need to setup the GDT in the kernel if you already did it in the bootloader?

User avatar
Mike
Site Admin
Posts:465
Joined:Sat Oct 20, 2007 7:58 pm
Contact:

Re: About the GDT in the kernel...

Post by Mike » Wed May 11, 2011 3:52 am

Hello,

Technically it is not needed, however it is done for the following reasons:

-reduce dependency between kernel and a specific bootloader;
-allows the kernel developer to easily modify the GDT during runtime. This is important as it allows the kernel to setup the GDT depending on system needs or configuration.
Lead Programmer for BrokenThorn Entertainment, Co.
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com

Post Reply