UEFI PXE
Posted: Mon Mar 25, 2019 8:20 am
I'm a bit stuck as to how a UEFI OS loader is expected to consume PXE (using EDK2). My project currently boots from a FAT volume but I would like to add PXE support and load the OS files via TFTP.
When the loader is booted via PXE the EFI_PXE_BASE_CODE_PROTOCOL Mode->Started is true and I am able to obtain the StationIp. From here I need to obtain an option from DHCP that the OS uses to locate files and more importantly use TFTP to start pulling files off the "next-server". UEFI spec says the protocol supports the EFI_LOAD_FILE_PROTOCOL but implies this is meant for firmware developers, not OS loaders. Could someone give a push in the right direction? How is an OS loader expected to pull files off the PXE server?
I'm currently determining how the bootloader was loaded by seeing if PXE was started and if it wasn't assuming we booted from a disk volume, then searching each volume for a file in my OS. This is a bit crude and ideally I'd like to determine where the bootloader was loaded from (i.e. PXE or Volume Handle XXXX). A push in the right direction would be appreciated.
(the last time I posted on this forum I was told I had to post to a "license agreement thread" which is now locked, for what it's worth: I have taken notice of the CC0 license and its intended effects, and hereby declare that all my past and future contributions to the OSDev.org Wiki are licensed under the effect of the CC0.)
When the loader is booted via PXE the EFI_PXE_BASE_CODE_PROTOCOL Mode->Started is true and I am able to obtain the StationIp. From here I need to obtain an option from DHCP that the OS uses to locate files and more importantly use TFTP to start pulling files off the "next-server". UEFI spec says the protocol supports the EFI_LOAD_FILE_PROTOCOL but implies this is meant for firmware developers, not OS loaders. Could someone give a push in the right direction? How is an OS loader expected to pull files off the PXE server?
I'm currently determining how the bootloader was loaded by seeing if PXE was started and if it wasn't assuming we booted from a disk volume, then searching each volume for a file in my OS. This is a bit crude and ideally I'd like to determine where the bootloader was loaded from (i.e. PXE or Volume Handle XXXX). A push in the right direction would be appreciated.
(the last time I posted on this forum I was told I had to post to a "license agreement thread" which is now locked, for what it's worth: I have taken notice of the CC0 license and its intended effects, and hereby declare that all my past and future contributions to the OSDev.org Wiki are licensed under the effect of the CC0.)