2

I wanted to learn more about systems and so I was reading about x86 global descriptor tables for memory segments as one does, and I came across this table from here:

GDT Table Entry Format

I think I understand why all the information is needed, but I don't understand why values are broken up in this way.

In particular, why did the designers prefer the above layout over something like:

first 32-bits: base next 20-bits: limit next 12-bits: access-byte and flags 

?

I've come across lots of places that seem to describe the table entry layout, but it seems to be harder to find information about why things turned out this way.

1 Answer 1

7

Because the x86 architecture was originally 16-bit, it then evolved addendums as it had to address more and more memory, and work with larger and larger registers.

The layout wasn't changed for various reasons:

  • Backward compatibility
  • Maximising compatability with other vendors in order to steal their customers.
  • Maximising compatability with operating systems in order to steal customers.
  • Lazyness. Why change what already works, we already have working circuits.

In short this is what happens when a system undergoes organic growth. It works (perhaps even very well) but doesn't quite make clean sense.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.