Module Name:    src
Committed By:   jmcneill
Date:           Tue Sep  8 17:20:11 UTC 2020

Modified Files:
        src/sys/arch/arm/arm: efi_runtime.c

Log Message:
Disable EFI runtime support for BE kernels


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/arm/efi_runtime.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/arm/efi_runtime.c
diff -u src/sys/arch/arm/arm/efi_runtime.c:1.3 src/sys/arch/arm/arm/efi_runtime.c:1.4
--- src/sys/arch/arm/arm/efi_runtime.c:1.3	Mon Dec 16 00:03:50 2019
+++ src/sys/arch/arm/arm/efi_runtime.c	Tue Sep  8 17:20:10 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: efi_runtime.c,v 1.3 2019/12/16 00:03:50 jmcneill Exp $ */
+/* $NetBSD: efi_runtime.c,v 1.4 2020/09/08 17:20:10 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,10 +30,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: efi_runtime.c,v 1.3 2019/12/16 00:03:50 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: efi_runtime.c,v 1.4 2020/09/08 17:20:10 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/mutex.h>
+#include <sys/endian.h>
 
 #include <uvm/uvm_extern.h>
 
@@ -41,12 +42,13 @@ __KERNEL_RCSID(0, "$NetBSD: efi_runtime.
 
 static kmutex_t efi_lock;
 
-static struct efi_systbl *ST = NULL;
 static struct efi_rt *RT = NULL;
 
 int
 arm_efirt_init(paddr_t efi_system_table)
 {
+#if BYTE_ORDER == LITTLE_ENDIAN
+	struct efi_systbl *ST;
 	const size_t sz = PAGE_SIZE * 2;
 	vaddr_t va, cva;
 	paddr_t cpa;
@@ -74,6 +76,10 @@ arm_efirt_init(paddr_t efi_system_table)
 	mutex_init(&efi_lock, MUTEX_DEFAULT, IPL_HIGH);
 
 	return 0;
+#else
+	/* EFI runtime not supported in big endian mode */
+	return ENXIO;
+#endif
 }
 
 int

Reply via email to