/[qemu]/qemu/vl.c
ViewVC logotype

Diff of /qemu/vl.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.33 by bellard, Sun Nov 16 19:46:01 2003 UTC revision 1.34 by bellard, Tue Dec 2 22:18:10 2003 UTC
# Line 1462  void serial_received_byte(SerialState *s Line 1462  void serial_received_byte(SerialState *s
1462              s->lsr |= UART_LSR_BI | UART_LSR_DR;              s->lsr |= UART_LSR_BI | UART_LSR_DR;
1463              serial_update_irq();              serial_update_irq();
1464              break;              break;
1465            case 'd':
1466                //            tb_flush();
1467                cpu_set_log(CPU_LOG_ALL);
1468                break;
1469          case TERM_ESCAPE:          case TERM_ESCAPE:
1470              goto send_char;              goto send_char;
1471          }          }
# Line 1979  void ne2000_init(void) Line 1983  void ne2000_init(void)
1983  /* Keyboard Commands */  /* Keyboard Commands */
1984  #define KBD_CMD_SET_LEDS        0xED    /* Set keyboard leds */  #define KBD_CMD_SET_LEDS        0xED    /* Set keyboard leds */
1985  #define KBD_CMD_ECHO            0xEE  #define KBD_CMD_ECHO            0xEE
1986    #define KBD_CMD_GET_ID          0xF2    /* get keyboard ID */
1987  #define KBD_CMD_SET_RATE        0xF3    /* Set typematic rate */  #define KBD_CMD_SET_RATE        0xF3    /* Set typematic rate */
1988  #define KBD_CMD_ENABLE          0xF4    /* Enable scanning */  #define KBD_CMD_ENABLE          0xF4    /* Enable scanning */
1989  #define KBD_CMD_RESET_DISABLE   0xF5    /* reset and disable scanning */  #define KBD_CMD_RESET_DISABLE   0xF5    /* reset and disable scanning */
# Line 2065  KBDState kbd_state; Line 2070  KBDState kbd_state;
2070  int reset_requested;  int reset_requested;
2071    
2072  /* update irq and KBD_STAT_[MOUSE_]OBF */  /* 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 */
2075  static void kbd_update_irq(KBDState *s)  static void kbd_update_irq(KBDState *s)
2076  {  {
2077      int irq12_level, irq1_level;      int irq12_level, irq1_level;
# Line 2080  static void kbd_update_irq(KBDState *s) Line 2087  static void kbd_update_irq(KBDState *s)
2087              if (s->mode & KBD_MODE_MOUSE_INT)              if (s->mode & KBD_MODE_MOUSE_INT)
2088                  irq12_level = 1;                  irq12_level = 1;
2089          } else {          } else {
2090              if (s->mode & KBD_MODE_KBD_INT)              if ((s->mode & KBD_MODE_KBD_INT) &&
2091                    !(s->mode & KBD_MODE_DISABLE_KBD))
2092                  irq1_level = 1;                  irq1_level = 1;
2093          }          }
2094      }      }
# Line 2120  uint32_t kbd_read_status(CPUX86State *en Line 2128  uint32_t kbd_read_status(CPUX86State *en
2128      KBDState *s = &kbd_state;      KBDState *s = &kbd_state;
2129      int val;      int val;
2130      val = s->status;      val = s->status;
2131  #if defined(DEBUG_KBD) && 0  #if defined(DEBUG_KBD)
2132      printf("kbd: read status=0x%02x\n", val);      printf("kbd: read status=0x%02x\n", val);
2133  #endif  #endif
2134      return val;      return val;
# Line 2162  void kbd_write_command(CPUX86State *env, Line 2170  void kbd_write_command(CPUX86State *env,
2170          break;          break;
2171      case KBD_CCMD_KBD_DISABLE:      case KBD_CCMD_KBD_DISABLE:
2172          s->mode |= KBD_MODE_DISABLE_KBD;          s->mode |= KBD_MODE_DISABLE_KBD;
2173            kbd_update_irq(s);
2174          break;          break;
2175      case KBD_CCMD_KBD_ENABLE:      case KBD_CCMD_KBD_ENABLE:
2176          s->mode &= ~KBD_MODE_DISABLE_KBD;          s->mode &= ~KBD_MODE_DISABLE_KBD;
2177            kbd_update_irq(s);
2178          break;          break;
2179      case KBD_CCMD_READ_INPORT:      case KBD_CCMD_READ_INPORT:
2180          kbd_queue(s, 0x00, 0);          kbd_queue(s, 0x00, 0);
# Line 2251  static void kbd_write_keyboard(KBDState Line 2261  static void kbd_write_keyboard(KBDState
2261          case 0x05:          case 0x05:
2262              kbd_queue(s, KBD_REPLY_RESEND, 0);              kbd_queue(s, KBD_REPLY_RESEND, 0);
2263              break;              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;
2269          case KBD_CMD_ECHO:          case KBD_CMD_ECHO:
2270              kbd_queue(s, KBD_CMD_ECHO, 0);              kbd_queue(s, KBD_CMD_ECHO, 0);
2271              break;              break;

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26