Kernel: Add set_tss_stack() to 32 bit

This commit is contained in:
Bananymous 2023-04-28 14:44:23 +03:00
parent d1155c968e
commit e48acbb03b
1 changed files with 5 additions and 0 deletions

View File

@ -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));