GDT Flags

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
sofferjacob
Posts: 7
Joined: Tue Feb 28, 2017 11:44 am
Libera.chat IRC: sofferjacob

GDT Flags

Post 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.
User avatar
eryjus
Member
Member
Posts: 286
Joined: Fri Oct 21, 2011 9:47 pm
Libera.chat IRC: eryjus
Location: Tustin, CA USA

Re: GDT Flags

Post 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.
Adam

The name is fitting: Century Hobby OS -- At this rate, it's gonna take me that long!
Read about my mistakes and missteps with this iteration: Journal

"Sometimes things just don't make sense until you figure them out." -- Phil Stahlheber
Post Reply