Misc fixes.
authorKevin O'Connor <kevin@koconnor.net>
Sat, 17 Jan 2009 07:30:21 +0000 (02:30 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Sat, 17 Jan 2009 07:30:21 +0000 (02:30 -0500)
The pnp bios string can't be const and VAR16_32.
Show ps2 port status when discarding data.

src/pnpbios.c
src/ps2port.c
src/serial.c

index 6daa02541e85accfee19e5e8e4f6658824f8fe35..4c512b68d883e48155858fa602120c1507f20ee5 100644 (file)
@@ -25,7 +25,7 @@ struct pnpheader {
 } PACKED;
 
 extern struct pnpheader PNPHEADER;
-extern const char pnp_string[];
+extern char pnp_string[];
 
 #if CONFIG_PNPBIOS
 struct pnpheader PNPHEADER __aligned(16) VAR16_32 = {
@@ -41,7 +41,7 @@ struct pnpheader PNPHEADER __aligned(16) VAR16_32 = {
 // We need a copy of this string in the 0xf000 segment, but we are not
 // actually a PnP BIOS, so make sure it is *not* aligned, so OSes will
 // not see it if they scan.
-const char pnp_string[] __aligned(2) VAR16_32 = " $PnP";
+char pnp_string[] __aligned(2) VAR16_32 = " $PnP";
 #endif
 
 #define FUNCTION_NOT_SUPPORTED 0x82
index 3f2fee7796a79840911caa520d0f2e56fe324328..4cd831665ebadcaecfa70654121c1b1a8e0c5fee 100644 (file)
@@ -65,7 +65,7 @@ i8042_flush(void)
         }
         udelay(50);
         u8 data = inb(PORT_PS2_DATA);
-        dprintf(7, "i8042 flushed %x\n", data);
+        dprintf(7, "i8042 flushed %x (status=%x)\n", data, status);
     }
 
     irq_restore(flags);
@@ -166,7 +166,7 @@ ps2_recvbyte(int aux, int needack, int timeout)
         if ((!!(status & I8042_STR_AUXDATA) != aux)
             || (needack && data != PS2_RET_ACK)) {
             // This data not for us - XXX - just discard it for now.
-            dprintf(1, "Discarding ps2 data %x\n", data);
+            dprintf(1, "Discarding ps2 data %x (status=%x)\n", data, status);
             continue;
         }
 
index 6de66368d7e7af6c119d690bac06c6d98b549bb6..5eefaf3d76ee300fc4592d6ccb0cefd020549962 100644 (file)
@@ -243,6 +243,7 @@ handle_1700(struct bregs *regs)
     outb(val8 | 0x01, addr+2); // send strobe
     nop();
     outb(val8 & ~0x01, addr+2);
+    // XXX - implement better timeout code.
     while (((inb(addr+1) & 0x40) == 0x40) && (timeout))
         timeout--;