Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/29329 )
Change subject: drivers/pc80/rtc/mc146818rtc.c: Reset RTC time on RTC power failure ......................................................................
Patch Set 5:
(2 comments)
What you describe sounds exactly like what the original code tries to accomplish (based on `RTC_VRT`). So this seems to be a workaround for either the chipset or the board?
The name of the Kconfig (if it is really necessary) should reflect that this is not about normal behavior. "Reset time on rtc powerfail" is what we always do, just somehow your chipset fails to report the failure in the generic way, it seems.
https://review.coreboot.org/#/c/29329/5/src/drivers/pc80/rtc/mc146818rtc.c File src/drivers/pc80/rtc/mc146818rtc.c:
https://review.coreboot.org/#/c/29329/5/src/drivers/pc80/rtc/mc146818rtc.c@1... PS5, Line 101: invalid Looking at its usage and the "Clear requested" in the printk() below. I guess this is just the wrong parameter to trigger a date reset. I'm not sure if changing the meaning of a parameter via Kconfig is a good idea.
https://review.coreboot.org/#/c/29329/5/src/drivers/pc80/rtc/mc146818rtc.c@1... PS5, Line 154: if (cmos_invalid) I would simply adapt this condition, e.g.
if (cmos_invalid || (CONFIG(RESET_TIME_ON_CMOS_CLEAR_REQUEST) && invalid))