From f5b995586e28f7db426f4707a4348dc067df41c0 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 15 Feb 2020 16:57:57 +0100 Subject: Quite many improvements ok. --- src/kernel/gdt/gdt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/kernel/gdt/gdt.c') diff --git a/src/kernel/gdt/gdt.c b/src/kernel/gdt/gdt.c index efff8a3..5b43025 100644 --- a/src/kernel/gdt/gdt.c +++ b/src/kernel/gdt/gdt.c @@ -97,6 +97,7 @@ void gdt_install() // Remove old GDT and install the new changes! gdt_flush(); + tss_flush(); vga_log("Installed Global Descriptor Table"); } @@ -114,13 +115,10 @@ void tss_write(int32_t num, uint16_t ss0, uint32_t esp0) tss_entry.esp0 = esp0; tss_entry.cs = 0x0b; tss_entry.ss = tss_entry.ds = tss_entry.es = tss_entry.fs = tss_entry.gs = 0x13; - - tss_entry.iomap_base = sizeof(struct tss_entry_struct); } -void tss_flush(void) +void tss_flush() { - tss_entry.esp0 = 4096 + (uint32_t) kmalloc(4096); asm volatile ("ltr %%ax": : "a" (0x2B)); } -- cgit v1.2.3