hw_x86_64: Set base address and limit of TSS descriptor

The limit is set to match the TSS size - 1 and the base address is
hardcoded to the *current* address of the TSS instance (0x3a1100).

TODO: Set the base address using the 'tss' label. If the TSS descriptor
      format were not so utterly unusable this would be straightforward.
      Changes to the code that indirectly lead to a different location
      of the tss result in #GP since the base address will be invalid.
This commit is contained in:
Adrian-Ken Rueegsegger 2015-02-21 01:58:14 +01:00 committed by Christian Helmuth
parent 58e5f9b2fe
commit 4946f21302
1 changed files with 2 additions and 2 deletions

View File

@ -170,9 +170,9 @@
/* GDTE_LONG | GDTE_PRESENT | GDTE_TYPE_DATA_A | GDTE_TYPE_DATA_W | GDTE_NON_SYSTEM */
.long 0x20f300
/* Task segment descriptor */
.long 0
.long 0x11000068
/* GDTE_PRESENT | GDTE_SYS_TSS */
.long 0x8900
.long 0x893a
.long 0
.long 0
_gdt_end: