NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/58075: efi_bootdp memory corrupted by OpenProtocol on some machines
The following reply was made to PR kern/58075; it has been noted by GNATS.
From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: gnats-bugs%NetBSD.org@localhost, netbsd-bugs%NetBSD.org@localhost
Cc: rin%NetBSD.org@localhost, jakllsch%NetBSD.org@localhost
Subject: Re: kern/58075: efi_bootdp memory corrupted by OpenProtocol on some machines
Date: Sun, 24 Mar 2024 20:06:44 +0000
This is a multi-part message in MIME format.
--=_/7SKalmIntflQ5fRRqx18SV1eoaDZ/rT
The attached patch on efiboot as of HEAD, without backing out efinet.c
rev. 1.9, seems to make the bootloader work reliably on the Synquacer.
Thoughts?
--=_/7SKalmIntflQ5fRRqx18SV1eoaDZ/rT
Content-Type: text/plain; charset="ISO-8859-1"; name="pr58075-efibootdpcorrupt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="pr58075-efibootdpcorrupt.patch"
From 300bea0f4e29cd53c55edb16e49c03d1727cd0b8 Mon Sep 17 00:00:00 2001
From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
Date: Sun, 24 Mar 2024 19:18:11 +0000
Subject: [PATCH] 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
---
sys/stand/efiboot/efiboot.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys/stand/efiboot/efiboot.c b/sys/stand/efiboot/efiboot.c
index 03af54ae8627..8c444357beee 100644
--- a/sys/stand/efiboot/efiboot.c
+++ b/sys/stand/efiboot/efiboot.c
@@ -86,6 +86,8 @@ efi_main(EFI_HANDLE imageHandle, EFI_SYSTEM_TABLE *system=
Table)
status =3D uefi_call_wrapper(BS->HandleProtocol, 3, efi_li->DeviceHandle,=
&DevicePathProtocol, (void **)&efi_bootdp);
if (EFI_ERROR(status))
efi_bootdp =3D NULL;
+ else
+ efi_bootdp =3D DuplicateDevicePath(efi_bootdp);
=20
#ifdef EFIBOOT_DEBUG
Print(L"Loaded image : 0x%" PRIxEFIPTR "\n", efi_li);
--=_/7SKalmIntflQ5fRRqx18SV1eoaDZ/rT--
Home |
Main Index |
Thread Index |
Old Index