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.


Handle 8254 PIT reload count of 0 correctly (means 65536)
Alexander Kudryavtsev [Fri, 17 Feb 2012 20:25:41 +0000 (14:25 -0600)]
palacios/src/devices/8254.c

index 1a44399..5944cfa 100644 (file)
@@ -177,10 +177,11 @@ static int handle_crystal_tics(struct pit * pit, struct channel * ch, uint_t osc
            reload_val -= reload_val % 2;
        }
 
-       // TODO: Check this....
-       // Is this correct???
        if (reload_val == 0) {
-           reload_val = 1;
+           // This means the value is being set to 0x10000
+           // but due to the tick after the reload, it wraps
+           // down to 0xffff
+           reload_val = 0xffff;
        }
 
        channel_cycles += oscillations / reload_val;