]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Restore x18 in efi_arch_leave.
authorandrew <andrew@FreeBSD.org>
Wed, 1 May 2019 17:12:49 +0000 (17:12 +0000)
committerandrew <andrew@FreeBSD.org>
Wed, 1 May 2019 17:12:49 +0000 (17:12 +0000)
commitb278d30ff05ca3dcc9cb7ad785a0e00ab7aaf570
tree1e92760546e2e39888515be0ae23565150814b24
parente9fb0d3782e8e043e1d060838155362ac1bd81c8
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
sys/arm64/arm64/efirt_machdep.c