From 9ae5d8b8a120054f577427a61a4adf371bc1612f 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