From owner-freebsd-current@freebsd.org Sun Dec 31 17:19:59 2017 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 41EC1E87E5C for ; Sun, 31 Dec 2017 17:19:59 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 269887B076 for ; Sun, 31 Dec 2017 17:19:58 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: c70cde9c-ee4e-11e7-8486-0934409070aa X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id c70cde9c-ee4e-11e7-8486-0934409070aa; Sun, 31 Dec 2017 17:19:37 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id vBVHJohu008329; Sun, 31 Dec 2017 10:19:50 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1514740790.12000.20.camel@freebsd.org> Subject: Re: panic: invalid bcd 194 From: Ian Lepore To: Matthias Apitz , freebsd-current@freebsd.org Cc: cem@freebsd.org Date: Sun, 31 Dec 2017 10:19:50 -0700 In-Reply-To: <20171231083624.GA2175@c720-r314251> References: <20171230210711.GA75976@c720-r314251> <20171230211154.GT1684@kib.kiev.ua> <20171230214819.GA2191@c720-r314251> <20171231083624.GA2175@c720-r314251> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit 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: Sun, 31 Dec 2017 17:19:59 -0000 On Sun, 2017-12-31 at 09:36 +0100, Matthias Apitz wrote: > El día sábado, diciembre 30, 2017 a las 10:48:19p. m. +0100, Matthias Apitz escribió: > > > > > El día sábado, diciembre 30, 2017 a las 11:11:54p. m. +0200, Konstantin Belousov escribió: > > > > > > > > > > > > > > > > > > > > > > > > > > static inline u_char > > > > > > bcd2bin(int bcd) > > > > > > { > > > > > > > > > > > >         KASSERT(bcd >= 0 && bcd < LIBKERN_LEN_BCD2BIN, > > > > > >             ("invalid bcd %d", bcd)); > > > > > >         return (bcd2bin_data[bcd]); > > > > > > } > > > > > > > > > > > > > > For an immediate relief, enter the BIOS setup and set up the date.  Try to > > > change it even if the BIOS date looks fine. > > > > > > artc(4) should do more validation of the date read from CMOS, but this is > > > a known issue. > > The problem with this hardware (Acer C720 Chromebook) is, there is no > > BIOS setup, only somekind of SeaBIOS w/o any setup. Btw: An older > > CURRENT from an USB key r285885 boots fine. > > I have got a hint about that the problem showed up already in March this > year, even with some comment of mine in this thread: > > http://freebsd.1045724.x6.nabble.com/panic-invalid-bcd-xxx-td6170480.html > > In this tread is mentioned a patch as: > > > > > cem@ posted this patch: > > > > http://dpaste.com/1K2W05E > > > > If someone can test it, I'll gladly commit it.  The real-time clock will > > likely be wrong, but it won't panic with INVARIANTS. > but the link is expired. Has got someone this patch? I checked the SVN > for the file sys/sys/libkern.h there is no relevant change since March > 2017. (cc'ed cem@) > > 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