|Summary:||The aarch64 EFI kernel does not get/set the EFI clock|
|Product:||Base System||Reporter:||Peter Wemm <peter>|
|Component:||kern||Assignee:||Andrew Turner <Andrew>|
|Severity:||Affects Many People||CC:||Andrew, emaste, imp|
|Bug Depends on:|
Description Peter Wemm 2016-08-26 20:56:53 UTC
If you boot an aarch64 machine on real hardware, you are greeted with: warning: no time-of-day clock registered, system time will not be set accurately After reading the code, it appears that the EFI runtime services get/set clock calls are not used. For reference, there is an implementation in the stable/10/sys/ia64/ia64/efi.c although it is a little strange in that it attaches to the ia64 nexus driver. See efi_get_time() / efi_set_time() and the nexus clock driver. The impact of this is that aarch64 machines boot up on Jan 1st, 1970 and are unable to do dnssec validation. This affects ntp.conf if you have dns names in there.
Comment 1 Ed Maste 2016-08-26 21:03:47 UTC
*** Bug 212184 has been marked as a duplicate of this bug. ***
Comment 2 Andrew Turner 2016-08-26 23:26:57 UTC
Warner has patches to start supporting the runtime services, but these would need testing on arm64.
Comment 3 Ed Maste 2017-06-16 14:32:07 UTC
Comment 4 Ed Maste 2017-06-16 14:40:20 UTC
*** Bug 220048 has been marked as a duplicate of this bug. ***
Comment 5 Andrew Turner 2017-10-13 09:59:47 UTC
There is a patch in review D12650. This depends on base r324495.
Comment 6 Ed Maste 2017-11-21 02:10:46 UTC
Patch (w/ additional fix) tested on my SoftIron OverDrive 1000.
Comment 7 commit-hook 2017-11-21 17:23:44 UTC
A commit references this bug: Author: andrew Date: Tue Nov 21 17:23:16 UTC 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. PR: 212185 Reviewed by: imp, kib Tested by: emaste Relnotes: yes Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D12650 Changes: head/sys/arm64/conf/GENERIC head/sys/conf/files head/sys/dev/efidev/efirtc.c head/sys/modules/efirt/Makefile
Comment 8 Andrew Turner 2017-11-21 17:34:05 UTC
This can't be MFCd as it relies on other changes that would break KBI of struct pcb.