summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorcheloha <cheloha@cvs.openbsd.org>2020-06-22 18:25:58 +0000
committercheloha <cheloha@cvs.openbsd.org>2020-06-22 18:25:58 +0000
commit735e7778ea8c9feb4e8e91cc0af877a06e188340 (patch)
tree9f4f89e92c9fdaa01f063f01f5b599ebbbaa938e /share
parent968ef9b13a5a1bd03cd9bfe3bcd6181fe56b9720 (diff)
inittodr(9): introduce dedicated flag to enable writes from resettodr(9)
We don't want resettodr(9) to write the RTC until inittodr(9) has actually run. Until inittodr(9) calls tc_setclock() the system UTC clock will contain a meaningless value and there's no sense in overwriting a good value with a value we know is nonsense. This is not an uncommon problem if you're debugging a problem in early boot, e.g. a panic that occurs prior to inittodr(9). Currently we use the following logic in resettodr(9) to inhibit writes: if (time_second == 1) return; ... this is too magical. A better way to accomplish the same thing is to introduce a dedicated flag set from inittodr(9). Hence, "inittodr_done". Suggested by visa@. ok kettenis@
Diffstat (limited to 'share')
0 files changed, 0 insertions, 0 deletions