Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/arm Add a boot option to disable EFI runtime se...
details: https://anonhg.NetBSD.org/src/rev/cec1037534e2
branches: trunk
changeset: 371864:cec1037534e2
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Oct 15 11:19:23 2022 +0000
description:
Add a boot option to disable EFI runtime services.
diffstat:
sys/arch/arm/arm/efi_runtime.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (39 lines):
diff -r 01e09e42e2a9 -r cec1037534e2 sys/arch/arm/arm/efi_runtime.c
--- a/sys/arch/arm/arm/efi_runtime.c Sat Oct 15 11:07:38 2022 +0000
+++ b/sys/arch/arm/arm/efi_runtime.c Sat Oct 15 11:19:23 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: efi_runtime.c,v 1.9 2022/06/18 08:13:44 skrll Exp $ */
+/* $NetBSD: efi_runtime.c,v 1.10 2022/10/15 11:19:23 jmcneill Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#include "efi.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: efi_runtime.c,v 1.9 2022/06/18 08:13:44 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: efi_runtime.c,v 1.10 2022/10/15 11:19:23 jmcneill Exp $");
#include <sys/param.h>
#include <sys/mutex.h>
@@ -43,6 +43,7 @@
#include <dev/efivar.h>
#include <arm/arm/efi_runtime.h>
+#include <arm/bootconfig.h>
#ifdef _LP64
#define EFIERR(x) (0x8000000000000000 | x)
@@ -77,6 +78,12 @@
const size_t sz = PAGE_SIZE * 2;
vaddr_t va, cva;
paddr_t cpa;
+ int val;
+
+ if (get_bootconf_option(boot_args, "noefirt",
+ BOOTOPT_TYPE_BOOLEAN, &val) && val) {
+ return ENXIO;
+ }
va = uvm_km_alloc(kernel_map, sz, 0, UVM_KMF_VAONLY);
if (va == 0) {
Home |
Main Index |
Thread Index |
Old Index