Date: Mon, 30 Jul 2018 17:40:27 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336919 - head/sys/dev/efidev Message-ID: <201807301740.w6UHeRM0077138@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807301740.w6UHeRM0077138>