[PATCH] efi_loader: add missing EFI_EXIT in efi_disconnect_controller
Simon Glass
sjg at chromium.org
Wed Jul 1 14:17:11 CEST 2026
Hi Ahmad,
On Mon, 29 Jun 2026 at 12:06, Ahmad Fatoum <a.fatoum at pengutronix.de> wrote:
>
> Hello Simon,
>
> On 6/25/26 5:12 PM, Simon Glass wrote:
> > Hi Ahmad,
> >
> > On Thu, 18 Jun 2026 at 16:28, Ahmad Fatoum <a.fatoum at pengutronix.de> wrote:
> >>
> >> Hello,
> >>
> >> On 6/18/26 5:18 PM, Simon Glass wrote:
> >>> Hi Vincent,
> >>>
> >>> On Thu, 18 Jun 2026 at 16:09, Vincent Stehlé <vincent.stehle at arm.com> wrote:
> >>>>
> >>>> Make sure to call EFI_EXIT() in efi_disconnect_controller(), when returning
> >>>> after having called EFI_ENTRY().
> >>>>
> >>>> This is inspired by a barebox fix. [1]
> >>>
> >>> Hmm, does Barebox support EFI_LOADER now? I wish we could bring these
> >>> projects back together :-)
> >>
> >> It's not as extensive as U-Boot's yet, but it's usable for the common
> >> boot me a distro GRUB use case. The code originated from U-Boot with
> >> some parts heavily rewritten to fit barebox, e.g. the EFI filesystem
> >> protocol is implemented on top of dirfds, so it reuses VFS path handling
> >> and other such things.
> >
> > OK good. I did create a VFS in Concept but I have not tried to get it
> > into mainline yet.
>
> Cool. I really look forward to `cp /dev/sd /dev/emmc` just working :-)
Well, you can copy:
=> mount hostfs . host
=> fs cp host/README host/Kconfig
81004 bytes copied
=>
but there is no device fs :-(
>
>
> >> The imported files have Origin-URL comments pointing back at U-Boot
> >> including the revision they originated from, but we are still in need of
> >> better tooling to make use of these tags.
> >
> > On another topic - where did we get to with the whole-FITsigning
> > thing? Should we set up a call to talk it through?
>
> This is still something I am interested in landing. I had started a
> review of your counterproposal, but got distracted before finishing it.
> I submitted it now.
OK great, thanks, will take a look.
>
> Cheers,
> Ahmad
>
> >
> > Regards,
> > Simon
> >
> >>
> >> @Vincent, I suspect a number of fixes in [1] are also applicable to
> >> U-Boot, but I haven't checked.
> >>
> >> [1]:
> >> https://lore.kernel.org/barebox/20260216084758.3548990-1-a.fatoum@pengutronix.de/
> >>
> >> Cheers,
> >> Ahmad
> >>
> >>
> >>
> >>>
> >>>>
> >>>> Link: https://git.pengutronix.de/cgit/barebox/commit/?id=080db65e39a877b000baaf843c997a69821dfe69 [1]
> >>>> Fixes: 314bed6c854e ("efi_loader: fix DisconnectController() for sole child")
> >>>> Signed-off-by: Vincent Stehlé <vincent.stehle at arm.com>
> >>>> Cc: Heinrich Schuchardt <xypron.glpk at gmx.de>
> >>>> Cc: Ilias Apalodimas <ilias.apalodimas at linaro.org>
> >>>> Cc: Tom Rini <trini at konsulko.com>
> >>>> ---
> >>>> lib/efi_loader/efi_boottime.c | 2 +-
> >>>> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
> >>>> index de57823bd44..b6966652d97 100644
> >>>> --- a/lib/efi_loader/efi_boottime.c
> >>>> +++ b/lib/efi_loader/efi_boottime.c
> >>>> @@ -3895,7 +3895,7 @@ efi_status_t EFIAPI efi_disconnect_controller(
> >>>> &number_of_children,
> >>>> &child_handle_buffer);
> >>>> if (r != EFI_SUCCESS)
> >>>> - return r;
> >>>> + return EFI_EXIT(r);
> >>>> sole_child = (number_of_children == 1);
> >>>>
> >>>> if (child_handle) {
> >>>> --
> >>>> 2.53.0
Regards,
Simon
More information about the U-Boot
mailing list