From eae29259cd81d3d2e1426eb9a3f9c47eb06d0a88 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 31 Mar 2007 14:40:29 +0000 Subject: [PATCH] Fix bug in jitter reported by Godmar Back (BIOS wouldn't finish initializing). --- src/misc/bochs-2.2.6-jitter.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/misc/bochs-2.2.6-jitter.patch b/src/misc/bochs-2.2.6-jitter.patch index fe5144c..48917e0 100644 --- a/src/misc/bochs-2.2.6-jitter.patch +++ b/src/misc/bochs-2.2.6-jitter.patch @@ -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; -- 2.30.2