On Thu, Sep 08, 2022 at 03:30:15PM +0200, 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 exiting boot services
> and handing over to the OS.
>
> 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.
>
> 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>

Reviewed-by: Daniel Kiper <daniel.ki...@oracle.com>

Daniel

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to