diff --git a/arch/x86/kernel/entry.asm b/arch/x86/kernel/entry.asm index 8941848e..399050ac 100644 --- a/arch/x86/kernel/entry.asm +++ b/arch/x86/kernel/entry.asm @@ -417,29 +417,16 @@ extern syscall_handler ; used to realize system calls isrsyscall: + push dword 0x00 + push dword 0x80 pusha - ; We switched from software- to hardwaree-based multitasking - ; Therefore, we do not longer save the registers by hand. - ; push ds - ; push es - ; push fs - ; push gs - - ; mov ax, 0x10 - ; mov ds, ax - ; mov es, ax - ; mov fs, ax - ; mov gs, ax push esp call syscall_handler add esp, 4 - ; pop gs - ; pop fs - ; pop es - ; pop ds popa + add esp, 8 iret ; We call a C function in here. We need to let the assembler know @@ -451,28 +438,11 @@ extern fault_handler ; and finally restores the stack frame. isr_common_stub: pusha - ; We switched from software- to hardwaree-based multitasking - ; Therefore, we do not longer save the registers by hand. - pusha - ; push ds - ; push es - ; push fs - ; push gs - - ; mov ax, 0x10 - ; mov ds, ax - ; mov es, ax - ; mov fs, ax - ; mov gs, ax push esp call fault_handler add esp, 4 - ; pop gs - ; pop fs - ; pop es - ; pop ds popa add esp, 8 iret @@ -533,18 +503,6 @@ irq0: push byte 0 push byte 32 pusha - ; We switched from software- to hardwaree-based multitasking - ; Therefore, we do not longer save the registers by hand. - ; push ds - ; push es - ; push fs - ; push gs - - ; mov ax, 0x10 - ; mov ds, ax - ; mov es, ax - ; mov fs, ax - ; mov gs, ax push esp call irq_handler @@ -567,10 +525,6 @@ hack2: jmp 0x00 : 0xDEADBEAF no_task_switch2: - ; pop gs - ; pop fs - ; pop es - ; pop ds popa add esp, 8 iret @@ -712,27 +666,11 @@ irq15: irq_common_stub: pusha - ; We switched from software- to hardwaree-based multitasking - ; Therefore, we do not longer save the registers by hand. - ; push ds - ; push es - ; push fs - ; push gs - - ; mov ax, 0x10 - ; mov ds, ax - ; mov es, ax - ; mov fs, ax - ; mov gs, ax push esp call irq_handler add esp, 4 - ; pop gs - ; pop fs - ; pop es - ; pop ds popa add esp, 8 iret