Page MenuHomeFreeBSD

Restore x18 in efi_arch_leave
ClosedPublic

Authored by andrew on May 1 2019, 4:04 PM.

Details

Reviewers
manu
Group Reviewers
arm64
Commits
rS346996: Restore x18 in efi_arch_leave.
Summary

Some UEFI implementations trash this register and, as we use it as
a platform register, the kernel doesn't save it before calling into
the UEFI runtime services. As we have a copy in tpidr_el1 restore from
there when exiting the EFI environment.

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.

Event Timeline

andrew created this revision.May 1 2019, 4:04 PM
andrew updated this revision to Diff 56913.May 1 2019, 4:23 PM

Move loading x18 before we use it.

manu accepted this revision as: manu.May 1 2019, 4:31 PM

Also :

Tested On: Ampere eMAG

This revision is now accepted and ready to land.May 1 2019, 4:31 PM
emaste added a comment.May 1 2019, 4:49 PM

Should we add a Sponsored by: Ampere Computing (hardware)?

emaste added a comment.May 1 2019, 4:51 PM

And PRs 237234, 237055

manu added a comment.May 1 2019, 4:57 PM

Yes (for both)

emaste added a comment.May 1 2019, 5:08 PM

(And Andy's Sponsored-by, of course)

This revision was automatically updated to reflect the committed changes.