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 Disable EFI runtime support for BE kernels



details:   https://anonhg.NetBSD.org/src/rev/a01f980c5b99
branches:  trunk
changeset: 975924:a01f980c5b99
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Tue Sep 08 17:20:10 2020 +0000

description:
Disable EFI runtime support for BE kernels

diffstat:

 sys/arch/arm/arm/efi_runtime.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (48 lines):

diff -r 4916ff19556e -r a01f980c5b99 sys/arch/arm/arm/efi_runtime.c
--- a/sys/arch/arm/arm/efi_runtime.c    Tue Sep 08 17:17:32 2020 +0000
+++ b/sys/arch/arm/arm/efi_runtime.c    Tue Sep 08 17:20:10 2020 +0000
@@ -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 @@
 
 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 @@
        mutex_init(&efi_lock, MUTEX_DEFAULT, IPL_HIGH);
 
        return 0;
+#else
+       /* EFI runtime not supported in big endian mode */
+       return ENXIO;
+#endif
 }
 
 int



Home | Main Index | Thread Index | Old Index