diff options
author | Werner Zeh <werner.zeh@siemens.com> | 2021-05-25 14:26:06 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-05-30 20:28:14 +0000 |
commit | 686018988c5f5416945c6fd2faad9953d86d66d6 (patch) | |
tree | 0fe1da2d8e078eb5188dc30d536ea5bfd980db14 /tests | |
parent | 1724b74f693812b48fa7e36e69174b271f3b5310 (diff) |
drivers/pc80/mc146818rtc: Check date and time for sanity
There are cases where the RTC_VRT bit in register D stays set after a
power failure while the real date and time registers can contain rubbish
values (can happen when RTC is not buffered). If we do not detect this
invalid date and/or time here and keep it, Linux will use these bad
values for the initial timekeeper init. This in turn can lead to dates
before 1970 in user land which can break a lot assumptions.
To fix this, check date and time sanity when the RTC is initialized and
reset the values if needed.
Change-Id: I5bc600c78bab50c70372600347f63156df127012
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54914
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions