fix: previous interrupt context lost after a nested interrupt
[lunaix-os.git] / lunaix-os / kernel / asm / x86 / syscall.S
index 93ea1c7bf63230b1faf7c330c4c71d4142b1d483..ff30f444d9c6b8d32352cf030768b84d928de89b 100644 (file)
 .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