Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/stand/efiboot efiboot: don't call WaitForSingl...
details: https://anonhg.NetBSD.org/src/rev/9c05d6356574
branches: trunk
changeset: 821625:9c05d6356574
user: nonaka <nonaka%NetBSD.org@localhost>
date: Sat Feb 11 10:15:55 2017 +0000
description:
efiboot: don't call WaitForSingleEvent after ExitBootServices is called.
diffstat:
sys/arch/i386/stand/efiboot/efiboot.c | 4 +++-
sys/arch/i386/stand/efiboot/efiboot.h | 3 ++-
sys/arch/i386/stand/efiboot/panic.c | 5 +++--
3 files changed, 8 insertions(+), 4 deletions(-)
diffs (61 lines):
diff -r ede80b5f9a72 -r 9c05d6356574 sys/arch/i386/stand/efiboot/efiboot.c
--- a/sys/arch/i386/stand/efiboot/efiboot.c Sat Feb 11 10:13:46 2017 +0000
+++ b/sys/arch/i386/stand/efiboot/efiboot.c Sat Feb 11 10:15:55 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: efiboot.c,v 1.2 2017/02/11 10:13:46 nonaka Exp $ */
+/* $NetBSD: efiboot.c,v 1.3 2017/02/11 10:15:55 nonaka Exp $ */
/*-
* Copyright (c) 2016 Kimihiro Nonaka <nonaka%netbsd.org@localhost>
@@ -35,6 +35,7 @@
EFI_DEVICE_PATH *efi_bootdp;
EFI_LOADED_IMAGE *efi_li;
uintptr_t efi_main_sp;
+bool efi_cleanuped;
static EFI_PHYSICAL_ADDRESS heap_start = EFI_ALLOCATE_MAX_ADDRESS;
static UINTN heap_size = 1 * 1024 * 1024; /* 1MB */
@@ -121,6 +122,7 @@
if (EFI_ERROR(status))
Panic(L"ExitBootServices failed");
}
+ efi_cleanuped = true;
allocsz = sizeof(struct btinfo_efimemmap) - 1
+ NoEntries * DescriptorSize;
diff -r ede80b5f9a72 -r 9c05d6356574 sys/arch/i386/stand/efiboot/efiboot.h
--- a/sys/arch/i386/stand/efiboot/efiboot.h Sat Feb 11 10:13:46 2017 +0000
+++ b/sys/arch/i386/stand/efiboot/efiboot.h Sat Feb 11 10:15:55 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: efiboot.h,v 1.2 2017/02/11 10:13:46 nonaka Exp $ */
+/* $NetBSD: efiboot.h,v 1.3 2017/02/11 10:15:55 nonaka Exp $ */
/*-
* Copyright (c) 2016 Kimihiro Nonaka <nonaka%netbsd.org@localhost>
@@ -48,6 +48,7 @@
extern EFI_DEVICE_PATH *efi_bootdp;
extern EFI_LOADED_IMAGE *efi_li;
extern uintptr_t efi_main_sp;
+extern bool efi_cleanuped;
void efi_cleanup(void);
/* eficons.c */
diff -r ede80b5f9a72 -r 9c05d6356574 sys/arch/i386/stand/efiboot/panic.c
--- a/sys/arch/i386/stand/efiboot/panic.c Sat Feb 11 10:13:46 2017 +0000
+++ b/sys/arch/i386/stand/efiboot/panic.c Sat Feb 11 10:15:55 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: panic.c,v 1.3 2017/02/05 10:13:43 joerg Exp $ */
+/* $NetBSD: panic.c,v 1.4 2017/02/11 10:15:55 nonaka Exp $ */
/*-
* Copyright (c) 2016 Kimihiro Nonaka <nonaka%netbsd.org@localhost>
@@ -54,7 +54,8 @@
reboot(void)
{
- WaitForSingleEvent(ST->ConIn->WaitForKey, 0);
+ if (!efi_cleanuped)
+ WaitForSingleEvent(ST->ConIn->WaitForKey, 0);
uefi_call_wrapper(RT->ResetSystem, 4, EfiResetCold, EFI_SUCCESS,
0, NULL);
Home |
Main Index |
Thread Index |
Old Index