From owner-cvs-src-old@FreeBSD.ORG Sat Jul 25 02:38:13 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A1F81065670 for ; Sat, 25 Jul 2009 02:38:13 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 76E958FC12 for ; Sat, 25 Jul 2009 02:38:13 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n6P2cDW1017735 for ; Sat, 25 Jul 2009 02:38:13 GMT (envelope-from emaste@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n6P2cD67017734 for cvs-src-old@freebsd.org; Sat, 25 Jul 2009 02:38:13 GMT (envelope-from emaste@repoman.freebsd.org) Message-Id: <200907250238.n6P2cD67017734@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to emaste@repoman.freebsd.org using -f From: Ed Maste Date: Sat, 25 Jul 2009 02:37:59 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_6 Subject: cvs commit: src/sys/boot/i386/libi386 time.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jul 2009 02:38:13 -0000 emaste 2009-07-25 02:37:59 UTC FreeBSD src repository Modified files: (Branch: RELENG_6) sys/boot/i386/libi386 time.c Log: SVN rev 195861 on 2009-07-25 02:37:59Z by emaste MFC r179825 by olli: Implement a workaround for a long-standing problem in libi386's time(), caused by a qemu bug. The bug might be present in other BIOSes, too. qemu either does not simulate the AT RTC correctly or has a broken BIOS 1A/02 implementation, and will return an incorrect value if the RTC is read while it is being updated. The effect is worsened by the fact that qemu's INT 15/86 function ("wait" a.k.a. usleep) is non-implmeneted or broken and returns immediately, causing beastie.4th to spin in a tight loop calling the "read RTC" function millions of times, triggering the problem quickly. Therefore, we keep reading the BIOS value until we get the same result twice. This change fixes beastie.4th's countdown under qemu. Revision Changes Path 1.5.10.1 +32 -8 src/sys/boot/i386/libi386/time.c