Page 1 of 1

GDT Flags

Posted: Mon May 08, 2017 8:04 pm
by sofferjacob
Hi,
Sorry if I should already know this, but I just don't understand what are accessibility and granularity flags in the GDT and how they work (how they are set). Every tutorial I check sets them different and use a different hexadecimal number. Where do I get the flags hexadecimal numbers so I can set them? Why do those flags are associated to those hexadecimal numbers? And if someone could also explain me the flags used in James M GDT Tutorial I would be very grateful (because he only uses one number for all access and all granularity flags while others use several).

(In case you don't understand my question, can someone please explain me GDT access and granularity flags)

Thanks in advance.

Re: GDT Flags

Posted: Mon May 08, 2017 8:11 pm
by eryjus
https://software.intel.com/en-us/articles/intel-sdm

You will want those... Today in particular vol3a chapter 5.

Granularity, when set, indicates the length is measured in 4K increments.

I do not know what "Access" is that you refer to.... "Accessed" means software has accessed the selector.