diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2010-03-13 22:23:44 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2010-03-13 22:23:44 -0500 |
commit | 68c51390e3c78ed4a5b012d9097007f7cb0b8bbe (patch) | |
tree | a68bf7b3312a1f973e53314db34d73a60757fe30 | |
parent | f628244eb322da79d6a8bffdb35e6d0e5111892a (diff) | |
download | seabios-68c51390e3c78ed4a5b012d9097007f7cb0b8bbe.tar.gz |
Enable irqs in kbd/clock calls that caller might "spin" on.
Some old programs will spin on a clock/keyboard call with irqs
disabled. They assume the BIOS will enable irqs and allow key events
and clock events to occur.
So, enable irqs in those functions that a caller might "spin" on.
-rw-r--r-- | src/clock.c | 1 | ||||
-rw-r--r-- | src/kbd.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/clock.c b/src/clock.c index 5a30e352..9afa71d8 100644 --- a/src/clock.c +++ b/src/clock.c @@ -226,6 +226,7 @@ timer_setup(void) static void handle_1a00(struct bregs *regs) { + yield(); u32 ticks = GET_BDA(timer_counter); regs->cx = ticks >> 16; regs->dx = ticks; @@ -73,6 +73,7 @@ enqueue_key(u8 scan_code, u8 ascii_code) static void dequeue_key(struct bregs *regs, int incr, int extended) { + yield(); u16 buffer_head; u16 buffer_tail; for (;;) { @@ -126,6 +127,7 @@ handle_1601(struct bregs *regs) static void handle_1602(struct bregs *regs) { + yield(); regs->al = GET_BDA(kbd_flag0); } @@ -184,6 +186,7 @@ handle_1611(struct bregs *regs) static void handle_1612(struct bregs *regs) { + yield(); regs->al = GET_BDA(kbd_flag0); regs->ah = ((GET_BDA(kbd_flag1) & ~(KF2_RCTRL|KF2_RALT)) | (GET_BDA(kbd_flag2) & (KF2_RCTRL|KF2_RALT))); |