gdt: add TSS entries for application processors

This commit is contained in:
Michael Shaw 2023-11-01 15:55:29 -04:00
commit c2daea8b18
4 changed files with 60 additions and 9 deletions

View file

@ -194,5 +194,12 @@ void ap_kmain(struct limine_smp_info *info)
idt_load();
cr3_write(kcr3);
void *kstack = buddy_alloc(KSTACK_SIZE);
uintptr_t ptr = (uintptr_t)kstack + KSTACK_SIZE - 8;
/* insert the TSS for each processor into the GDT */
uint16_t tss = gdt_insert_tss(ptr);
ltr(tss);
yield();
}