Bình Nguyên
Bình Nguyên

Reputation: 2352

Why do GDT and IDT haven't a better define?

I'm learning Intel x86 architecture, I wonder why don't GDT have a well structed like this:

base(32bit) | limit(16bit) | acces(8bit) | gran(8bit)

but

limit(16bit) | base(16bit) | base_mid(8bit) | access(8bit) | gran(8bit) | base_high(8bit)

Does Intel like to be "eccentric" or it has some reasons here?

Upvotes: 2

Views: 175

Answers (1)

Alexander Zhak
Alexander Zhak

Reputation: 9272

Alright, although I initially voted to close this question as off-topic, you're being persistent enough in your seek of knowledge. The answer to your question is rather simple: Protected mode was introduced in 80286, which is a 16-bit CPU. Segment Descriptor back then had pretty alligned structure: enter image description here

Bytes #6 and #7 of the Segment Descriptor got extended in 80386 to handle 32-bit addressing and yet remain compatible with 80286.

Upvotes: 4

Related Questions