Page MenuHomeFreeBSD

sys/arm64/conf/std.dev: add ds1307 to GENERIC
AbandonedPublic

Authored by pkubaj on Tue, Dec 16, 12:11 PM.

Details

Reviewers
andrew
manu
Summary

When this driver is loaded as a module, time is still reset to 1970 on
Traverse Ten64.

Test Plan

make kernel and boot on Traverse Ten64, set time, then reboot.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 69297
Build 66180: arc lint + arc unit

Event Timeline

That's clearly not the way to go, finding the real problem is what you need to do.

The real problem is mentioned here: https://wiki.freebsd.org/BjoernZeeb/Ten64

If loaded as module from multi-user we do not get the time set even if manually triggering a sysctl debug.clock_do_io=1. Reason for this is that vfs_moutroot() is responsible to have the clock set and calls CLOCK_GETTIME() indirectly so that log files or other timestamps do not appear to go backwards (if no RTC is found it'll use the vfs root node date?). Look for the inittodr() call.

The real problem is mentioned here: https://wiki.freebsd.org/BjoernZeeb/Ten64

If loaded as module from multi-user we do not get the time set even if manually triggering a sysctl debug.clock_do_io=1. Reason for this is that vfs_moutroot() is responsible to have the clock set and calls CLOCK_GETTIME() indirectly so that log files or other timestamps do not appear to go backwards (if no RTC is found it'll use the vfs root node date?). Look for the inittodr() call.

Load it in loader.conf then, that's no reason to add more stuff in GENERIC.

That's ok for me, but I thought that things work by default.