aboutsummaryrefslogtreecommitdiff
path: root/src/kbd.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2008-03-02 13:58:23 -0500
committerKevin O'Connor <kevin@koconnor.net>2008-03-02 13:58:23 -0500
commitc65a3804a93eba39e84647d4510d0338a388c8ae (patch)
tree95ff2b371dd659e788be93a63d62867d75b10c16 /src/kbd.c
parent44c631dfd23de0ee83a8a98a95815b452727ba95 (diff)
downloadseabios-hppa-c65a3804a93eba39e84647d4510d0338a388c8ae.zip
seabios-hppa-c65a3804a93eba39e84647d4510d0338a388c8ae.tar.gz
seabios-hppa-c65a3804a93eba39e84647d4510d0338a388c8ae.tar.bz2
Bug fixes; get mouse working.
Fix bug in post causing PIC2 to not be initialized properly. Only run ata_detect if CONFIG_ATA enabled. Improve debugging aids - introduce debug_isr(); move DEBUGF to each file. Enable mouse by default. Fix bug in floppy causing extra test of PORT_FD_STATUS on recalibrate. Always disable/enable kbd in handle_09 event.
Diffstat (limited to 'src/kbd.c')
-rw-r--r--src/kbd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/kbd.c b/src/kbd.c
index 498f08c..e1f01a5 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -544,15 +544,15 @@ process_key(u8 scancode)
void VISIBLE
handle_09(struct bregs *regs)
{
-// debug_enter(regs);
-
- outb(0x0b, PORT_PIC1);
- if ((inb(PORT_PIC1) & 0x02) == 0)
- return;
+ //debug_isr(regs);
// disable keyboard
outb(0xad, PORT_PS2_STATUS);
+ outb(0x0b, PORT_PIC1);
+ if ((inb(PORT_PIC1) & 0x02) == 0)
+ goto done;
+
// read key from keyboard controller
u8 key = inb(PORT_PS2_DATA);
irq_enable();
@@ -564,7 +564,7 @@ handle_09(struct bregs *regs)
tr.ah = 0x4f;
tr.flags = F_CF;
call16_int(0x15, &tr);
- if (!tr.flags & F_CF)
+ if (!(tr.flags & F_CF))
goto done;
key = tr.al;
}