How do you tell if gates reference descriptors in the GDT or LDT?

chrstrbrts

Senior member
Aug 12, 2014
522
3
81
Hello,

I noticed that Intel, when describing its gate formats, doesn't tell you how to set the gate so that it references a descriptor in the global descriptor table or local descriptor table.

Segment selectors when loaded into segment registers have a one bit field that signifies whether the selector references the GDT or LDT.

But I don't see any such field in gates.

There are some fields in the gates that aren't explained (at least not yet in the text).

But other than that, I don't see any possibility for how to tell whether the gate references the GDT or LDT.

Any thoughts?
 

Venix

Golden Member
Aug 22, 2002
1,084
3
81
The segment selector format is the same as when it's loaded into a segment register. One of the bits specifies whether the selector references the GDT or LDT.
 

chrstrbrts

Senior member
Aug 12, 2014
522
3
81
The segment selector format is the same as when it's loaded into a segment register. One of the bits specifies whether the selector references the GDT or LDT.

Oh, I see.

So you're saying that there is a one bit field in the segment selector field of the gate that tells the system where to grab the descriptor just like if you had entered it into a segment register yourself.

Got it.