Page MenuHomeFreeBSD

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

Authored by andrew on Jun 3 2016, 12:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 3, 7:53 AM
Unknown Object (File)
Feb 23 2024, 4:58 PM
Unknown Object (File)
Jan 10 2024, 6:20 PM
Unknown Object (File)
Jan 10 2024, 6:19 PM
Unknown Object (File)
Jan 10 2024, 6:19 PM
Unknown Object (File)
Jan 10 2024, 6:19 PM
Unknown Object (File)
Jan 10 2024, 6:16 PM
Unknown Object (File)
Jan 10 2024, 5:44 PM
Subscribers

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 - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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.
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.

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.

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

sys/boot/efi/loader/arch/arm64/exec.c
119 ↗(On Diff #17269)

s/fini/init/ here

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

jhb added a reviewer: jhb.
This revision is now accepted and ready to land.Jun 3 2016, 5:50 PM
smh edited edge metadata.
This revision was automatically updated to reflect the committed changes.