Module Name: src
Committed By: riastradh
Date: Thu Mar 28 18:24:57 UTC 2024
Modified Files:
src/sys/stand/efiboot: efiboot.c
Log Message:
efiboot: Duplicate efi_bootdp before we clobber it in efi_net_probe.
Patch from jakllsch@. Makes Socionext Synquacer boot considerably
more reliably.
PR kern/58075
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/stand/efiboot/efiboot.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/stand/efiboot/efiboot.c
diff -u src/sys/stand/efiboot/efiboot.c:1.22 src/sys/stand/efiboot/efiboot.c:1.23
--- src/sys/stand/efiboot/efiboot.c:1.22 Wed Oct 6 10:13:19 2021
+++ src/sys/stand/efiboot/efiboot.c Thu Mar 28 18:24:57 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: efiboot.c,v 1.22 2021/10/06 10:13:19 jmcneill Exp $ */
+/* $NetBSD: efiboot.c,v 1.23 2024/03/28 18:24:57 riastradh Exp $ */
/*-
* Copyright (c) 2018 Jared McNeill <[email protected]>
@@ -86,6 +86,8 @@ efi_main(EFI_HANDLE imageHandle, EFI_SYS
status = uefi_call_wrapper(BS->HandleProtocol, 3, efi_li->DeviceHandle, &DevicePathProtocol, (void **)&efi_bootdp);
if (EFI_ERROR(status))
efi_bootdp = NULL;
+ else
+ efi_bootdp = DuplicateDevicePath(efi_bootdp);
#ifdef EFIBOOT_DEBUG
Print(L"Loaded image : 0x%" PRIxEFIPTR "\n", efi_li);