diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-09-28 22:25:29 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-09-28 22:25:29 +0000 |
commit | 0ae8dceaebe3659ee0c3352c08125f403e77ebca (patch) | |
tree | 5085c389f09da78182b899d19fe1068b619a69dd /arch/i386/boot/setup.S | |
parent | 273767781288c35c9d679e908672b9996cda4c34 (diff) |
Merge with 2.3.10.
Diffstat (limited to 'arch/i386/boot/setup.S')
-rw-r--r-- | arch/i386/boot/setup.S | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/arch/i386/boot/setup.S b/arch/i386/boot/setup.S index a2c8ecb37..e45fcda2d 100644 --- a/arch/i386/boot/setup.S +++ b/arch/i386/boot/setup.S @@ -753,19 +753,29 @@ bootsect_panic_mess: ! This routine checks that the keyboard command queue is empty ! (after emptying the output buffers) ! -! No timeout is used - if this hangs there is something wrong with -! the machine, and we probably couldn't proceed anyway. +! Some machines have delusions that the keyboard buffer is always full +! with no keyboard attached... + empty_8042: + push ecx + mov ecx,#0xFFFFFF + +empty_8042_loop: + dec ecx + jz empty_8042_end_loop + call delay in al,#0x64 ! 8042 status port test al,#1 ! output buffer? jz no_output call delay in al,#0x60 ! read it - jmp empty_8042 + jmp empty_8042_loop no_output: test al,#2 ! is input buffer full? - jnz empty_8042 ! yes - loop + jnz empty_8042_loop ! yes - loop +empty_8042_end_loop: + pop ecx ret ! |