X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2F8254.c;h=9a9ee99a6ff7274d6d2ec36e4f7ce63934be8181;hb=acdffc5dbc72ac1fdddbf5f1da032cdcdf28abdc;hp=fee0e1afcedf513f729faa30db956ce68d91c4ea;hpb=b78d577da5b43dfe1da69e57e3b24faa4d9dc465;p=palacios.releases.git diff --git a/palacios/src/devices/8254.c b/palacios/src/devices/8254.c index fee0e1a..9a9ee99 100644 --- a/palacios/src/devices/8254.c +++ b/palacios/src/devices/8254.c @@ -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) {