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.


Merge branch 'devel' of ssh://palacios@newskysaw/home/palacios/palacios into devel
[palacios-OLD.git] / palacios / src / devices / 8254.c
index 51c3f04..8e7dede 100644 (file)
@@ -162,12 +162,6 @@ static int handle_crystal_tics(struct vm_device * dev, struct channel * ch, uint
            reload_val = 0xffff;
        }
 
-       // TODO: Check this....
-       // Is this correct???
-       if (reload_val == 0) {
-           reload_val = 1;
-       }
-
        oscillations -= ch->counter;
        ch->counter = 0;
        channel_cycles = 1;
@@ -176,6 +170,12 @@ static int handle_crystal_tics(struct vm_device * dev, struct channel * ch, uint
            reload_val -= reload_val % 2;
        }
 
+       // TODO: Check this....
+       // Is this correct???
+       if (reload_val == 0) {
+           reload_val = 1;
+       }
+
        channel_cycles += oscillations / reload_val;
        oscillations = oscillations % reload_val;
 
@@ -236,7 +236,7 @@ static int handle_crystal_tics(struct vm_device * dev, struct channel * ch, uint
 
 #include <palacios/vm_guest.h>
 
-static void pit_update_time(struct guest_info * info, ullong_t cpu_cycles, ullong_t cpu_freq, void * private_data) {
+static void pit_update_timer(struct guest_info * info, ullong_t cpu_cycles, ullong_t cpu_freq, void * private_data) {
     struct vm_device * dev = (struct vm_device *)private_data;
     struct pit * state = (struct pit *)dev->private_data;
     //  ullong_t tmp_ctr = state->pit_counter;
@@ -313,14 +313,6 @@ static void pit_update_time(struct guest_info * info, ullong_t cpu_cycles, ullon
     return;
 }
 
-
-static void pit_advance_time(struct guest_info * core, void * private_data) {
-
-    v3_raise_irq(core->vm_info, 0);
-}
-
-
-
 /* This should call out to handle_SQR_WAVE_write, etc...
  */
 static int handle_channel_write(struct channel * ch, char val) {
@@ -624,8 +616,7 @@ static int pit_write_command(struct guest_info * core, ushort_t port, void * src
 
 
 static struct vm_timer_ops timer_ops = {
-    .update_time = pit_update_time,
-    .advance_timer = pit_advance_time,
+    .update_timer = pit_update_timer,
 };