HomeFreeBSD

Restore x18 in efi_arch_leave.

Description

Restore x18 in efi_arch_leave.

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.

PR: 237234, 237055
Reviewed by: manu
Tested On: Ampere eMAG
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Sponsored by: Ampere Computing (hardware)
Differential Revision: https://reviews.freebsd.org/D20127

Details

Provenance
andrewAuthored on
Reviewer
manu
Differential Revision
D20127: Restore x18 in efi_arch_leave
Parents
rS346995: Add a few regression tests for mlock(2).
Branches
Unknown
Tags
Unknown