summaryrefslogtreecommitdiff
path: root/core/callback.inc
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2013-03-06 17:10:32 +0000
committerMatt Fleming <matt.fleming@intel.com>2013-03-06 17:10:32 +0000
commit4153b9005c460e02d36c457367a045444812bb97 (patch)
treed6f41a24f4f58d0c85725f61aea0e5deba6d21cd /core/callback.inc
parent12eafad11c9c68c979309087d71f1c76e3f1c4b9 (diff)
parent16aa878d78086e9bc1c1f1053dc24da295f81e05 (diff)
downloadsyslinux-5.10-pre1.tar.gz
Merge branch 'lwip-merge' into elflinksyslinux-5.10-pre1
Diffstat (limited to 'core/callback.inc')
-rw-r--r--core/callback.inc13
1 files changed, 12 insertions, 1 deletions
diff --git a/core/callback.inc b/core/callback.inc
index 454b4522..f1332e8e 100644
--- a/core/callback.inc
+++ b/core/callback.inc
@@ -49,6 +49,7 @@ core_intcall:
core_syscall:
pushfd ; Save IF among other things...
+ inc dword [CallbackCtr]
push ebx
push ebp
push esi
@@ -130,6 +131,10 @@ core_syscall:
; Remove from stack
pop dword [CallbackSP]
+ dec dword [CallbackCtr]
+ jnz .skip
+ call [core_pm_hook]
+.skip:
pop edi
pop esi
pop ebp
@@ -145,6 +150,7 @@ core_syscall:
global core_cfarcall:function hidden
core_cfarcall:
pushfd ; Save IF among other things...
+ inc dword [CallbackCtr]
push ebx
push ebp
push esi
@@ -199,6 +205,10 @@ core_cfarcall:
mov eax,esi
; EDX already set up to be the RM return value
pop dword [CallbackSP]
+ dec dword [CallbackCtr]
+ jnz .skip
+ call [core_pm_hook]
+.skip:
pop ebx
pop ebp
pop esi
@@ -206,10 +216,11 @@ core_cfarcall:
popfd
ret
- bits 16
section .bss16
alignb 4
+ global core_pm_hook
CallbackSP resd 1 ; SP saved during callback
+CallbackCtr resd 1
bits 16
section .text16