Use the UEFI timer on arm64,the RTC may not be available
ClosedPublic

Authored by andrew on Jun 3 2016, 12:01 PM.

Details

Summary

The existing EFI timer code calls RS->GetTime. This doesn't seem
to be available on many arm64 platforms. Replace it with a timer that
increments evert 10ms.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
andrew updated this revision to Diff 17268.Jun 3 2016, 12:01 PM
andrew retitled this revision from to Use the UEFI timer on arm64,the RTC may not be available.
andrew updated this object.
andrew edited the test plan for this revision. (Show Details)
andrew added reviewers: emaste, imp, smh.
andrew added inline comments.Jun 3 2016, 12:02 PM
sys/boot/efi/libefi/time_event.c
1 ↗(On Diff #17268)

This file wasn't copied, but git seems to think so due to the similar license.

emaste added inline comments.Jun 3 2016, 12:33 PM
sys/boot/efi/libefi/Makefile
10–14 ↗(On Diff #17268)

Do you think it would make sense to just use the same code in both cases?

16 ↗(On Diff #17268)

blank line?

sys/boot/efi/libefi/time_event.c
1 ↗(On Diff #17268)

Yeah, probably because the non-license-block content in the both the old and new files is rather small.

andrew added inline comments.Jun 3 2016, 1:05 PM
sys/boot/efi/libefi/Makefile
10–14 ↗(On Diff #17268)

I didn't because it is untested there. I got the idea from grub where they still use the GetTime functions in x86.

16 ↗(On Diff #17268)

Merge conflict, should be one line higher

andrew updated this revision to Diff 17269.Jun 3 2016, 1:05 PM

Fix a blank line

emaste added a subscriber: jhb.Jun 3 2016, 1:48 PM
jhb added inline comments.Jun 3 2016, 4:59 PM
sys/boot/efi/loader/arch/arm64/exec.c
119 ↗(On Diff #17269)

s/fini/init/ here

andrew updated this revision to Diff 17275.Jun 3 2016, 5:32 PM

s/fini/init/ here, and remove an extra call to dev_cleanup

andrew marked 3 inline comments as done.Jun 3 2016, 5:32 PM
jhb accepted this revision.Jun 3 2016, 5:50 PM
jhb added a reviewer: jhb.
This revision is now accepted and ready to land.Jun 3 2016, 5:50 PM
smh accepted this revision.Jun 3 2016, 9:42 PM
smh edited edge metadata.
This revision was automatically updated to reflect the committed changes.