aboutsummaryrefslogtreecommitdiff
path: root/sys/arch/amd64/gdt.c
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2023-12-11 22:46:45 -0500
committerIan Moffett <ian@osmora.org>2023-12-11 22:46:45 -0500
commit30495d6f06108864c151e744ec1aad98e70c3334 (patch)
treeb11dad71341da6ccf5d5a3107f2d6c623bacf96a /sys/arch/amd64/gdt.c
parentc9a79b6dc5deb2294e8c125bc18413408a7cee68 (diff)
kernel/amd64: Add Task State Segment
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/arch/amd64/gdt.c')
-rw-r--r--sys/arch/amd64/gdt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/arch/amd64/gdt.c b/sys/arch/amd64/gdt.c
index 209e2f7..667170a 100644
--- a/sys/arch/amd64/gdt.c
+++ b/sys/arch/amd64/gdt.c
@@ -72,8 +72,13 @@ struct gdt_entry g_gdt[256] = {
.granularity = 0x00,
.base_hi = 0x00
},
+
+ /* TSS segment (0x28) */
+ {0}
};
+struct gdt_entry *g_gdt_tss = &g_gdt[GDT_TSS];
+
struct gdtr g_gdtr = {
.limit = sizeof(struct gdt_entry) * 256 - 1,
.offset = (uintptr_t)&g_gdt[0]