1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00

fix wrong intialization of the task state segment

This commit is contained in:
Stefan Lankes 2015-07-11 00:49:07 +02:00
parent 17b6c73573
commit e3be1be9fc

View file

@ -142,7 +142,7 @@ void gdt_install(void)
* Create TSS for each task at ring0 (we use these segments for task switching)
*/
for(i=0; i<MAX_CORES; i++) {
task_state_segments[i].rsp0 = (size_t) &boot_stack + (i + 1) * KERNEL_STACK_SIZE - 16;
task_state_segments[i].rsp0 = (size_t) &boot_stack + i * KERNEL_STACK_SIZE - 0x10;
gdt_set_gate(num+i*2, (unsigned long) (task_state_segments+i), sizeof(tss_t)-1,
GDT_FLAG_PRESENT | GDT_FLAG_TSS | GDT_FLAG_RING0, gran_ds);
}