gdt: add TSS entries for application processors
This commit is contained in:
parent
b1c7737d0e
commit
c2daea8b18
4 changed files with 60 additions and 9 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue