X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/74926d2db1d9f3228acdfca03013a8ba0ac1d8c0..45e1f8b055043e54be35462852ab6649d634da7c:/lunaix-os/kernel/asm/x86/syscall.S diff --git a/lunaix-os/kernel/asm/x86/syscall.S b/lunaix-os/kernel/asm/x86/syscall.S index bde7f36..b48aead 100644 --- a/lunaix-os/kernel/asm/x86/syscall.S +++ b/lunaix-os/kernel/asm/x86/syscall.S @@ -72,10 +72,11 @@ .section .text syscall_hndlr: pushl %ebp - movl 8(%esp), %ebp + movl 8(%esp), %ebp // isr_param* - movl (%ebp), %eax /* eax: call code as well as the return value from syscall */ - cmpl $__SYSCALL_MAX, %eax + addl $4, %ebp + movl (%ebp), %eax /* eax: call code as well as the return value from syscall */ + cmpl $__SYSCALL_MAX, %eax jae 2f shll $2, %eax @@ -93,7 +94,7 @@ pushl 8(%ebp) /* ecx - #2 arg */ pushl 4(%ebp) /* ebx - #1 arg */ - call (%eax) + call *(%eax) movl %eax, (%ebp) /* save the return value */