Re: panic: invalid bcd 194

2018-01-02 Thread Matthias Apitz
On Tuesday, 2 January 2018 16:26:31 CET, Kurt Jaeger wrote: Hi! I've added one more printf to see what is coming as year from BCD. The code is attached below and bcd.year comes out as 24 (decimal) which is 0x18. I.e. it seems that the year from 2018 is stored in hex as 0x18,

Re: panic: invalid bcd 194

2018-01-02 Thread Kurt Jaeger
Hi! > I've added one more printf to see what is coming as year from BCD. The code > is attached below and bcd.year comes out as 24 (decimal) which is 0x18. I.e. > it > seems that the year from 2018 is stored in hex as 0x18, or? It's actually BCD code:

Re: panic: invalid bcd 194

2018-01-02 Thread Matthias Apitz
El día martes, enero 02, 2018 a las 02:00:20p. m. +0100, Matthias Apitz escribió: > # cp /usr/obj/usr/src/sys/GENERIC/kernel /boot/kernel/kernel > > The kernel boots fine as: > > FreeBSD c720-r314251 12.0-CURRENT FreeBSD 12.0-CURRENT #2 r314251M: Tue Jan > 2 12:53:31 CET 2018

Re: panic: invalid bcd 194

2018-01-02 Thread Matthias Apitz
El día lunes, enero 01, 2018 a las 05:02:42p. m. -0700, Ian Lepore escribió: > 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 >

Re: panic: invalid bcd 194

2018-01-02 Thread Rodney W. Grimes
> 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

Re: panic: invalid bcd 194

2018-01-01 Thread Ian Lepore
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. > > > >

Re: panic: invalid bcd 194

2018-01-01 Thread Ian Lepore
On Mon, 2018-01-01 at 10:12 +0100, Matthias Apitz wrote: > El día lunes, enero 01, 2018 a las 09:57:23a. m. +0100, Kurt Jaeger escribió: > > > > > Hi! > > > > > > > > For the moment we solved the issue by booting some older r28 > > > memstick, writing a correct date with ntpdate into the

Re: panic: invalid bcd 194

2018-01-01 Thread Matthias Apitz
El día lunes, enero 01, 2018 a las 09:57:23a. m. +0100, Kurt Jaeger escribió: > Hi! > > > For the moment we solved the issue by booting some older r28 > > memstick, writing a correct date with ntpdate into the RTC and rebooted > > without poweroff. It seems that the RTC survives even some

Re: panic: invalid bcd 194

2018-01-01 Thread Kurt Jaeger
Hi! > For the moment we solved the issue by booting some older r28 > 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,

Re: panic: invalid bcd 194

2018-01-01 Thread Matthias Apitz
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

Re: panic: invalid bcd 194

2017-12-31 Thread Ian Lepore
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ó: > > > > > > > > > > > > > > > > > > >

Re: panic: invalid bcd 194

2017-12-31 Thread Matthias Apitz
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

Re: panic: invalid bcd 194

2017-12-30 Thread Matthias Apitz
> > > > $ vim sys/sys/libkern.h > > ... > > #define LIBKERN_LEN_BCD2BIN 154 > > #define LIBKERN_LEN_BIN2BCD 100 > > #define LIBKERN_LEN_HEX2ASCII 36 > > > > static inline u_char > > bcd2bin(int bcd) > > { > > > > KASSERT(bcd >= 0 && bcd < LIBKERN_LEN_BCD2BIN, > >

Re: panic: invalid bcd 194

2017-12-30 Thread Matthias Apitz
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

Re: panic: invalid bcd 194

2017-12-30 Thread Konstantin Belousov
d Queueing enabled > > > Dec 30 19:54:26 c720-r314251 kernel: ada0: 244198MB (500118192 512 byte > > > sectors) > > > Dec 30 19:54:26 c720-r314251 kernel: WARNING: WITNESS option enabled, > > > expect reduced performance. > > > Dec 30 19:54:26 c720-r314251 kernel

Re: panic: invalid bcd 194

2017-12-30 Thread Matthias Apitz
6 c720-r314251 kernel: WARNING: WITNESS option enabled, > > expect reduced performance. > > Dec 30 19:54:26 c720-r314251 kernel: Trying to mount root from > > ufs:/dev/ada0p2 [rw,noatime]... > > panic: invalid bcd 194 > > ... > > > > The message comes f

panic: invalid bcd 194

2017-12-30 Thread Matthias Apitz
) Dec 30 19:54:26 c720-r314251 kernel: WARNING: WITNESS option enabled, expect reduced performance. Dec 30 19:54:26 c720-r314251 kernel: Trying to mount root from ufs:/dev/ada0p2 [rw,noatime]... panic: invalid bcd 194 ... The message comes from $ find * -type f -exec fgrep "invalid bcd&quo