diff --git a/arch/x86/include/asm/stddef.h b/arch/x86/include/asm/stddef.h index 581c72ab..f3ef4468 100644 --- a/arch/x86/include/asm/stddef.h +++ b/arch/x86/include/asm/stddef.h @@ -70,18 +70,6 @@ typedef unsigned int wint_t; * All the interrupt handler routines use this type for their only parameter. */ struct state { - /// GS register - unsigned short gs; - unsigned short __gs; - /// FS register - unsigned short fs; - unsigned short __fs; - /// ES register - unsigned short es; - unsigned short __es; - /// ds register - unsigned short ds; - unsigned short __ds; /// EDI register unsigned int edi; /// ESI register diff --git a/arch/x86/kernel/entry.asm b/arch/x86/kernel/entry.asm index a0fe2694..637d5cdc 100644 --- a/arch/x86/kernel/entry.asm +++ b/arch/x86/kernel/entry.asm @@ -515,25 +515,16 @@ sw_switch_context: push DWORD 0 push DWORD 0xc0edbabe pusha - push ds - push es - push fs - push gs pushf pop eax - mov [esp+64], eax + mov [esp+48], eax - mov ecx, [esp+68] + mov ecx, [esp+52] mov [ecx], esp - mov ecx, [esp+72] + mov ecx, [esp+56] mov esp, [ecx] sw_rollback: - - pop gs - pop fs - pop es - pop ds popa add esp, 8 @@ -800,22 +791,13 @@ extern irq_handler common_stub: pusha - push ds - push es - push fs - push gs ; use the same handler for interrupts and exceptions push esp call irq_handler add esp, 4 - pop gs - pop fs - pop es - pop ds popa - add esp, 8 iret diff --git a/arch/x86/kernel/gdt.c b/arch/x86/kernel/gdt.c index ad5dd26d..5378515d 100644 --- a/arch/x86/kernel/gdt.c +++ b/arch/x86/kernel/gdt.c @@ -157,7 +157,6 @@ int create_default_frame(task_t* task, internal_entry_point_t ep, void* arg) stptr = stack; memset(stptr, 0x00, short_state_size*sizeof(uint32_t)); - stptr->gs = stptr->fs = stptr->es = stptr->ds = ds; stptr->esp = stack +short_state_size; stptr->int_no = 0xB16B00B5; stptr->error = 0xC03DB4B3;