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 Only try to call EFI RT's reset once. If it...
details: https://anonhg.NetBSD.org/src/rev/2a35dd29bff9
branches: trunk
changeset: 962572:2a35dd29bff9
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Thu Jul 25 02:00:40 2019 +0000
description:
Only try to call EFI RT's reset once. If it faults for some reason, just
return an error so the kernel will try to PSCI reset instead. Otherwise
we get stuck in an endless loop..
diffstat:
sys/arch/arm/arm/efi_runtime.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diffs (39 lines):
diff -r f6e91d2b36fd -r 2a35dd29bff9 sys/arch/arm/arm/efi_runtime.c
--- a/sys/arch/arm/arm/efi_runtime.c Thu Jul 25 01:18:05 2019 +0000
+++ b/sys/arch/arm/arm/efi_runtime.c Thu Jul 25 02:00:40 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: efi_runtime.c,v 1.1 2018/10/28 10:21:42 jmcneill Exp $ */
+/* $NetBSD: efi_runtime.c,v 1.2 2019/07/25 02:00:40 jmcneill Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: efi_runtime.c,v 1.1 2018/10/28 10:21:42 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: efi_runtime.c,v 1.2 2019/07/25 02:00:40 jmcneill Exp $");
#include <sys/param.h>
#include <sys/mutex.h>
@@ -113,13 +113,19 @@
int
arm_efirt_reset(enum efi_reset type)
{
+ static int reset_called = false;
efi_status status;
if (RT == NULL || RT->rt_reset == NULL)
return ENXIO;
mutex_enter(&efi_lock);
- status = RT->rt_reset(type, 0, 0, NULL);
+ if (reset_called == false) {
+ reset_called = true;
+ status = RT->rt_reset(type, 0, 0, NULL);
+ } else {
+ status = 1;
+ }
mutex_exit(&efi_lock);
if (status)
return EIO;
Home |
Main Index |
Thread Index |
Old Index