Revision 07ad1b93

b/vl.c
1462 1462
            s->lsr |= UART_LSR_BI | UART_LSR_DR;
1463 1463
            serial_update_irq();
1464 1464
            break;
1465
        case 'd':
1466
            //            tb_flush();
1467
            cpu_set_log(CPU_LOG_ALL);
1468
            break;
1465 1469
        case TERM_ESCAPE:
1466 1470
            goto send_char;
1467 1471
        }
......
1979 1983
/* Keyboard Commands */
1980 1984
#define KBD_CMD_SET_LEDS	0xED	/* Set keyboard leds */
1981 1985
#define KBD_CMD_ECHO     	0xEE
1986
#define KBD_CMD_GET_ID 	        0xF2	/* get keyboard ID */
1982 1987
#define KBD_CMD_SET_RATE	0xF3	/* Set typematic rate */
1983 1988
#define KBD_CMD_ENABLE		0xF4	/* Enable scanning */
1984 1989
#define KBD_CMD_RESET_DISABLE	0xF5	/* reset and disable scanning */
......
2065 2070
int reset_requested;
2066 2071

  
2067 2072
/* update irq and KBD_STAT_[MOUSE_]OBF */
2073
/* XXX: not generating the irqs if KBD_MODE_DISABLE_KBD is set may be
2074
   incorrect, but it avoids having to simulate exact delays */
2068 2075
static void kbd_update_irq(KBDState *s)
2069 2076
{
2070 2077
    int irq12_level, irq1_level;
......
2080 2087
            if (s->mode & KBD_MODE_MOUSE_INT)
2081 2088
                irq12_level = 1;
2082 2089
        } else {
2083
            if (s->mode & KBD_MODE_KBD_INT)
2090
            if ((s->mode & KBD_MODE_KBD_INT) && 
2091
                !(s->mode & KBD_MODE_DISABLE_KBD))
2084 2092
                irq1_level = 1;
2085 2093
        }
2086 2094
    }
......
2120 2128
    KBDState *s = &kbd_state;
2121 2129
    int val;
2122 2130
    val = s->status;
2123
#if defined(DEBUG_KBD) && 0
2131
#if defined(DEBUG_KBD)
2124 2132
    printf("kbd: read status=0x%02x\n", val);
2125 2133
#endif
2126 2134
    return val;
......
2162 2170
        break;
2163 2171
    case KBD_CCMD_KBD_DISABLE:
2164 2172
        s->mode |= KBD_MODE_DISABLE_KBD;
2173
        kbd_update_irq(s);
2165 2174
        break;
2166 2175
    case KBD_CCMD_KBD_ENABLE:
2167 2176
        s->mode &= ~KBD_MODE_DISABLE_KBD;
2177
        kbd_update_irq(s);
2168 2178
        break;
2169 2179
    case KBD_CCMD_READ_INPORT:
2170 2180
        kbd_queue(s, 0x00, 0);
......
2251 2261
        case 0x05:
2252 2262
            kbd_queue(s, KBD_REPLY_RESEND, 0);
2253 2263
            break;
2264
        case KBD_CMD_GET_ID:
2265
            kbd_queue(s, KBD_REPLY_ACK, 0);
2266
            kbd_queue(s, 0xab, 0);
2267
            kbd_queue(s, 0x83, 0);
2268
            break;
2254 2269
        case KBD_CMD_ECHO:
2255 2270
            kbd_queue(s, KBD_CMD_ECHO, 0);
2256 2271
            break;

Also available in: Unified diff