That effectively removes all config from the process - and means that any disk with a uefi executable kernel can be booted without the mystery step of "lets try to figure out where we're booting from".
That effectively removes all config from the process - and means that any disk with a uefi executable kernel can be booted without the mystery step of "lets try to figure out where we're booting from".
I think UEFI gives an EFI application (such as the Linux kernel) everything it would need for this already - but I guess Linux doesn't use it.
The EFI application entry point includes a handle to your own image [0], and the EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID [1] protocol allows you to query the path it was loaded from. It is possible for an image to be loaded without a path, but it looks like EDK2 provides it at least [2].
[0] - https://uefi.org/specs/UEFI/2.10/07_Services_Boot_Services.h...
[1] - https://uefi.org/specs/UEFI/2.10/09_Protocols_EFI_Loaded_Ima...
[2] - https://github.com/tianocore/edk2/blob/991515a0583f65a64b3a6...
https://uapi-group.org/specifications/specs/discoverable_par...