Fix bug in jitter reported by Godmar Back (BIOS wouldn't finish
authorBen Pfaff <blp@cs.stanford.edu>
Sat, 31 Mar 2007 14:40:29 +0000 (14:40 +0000)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 31 Mar 2007 14:40:29 +0000 (14:40 +0000)
initializing).

src/misc/bochs-2.2.6-jitter.patch

index fe5144c09849394a74fb7f1e3f5580f52738b849..48917e06b1a638f7b424938753302f22d0a6dfd3 100644 (file)
@@ -15,7 +15,7 @@ diff -urp bochs-2.2.6/iodev/pit82c54.cc bochs-2.2.6.orig/iodev/pit82c54.cc
          if(thisctr.triggerGATE || thisctr.first_pass) {
 -          set_count(thisctr, thisctr.inlatch);
 +            unsigned n = thisctr.inlatch;
-+            if (jitter) {
++            if (jitter && n > 5) {
 +                n *= (double) rand() / RAND_MAX;
 +                if (n < 5)
 +                    n = 5;