Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Jul 2009 02:37:59 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/boot/i386/libi386 time.c
Message-ID:  <200907250238.n6P2cD67017734@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907250238.n6P2cD67017734>