aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/gdt/gdt.c
diff options
context:
space:
mode:
authorMarvin Borner2020-04-28 18:32:36 +0200
committerMarvin Borner2020-04-28 18:32:36 +0200
commit4b8518b4e791c68154ec52badcc921b62afafb49 (patch)
tree9c855266cf7451f503bf3cb849e63ac72ae48e74 /src/kernel/gdt/gdt.c
parent46007d2598b7aef13895b21669cfb6f24272e5fe (diff)
Maaaany fixes...
Sorry for the increasingly worse-getting commit messages :D
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();