summaryrefslogtreecommitdiff
path: root/core/pm.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/pm.inc
parent12eafad11c9c68c979309087d71f1c76e3f1c4b9 (diff)
parent16aa878d78086e9bc1c1f1053dc24da295f81e05 (diff)
downloadsyslinux-5.10-pre1.tar.gz
Merge branch 'lwip-merge' into elflinksyslinux-5.10-pre1
Diffstat (limited to 'core/pm.inc')
-rw-r--r--core/pm.inc20
1 files changed, 20 insertions, 0 deletions
diff --git a/core/pm.inc b/core/pm.inc
index c6f3c52b..7b98944f 100644
--- a/core/pm.inc
+++ b/core/pm.inc
@@ -194,6 +194,7 @@ PM_IDT_ptr: dw 8*256-1 ; Length
pm_irq:
pushad
movzx esi,byte [esp+8*4] ; Interrupt number
+ inc dword [CallbackCtr]
mov ebx,.rm
jmp enter_rm ; Go to real mode
@@ -208,10 +209,28 @@ pm_irq:
bits 32
section .textnr
.pm:
+ dec dword [CallbackCtr]
+ jnz .skip
+ call [core_pm_hook]
+.skip:
popad
add esp,4 ; Drop interrupt number
iretd
+;
+; Initially, the core_pm_hook does nothing; it is available for the
+; threaded derivatives to run the scheduler, or examine the result from
+; interrupt routines.
+;
+ global core_pm_null_hook
+core_pm_null_hook:
+ ret
+
+ section .data16
+ alignz 4
+ global core_pm_hook
+core_pm_hook: dd core_pm_null_hook
+
bits 16
section .text16
;
@@ -441,6 +460,7 @@ pm_init:
section .earlybss
alignb 8
IDT: resq 256
+ global RealModeSSSP
RealModeSSSP resd 1 ; Real-mode SS:SP
section .gentextnr ; Autogenerated 32-bit code