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/ar ... ment.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/ar ... /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=h0l ... dt&f=false