svn commit: r336919 - head/sys/dev/efidev
Kyle Evans
kevans at FreeBSD.org
Mon Jul 30 17:40:28 UTC 2018
Author: kevans
Date: Mon Jul 30 17:40:27 2018
New Revision: 336919
URL: https://svnweb.freebsd.org/changeset/base/336919
Log:
efirt: Add tunable to allow disabling EFI Runtime Services
Leading up to enabling EFIRT in GENERIC, allow runtime services to be
disabled with a new tunable: efi.rt_disabled. This makes it so that EFIRT
can be disabled easily in case we run into some buggy UEFI implementation
and fail to boot.
Discussed with: imp, kib
MFC after: 1 week
Modified:
head/sys/dev/efidev/efirt.c
Modified: head/sys/dev/efidev/efirt.c
==============================================================================
--- head/sys/dev/efidev/efirt.c Mon Jul 30 17:03:15 2018 (r336918)
+++ head/sys/dev/efidev/efirt.c Mon Jul 30 17:40:27 2018 (r336919)
@@ -133,7 +133,12 @@ efi_init(void)
struct efi_md *map;
caddr_t kmdp;
size_t efisz;
+ int rt_disabled;
+ rt_disabled = 0;
+ TUNABLE_INT_FETCH("efi.rt_disabled", &rt_disabled);
+ if (rt_disabled == 1)
+ return (0);
mtx_init(&efi_lock, "efi", NULL, MTX_DEF);
if (efi_systbl_phys == 0) {
@@ -222,6 +227,9 @@ static void
efi_uninit(void)
{
+ /* Most likely disabled by tunable */
+ if (efi_runtime == NULL)
+ return;
efi_destroy_1t1_map();
efi_systbl = NULL;
More information about the svn-src-all
mailing list