On 8/18/22 16:51, Ard Biesheuvel wrote:
When GRUB runs on top of EFI firmware, it only has access to block and network device abstractions exposed by the firmware, and it is up to the firmware to quiesce the underlying hardware when handing over to the OS.
I guess you refer to ExitBootServices() here.
This is especially important for network devices, to prevent incoming packets from being DMA'd straight into memory after the OS has taken over but before it has managed to reconfigure the network hardware.
This is even more true considering that an EFI binary started by GRUB may return to GRUB and the user expects that all commands in the console are still usable.
GRUB handles this by means of the grub_net_fini_hw() preboot hook, which is executed before calling into the booted image. This means that all network devices disappear or become inoperable before the EFI stub executes on EFI targeted builds. This is problematic as it prevents the EFI stub from calling back into GRUB provided protocols such as LoadFile2 for the initrd, which we will provide in a subsequent patch. So add a flag that indicates to the network core that EFI network devices should not be closed when grub_net_fini_hw() is called. Signed-off-by: Ard Biesheuvel <a...@kernel.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schucha...@canonical.com> _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel