aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/gdt/gdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/gdt/gdt.c')
-rw-r--r--src/kernel/gdt/gdt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/kernel/gdt/gdt.c b/src/kernel/gdt/gdt.c
index 33cec57..79ea51c 100644
--- a/src/kernel/gdt/gdt.c
+++ b/src/kernel/gdt/gdt.c
@@ -71,6 +71,8 @@ void gdt_set_gate(int32_t num, uint32_t base, uint32_t limit, uint8_t access, ui
gdt[num].access = access;
}
+extern uint32_t stack_hold;
+
void gdt_install()
{
// Set GDT pointer and limit
@@ -93,7 +95,10 @@ void gdt_install()
gdt_set_gate(4, 0, 0xFFFFFFFF, 0xF2, 0xCF);
// Write TSS
- tss_write(5, 0x10, 0x0);
+ tss_write(5, 0x10, stack_hold);
+
+ gdt_set_gate(6, 0, 0xFFFFF, 0x92, 0x0);
+ gdt_set_gate(7, 0, 0xFFFFF, 0x9A, 0x0);
// Remove old GDT and install the new changes!
gdt_flush();