686018988c
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> |
||
---|---|---|
.. | ||
gnat | ||
asan.c | ||
b64_decode.c | ||
bmp_logo.c | ||
boot_device.c | ||
bootblock.c | ||
bootmem.c | ||
bootmode.c | ||
bootsplash.c | ||
cb.ads | ||
cbfs.c | ||
cbmem_common.c | ||
cbmem_console.c | ||
cbmem_stage_cache.c | ||
compute_ip_checksum.c | ||
coreboot_table.c | ||
crc_byte.c | ||
decompressor.c | ||
delay.c | ||
device_tree.c | ||
dimm_info_util.c | ||
edid.c | ||
edid_fill_fb.c | ||
espi_debug.c | ||
ext_stage_cache.c | ||
fallback_boot.c | ||
fit.c | ||
fit_payload.c | ||
fmap.c | ||
fw_config.c | ||
gcc.c | ||
gcov-glue.c | ||
gcov-io.c | ||
gcov-io.h | ||
gcov-iov.h | ||
gpio.c | ||
halt.c | ||
hardwaremain.c | ||
hexdump.c | ||
hexstrtobin.c | ||
hw-time-timer.adb | ||
imd.c | ||
imd_cbmem.c | ||
jpeg.c | ||
jpeg.h | ||
Kconfig | ||
Kconfig.cbfs_verification | ||
libgcc.c | ||
libgcov.c | ||
list.c | ||
lzma.c | ||
lzmadecode.c | ||
lzmadecode.h | ||
Makefile.inc | ||
malloc.c | ||
memchr.c | ||
memcmp.c | ||
memcpy.c | ||
memmove.c | ||
memrange.c | ||
memset.c | ||
metadata_hash.c | ||
nhlt.c | ||
primitive_memtest.c | ||
prog_loaders.c | ||
prog_ops.c | ||
program.ld | ||
ramdetect.c | ||
ramtest.c | ||
reg_script.c | ||
region_file.c | ||
reset.c | ||
rmodule.c | ||
rmodule.ld | ||
romstage_handoff.c | ||
rtc.c | ||
selfboot.c | ||
spd_bin.c | ||
spd_cache.c | ||
stack.c | ||
string.c | ||
thread.c | ||
timer.c | ||
timer_queue.c | ||
timestamp.c | ||
ubsan.c | ||
uuid.c | ||
version.c | ||
wrdd.c |