Heinrich Schuchardt xypron.glpk at gmx.de
Tue Aug 6 06:34:58 UTC 2019

Hello Leif,

iPXE uses the EFI simple network protocol to execute DHCP.

Can GRUB already do the same when the EFI_PXE_BASE_CODE_PROTOCOL is not

What I do not understand about GRUB's grub_net_configure_by_dhcp_ack()
is that it silently assumes IPv4 being used without even checking. This
contradicts the definition of the PXE base code protocol in the UEFI

EFI_PXE_BASE_CODE_PACKET DhcpAck is a union:

typedef union {
  UINT8                             Raw[1472];

Should the check be done in grub_efi_net_config_real()?

Best regards


On 8/5/19 10:08 PM, Heinrich Schuchardt wrote:
> Hello Alex,
> lib/efi_loader/efi_net.c contains pieces of the
> EFI_PXE_BASE_CODE_PROTOCOL. But it is incompletely implemented: all
> function pointers are NULL and so immediate failure is expected when
> using the protocol.
> Do you remember why you introduced this protocol into U-Boot?
> It is not part of the EBBR specification.
> It is not needed for booting via GRUB from disk but seems to be used to
> configure the network device in GRUB (grub_net_configure_by_dhcp_ack()
> seems only to consume pxe_mode->dhcp_ack).
> If the UEFI subsystem is initialized before using the 'dhcp' command the
> DHCP results are ignored.
> @Patrick:
> What do you use the protocol for? GRUB?
> Best regards
> Heinrich

More information about the U-Boot mailing list