From e48acbb03b0b0a87500fcd5e374b088024f2796a Mon Sep 17 00:00:00 2001 From: Bananymous Date: Fri, 28 Apr 2023 14:44:23 +0300 Subject: [PATCH] Kernel: Add set_tss_stack() to 32 bit --- kernel/arch/i386/GDT.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/arch/i386/GDT.cpp b/kernel/arch/i386/GDT.cpp index d8f60084..dba89c59 100644 --- a/kernel/arch/i386/GDT.cpp +++ b/kernel/arch/i386/GDT.cpp @@ -109,6 +109,11 @@ namespace Kernel::GDT write_entry(offset, (uint32_t)s_tss, sizeof(TaskStateSegment), 0x89, 0x0); } + void set_tss_stack(uintptr_t esp) + { + s_tss->esp0 = esp; + } + static void flush_gdt() { asm volatile("lgdt %0" :: "m"(s_gdtr));