diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-09-03 21:02:08 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-09-03 21:02:08 +0200 |
| commit | 9ff6bf983a40ae30472962343036a5b6d9d00e25 (patch) | |
| tree | 6e9be6dc628f385e61bdb5cf87d015ba46d60f6b /arch/x86_64/kapi | |
| parent | 0467dc8f98ccef42290f7f7bd95060bfe198c035 (diff) | |
| download | kernel-9ff6bf983a40ae30472962343036a5b6d9d00e25.tar.xz kernel-9ff6bf983a40ae30472962343036a5b6d9d00e25.zip | |
x86_64/cpu: fix GDT size calculation
The GDT pointer already receives the size in bytes when the GDT
constructs it to activate the new GDT. Previously, the size in bytes got
multiplied by the size of a single segment_descriptor before performing
the mandatory subtraction of one. This means that the CPU lived in the
believe that the GDT had a size of 448 bytes, instead of the true 56.
Additionally, the calculation was flawed in another way, revealing the
reason for why the size in bytes was passed to
global_descriptor_table_pointer in the first place: it assumes that all
entries in the GDT are of the same size. However, system descriptors are
larger than basic segment descriptors.
Diffstat (limited to 'arch/x86_64/kapi')
0 files changed, 0 insertions, 0 deletions
