From owner-freebsd-current@freebsd.org Tue Jan 2 05:50:00 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45463EB4716 for ; Tue, 2 Jan 2018 05:50:00 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB080705BB; Tue, 2 Jan 2018 05:49:59 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w025nvwm089721; Mon, 1 Jan 2018 21:49:57 -0800 (PST) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w025nvEK089720; Mon, 1 Jan 2018 21:49:57 -0800 (PST) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201801020549.w025nvEK089720@pdx.rh.CN85.dnsmgr.net> Subject: Re: panic: invalid bcd 194 In-Reply-To: <1514851362.1759.8.camel@freebsd.org> To: Ian Lepore Date: Mon, 1 Jan 2018 21:49:57 -0800 (PST) CC: Matthias Apitz , freebsd-current@freebsd.org, cem@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Mailman-Approved-At: Tue, 02 Jan 2018 11:42:29 +0000 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 05:50:00 -0000 > On Mon, 2018-01-01 at 09:54 +0100, Matthias Apitz wrote: > > El d?a domingo, diciembre 31, 2017 a las 10:19:50a. m. -0700, Ian Lepore escribi?: > > > > > > > > > > > > > I will let the C720 over night under power while sitting in the boot menu, > > > > maybe this will fix the RTC battery issue. > > > > > > > Last time I worked on RTC stuff, cleaning this up got put on my "to-do > > > some day" list. ?I think maybe that day has arrived. > > > > > > -- Ian > > For the moment we solved the issue by booting some older r28nnnn > > memstick, writing a correct date with ntpdate into the RTC and rebooted > > without poweroff. It seems that the RTC survives even some short > > powercyle. > > > > The CMOS battery is soldered on the motherboard of the Acer C720, i.e. > > no chance to be replaced. > > > > The issue must be fixed in FreeBSD, i.e. it should boot even with a > > broken RTC. Should I file a PR for this? > > > > I'm happy to test any patch for this. > > > > matthias > > > > Okay, I've created a pair of patches for this. ?The first adds some > common support routines usable by all RTC drivers with BCD hardware. > ?The second one converts the atrtc driver to use those routines. ?The > common code was tested using an i2c RTC chip, but I don't have an x86 > testbed, so the atrtc patch is currently untested (it compiles). Would the rtc.c emulation in bhyve work for testing? usr.sbin/bhyve/rtc.c > > The patches are available in a pair of phabricator reviews, plus I'll > attach them to this mail. ?If the list scrubs the attachements, you can > download the patches from the phab urls below, just hit the Actions > button and look for Download Raw Diff. > > https://reviews.freebsd.org/D13730 > https://reviews.freebsd.org/D13731 > > -- Ian -- Rod Grimes rgrimes@freebsd.org