[PATCH] efi: fix semihosting EFI payload booting

Heinrich Schuchardt xypron.glpk at gmx.de
Sat May 13 16:59:06 CEST 2023


On 5/12/23 16:07, Andre Przywara wrote:
>> I wonder if the file system should be exposed as EFI simple file system
>> so that EFI applications can access it, e.g. for GRUB to load initrd and
>> the kernel.
> Yes, this would be the ultimate goal. There is no file listing
> functionality in semihosting, which is a bummer, but it should still work
> if you know the file name. On top of the EDK-II shell or grub being able to
> load an image, this would also allow to easily specify an initrd via the
> kernel command line. This works with EDK-II's semihosting support.
>
> But I see that this requires more work, IIUC we need to support
> hostfs explicitly via the EFI_SIMPLE_FILE_SYSTEM_PROTOCOL.
> At the moment this seems to assume that there is some underlying block
> device, so this might need some refactoring.
>
> As it stands right now, your much simpler patch seems to provide the same
> functionality as mine, so I wonder if we should take this as a kind of
> quick fix, to allow starting EFI apps loaded via hostfs (including
> sandbox, btw).
>
> Eventually, when introducing proper filesystem protocol support, this
> patch probably would need to come back.
>
> So I leave this up to you, but am fine with your simpler patch.
>
> Cheers,
> Andre
>

GRUB only consumes the block IO protocol so it would not benefit.

Linux consumes the simple file system protocol but passing file names
via the command line has been deprecated by the EFI maintainer.

Best regards

Heinrich




More information about the U-Boot mailing list