mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:47:44 +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:
parent
517460d3a9
commit
7c617394a1
2 changed files with 20 additions and 10 deletions
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue