OSDev.org

The Place to Start for Operating System Developers
It is currently Mon May 20, 2024 8:26 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Linux GDT
PostPosted: Tue Jul 26, 2016 1:53 am 
Offline

Joined: Tue Jul 26, 2016 1:35 am
Posts: 1
I am reading through Linux Kernel code.
I have one doubt regarding Linux GDT. Why linux setup GDT two times.
In file http://lxr.free-electrons.com/source/arch/x86/include/asm/segment.h#L17
Linux specify one GDT
/* Simple and small GDT entries for booting only: */

#define GDT_ENTRY_BOOT_CS 2
#define GDT_ENTRY_BOOT_DS 3
#define GDT_ENTRY_BOOT_TSS 4
#define __BOOT_CS (GDT_ENTRY_BOOT_CS*8)
#define __BOOT_DS (GDT_ENTRY_BOOT_DS*8)
#define __BOOT_TSS (GDT_ENTRY_BOOT_TSS*8)

It setup the above GDT in http://lxr.free-electrons.com/source/arch/x86/boot/pm.c#L123

Again after some time it set up another GDT with 32 entries?

Or if I am wrong then, where Kernel set up the 32 entry GDT (one specified in Understanding Linux Kerenel https://books.google.co.in/books?id=h0lltXyJ8aIC&pg=PT59&lpg=PT59&dq=linux+kernel+file+gdt&source=bl&ots=gO0lH05fHX&sig=h4X1I6TP_P7JlEwzoCkQk3uztjw&hl=en&sa=X&ei=XFwPVM-WBbOBsQTtiIDIDw&redir_esc=y#v=onepage&q=linux%20kernel%20file%20gdt&f=false


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot] and 28 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group