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@
-/* $OpenBSD: efi_machdep.c,v 1.1 2022/10/16 15:03:39 kettenis Exp $ */
+/* $OpenBSD: efi_machdep.c,v 1.2 2022/10/20 18:43:35 kettenis Exp $ */
/*
* Copyright (c) 2022 Mark Kettenis <kettenis@openbsd.org>
printf(".%d", minor % 10);
printf("\n");
+ /* Early implementations can be buggy. */
+ if (major < 2 || (major == 2 && minor < 10))
+ return;
+
if ((bios_efiinfo->flags & BEI_64BIT) == 0)
return;
-/* $OpenBSD: efi_machdep.c,v 1.2 2022/10/12 13:39:50 kettenis Exp $ */
+/* $OpenBSD: efi_machdep.c,v 1.3 2022/10/20 18:43:35 kettenis Exp $ */
/*
* Copyright (c) 2017 Mark Kettenis <kettenis@openbsd.org>
printf(".%d", minor % 10);
printf("\n");
+ /* Early implementations can be buggy. */
+ if (major < 2 || (major == 2 && minor < 10))
+ return;
+
efi_map_runtime(sc);
/*