Don't attempt to use EFI runtime services on UEFI versions before 2.1.
authorkettenis <kettenis@openbsd.org>
Thu, 20 Oct 2022 18:43:35 +0000 (18:43 +0000)
committerkettenis <kettenis@openbsd.org>
Thu, 20 Oct 2022 18:43:35 +0000 (18:43 +0000)
commit1c3a0ad1025fc636d775282b3d5fcf4db4a6e1f6
treeaf15df6e9c4d059b7275bb46520a8ff7f0b9f7a0
parent142d06490e248afb6c0764b242cbd5f0e8b0e17c
Don't attempt to use EFI runtime services on UEFI versions before 2.1.
The Dell Precision T1600 has a UEFI 2.0 implementation where calling
GetTime() accesses memory that isn't covered by a runtime mapping.
And frankly UEFI 2.0 is so ancient that we don't really want to use it
anyway.

This also adds the check to the arm64 version even though UEFI versions
before 2.4 don't have arm64 support.  But for now I want to keep amd64
and arm64 code as similar as possible.

ok kn@
sys/arch/amd64/amd64/efi_machdep.c
sys/arch/arm64/dev/efi_machdep.c