Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Corrected keyboard hook syntax for when 0x80 delay port intercept is turned on
[palacios.releases.git] / palacios / src / devices / 8254.c
index fee0e1a..9a9ee99 100644 (file)
@@ -54,8 +54,8 @@
  */
 typedef enum {NOT_RUNNING, PENDING, RUNNING} channel_run_state_t;
 typedef enum {NOT_WAITING, WAITING_LOBYTE, WAITING_HIBYTE} channel_access_state_t;
-typedef enum {LATCH_COUNT, LOBYTE_ONLY, HIBYTE_ONLY, LOBYTE_HIBYTE} channel_access_mode_t;
-typedef enum {IRQ_ON_TERM_CNT, ONE_SHOT, RATE_GEN, SQR_WAVE, SW_STROBE, HW_STROBE} channel_op_mode_t;
+typedef enum {LATCH_COUNT = 0, LOBYTE_ONLY = 1, HIBYTE_ONLY = 2, LOBYTE_HIBYTE = 3} channel_access_mode_t;
+typedef enum {IRQ_ON_TERM_CNT = 0, ONE_SHOT = 1, RATE_GEN = 2, SQR_WAVE = 3, SW_STROBE = 4, HW_STROBE = 5} channel_op_mode_t;
 
 
 struct channel {
@@ -165,7 +165,7 @@ static int handle_crystal_tics(struct pit * pit, struct channel * ch, uint_t osc
     } else {
        ushort_t reload_val = ch->reload_value; 
 
-       if (ch->op_mode == SW_STROBE) {
+       if ((ch->op_mode == SW_STROBE) || (ch->op_mode == IRQ_ON_TERM_CNT)) {
            reload_val = 0xffff;
        }
 
@@ -608,11 +608,6 @@ static int pit_write_command(struct guest_info * core, ushort_t port, void * src
        return -1;
     }
 
-    if (cmd->op_mode == 0) {
-      V3_Print("SETTING PIT MODE TO 0!!!!!\n");
-      v3_print_guest_state(core);
-    }
-
     switch (cmd->channel) {
        case 0:
            if (handle_channel_cmd(&(state->ch_0), *cmd) == -1) {