1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:47:45 +00:00

Kernel: Ensure we read valid values from the RTC CMOS registers

We try to read twice from the RTC CMOS registers, and if the values are
not the same for 5 attempts, we know there's a malfunction with the
hardware so we declare these values as bogus in the kernel log.
This commit is contained in:
Liav A 2021-07-27 20:26:22 +03:00 committed by Andreas Kling
parent 517460d3a9
commit 7c617394a1
2 changed files with 20 additions and 10 deletions

View file

@ -13,6 +13,5 @@ namespace RTC {
void initialize();
time_t now();
time_t boot_time();
void read_registers(unsigned& year, unsigned& month, unsigned& day, unsigned& hour, unsigned& minute, unsigned& second);
}