svn commit: r326066 - in head/sys: arm64/conf conf dev/efidev modules/efirt

Ian Lepore ian at freebsd.org
Tue Nov 21 17:39:49 UTC 2017


On Tue, 2017-11-21 at 17:23 +0000, Andrew Turner wrote:
> Author: andrew
> Date: Tue Nov 21 17:23:16 2017
> New Revision: 326066
> URL: https://svnweb.freebsd.org/changeset/base/326066
> 
> Log:
>   Add a driver for the EFI RTC. This uses the EFI Runtime Services to query
>   the system time.
>   
>   As we seem to only read this time on boot, and this is the only source of
>   time on many arm64 machines we need to enable this by default there. As
>   this is not always the case with U-Boot firmware, or when we have been
>   booted from a non-UEFI environment we only enable the device driver when
>   the Runtime Services are present and reading the time doesn't result in an
>   error.

If the efi runtime returns an error for the case where time is invalid
because the clock oscillator is stopped, this "don't attach on error"
logic will result in the clock never working, because it is typically
the act of writing a valid time to the device that starts the
oscillator and clears the error condition.

It might make sense to always attach the device, but only report an
error in clock_settime() once.

-- Ian


More information about the svn-src-all mailing list