aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2010-03-30 15:13:58 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2010-03-30 15:13:58 -0700
commit1672d1fcf1c261e92c0a8beb4b36c190c9b2d062 (patch)
tree6338056d0f7d3eca5ec448d0626b2b4951a81d2c
parentd71b34b80fbee1df019129971d1cec2568705213 (diff)
downloadcontrib-1672d1fcf1c261e92c0a8beb4b36c190c9b2d062.tar.gz
contrib-1672d1fcf1c261e92c0a8beb4b36c190c9b2d062.tar.xz
contrib-1672d1fcf1c261e92c0a8beb4b36c190c9b2d062.zip
core: remove do_idle from pollchar
Remove do_idle from pollchar; it is highly inappropriate while, for example, checking for a keypress during disk activity. Furthermore, make sure we reset the idle counter on events that indicate actual disk activity. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r--core/comboot.inc5
-rw-r--r--core/conio.inc1
-rw-r--r--core/pxelinux.asm1
-rw-r--r--core/ui.inc1
4 files changed, 7 insertions, 1 deletions
diff --git a/core/comboot.inc b/core/comboot.inc
index 6cf051e2..f8a78531 100644
--- a/core/comboot.inc
+++ b/core/comboot.inc
@@ -507,6 +507,7 @@ comapi_textmode:
; INT 22h AX=0006h Open file
;
comapi_open:
+ call reset_idle
push ds
mov ds,P_ES
mov si,P_SI
@@ -525,6 +526,7 @@ comapi_open:
; INT 22h AX=0007h Read file
;
comapi_read:
+ call reset_idle
mov es,P_ES
mov bx,P_BX
mov si,P_SI
@@ -829,6 +831,7 @@ comapi_userfont:
;
%if IS_SYSLINUX || IS_ISOLINUX || IS_EXTLINUX
comapi_readdisk:
+ call reset_idle
mov esi,P_ESI ; Enforce ESI == EDI == 0, these
or esi,P_EDI ; are reserved for future expansion
jnz .err
@@ -896,6 +899,7 @@ comapi_getcwd:
;
%if IS_SYSLINUX
comapi_opendir:
+ call reset_idle
push ds
mov ds,P_ES
mov si,P_SI
@@ -922,6 +926,7 @@ comapi_opendir equ comapi_err
;
%if IS_SYSLINUX
comapi_readdir:
+ call reset_idle
mov es,P_ES
mov di,P_DI
mov si,P_SI
diff --git a/core/conio.inc b/core/conio.inc
index 16c39c65..701fcf05 100644
--- a/core/conio.inc
+++ b/core/conio.inc
@@ -286,7 +286,6 @@ write_serial_str:
; pollchar: check if we have an input character pending (ZF = 0)
;
pollchar:
- call do_idle
pushad
mov ah,11h ; Poll keyboard
int 16h
diff --git a/core/pxelinux.asm b/core/pxelinux.asm
index 55444dbd..edb1584c 100644
--- a/core/pxelinux.asm
+++ b/core/pxelinux.asm
@@ -956,6 +956,7 @@ kaboom:
.wait2: mov dx,[BIOS_timer]
.wait3: call pollchar
jnz .keypress
+ call do_idle
cmp dx,[BIOS_timer]
je .wait3
loop .wait2,ecx
diff --git a/core/ui.inc b/core/ui.inc
index 348527ac..ed96ccdc 100644
--- a/core/ui.inc
+++ b/core/ui.inc
@@ -544,6 +544,7 @@ getchar_timeout:
push word [BIOS_timer]
call pollchar
jnz .got_char
+ call do_idle
pop ax
cmp ax,[BIOS_timer] ; Has the timer advanced?
je .loop