LDT descriptor format

LDT descriptor format

Hi,

I have read all through the Software Dev Manual, Volume 3A
and can't find a reference to the format for an LDT descriptor.

I did find a reference to the format in 64-bit mode (page 6-9 figure 6-4)
but I couldn't find a reference to the format in 32-bit mode.

Thanks for any help,
David Shifflett

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

If you refer to Figure 2-1 and Fig 2-2 of Vol. 3A, One of the GDT entry may be the descriptor ofan LDT segment (The LDT is optional). And the LDT itself can contain several entries, each descriptor in the LDT can be different types discussed in later chapters.

AS to the former, the descriptor of the LDT segment follows the layout of a segment descriptor, this is documented in Fig. 3-8

If you're asking about the latter, the descriptor layout of various LDT entries: The layout of a descriptor entry in the LDT is no different thanthesamedescriptor type that's presentin the GDT. The specific layout of a GDT entry depends on its type,be thata call gate descriptor, a segment descriptor, etc...

I am referring to the LDT descriptor that goes in the GDT.
All other descriptor types are well documented, as to the format
and the meaning of each bit/field.

But the LDT descriptor format appears no where in Volume 3A.

From Figure 4-1 (page 4-4) I can see the G, P, and DPL fields,
along with the obvious Type, Base and Limit fields.

G and P are also fairly obvious.

What does the DPL mean in an LDT descriptor?
The highest PL that can access LDT segments?
Why isn't the complete description provided, like for
Call Gates Figure 4-8 (page 4-19), or TSS descriptor
Figure 6-3 (page 6-7).

There is mention of the LDT format in 64 bit mode
Figure 6-4 (page 6-9)

Do I assume that an LDT descriptor is the same as a TSS descriptor?

dave

It seems you may be assuming LDT descriptor is a different species or entity from segment descriptors.

Do you think the meaning of DPL is different between the three shown in Fig 4.1 on code segment, data segment, system segment? Does it make sense for the manual to describe DPL for code segment, data segment separately? Architecturally, the meaning of DPL is the same, how you use code segment or data segment or system segment will be different...

Do you think segment descriptors for stack segment vs. data segment needs to be documented separately to be complete? LDT descriptor just allow software that want's to use a separate table of local descriptor to have more flexibility in logical addressing by providing the location to select those descriptor entries. Does it need a more complicated architecture than a generic segment descriptor?

All of the above is 32-bit behavior. You may be thinking all things should behave in an analogous manner going from 32-bit to 64-bit. But the architecture of extending to 64-bit address made several things different:
Segments are simplified by flat addressing, so descriptors for code/data/stack segments (for example) doesn't need to be expanded. But some descriptors need to, like call gate descriptors, TSS descriptors. The local descriptor table can be placed anywhere in memory soLDT descriptorneeds to be expanded to 16 bytes. The descriptor that gets expanded to 16 bytes are explicitly documented in the manual.

Hope this may help with theseless intuitive aspects between 32-bit and 64-bit architecture

Leave a Comment

Please sign in to add a comment. Not a member? Join today