~roguescholar/ipxe/trunk

Viewing all changes in revision 5709.

  • Committer: Michael Brown
  • Date: 2020-08-03 14:41:30 UTC
  • Revision ID: git-v1:c63e61df75c815da1dc93196bbb6a931743b736f
[efi] Use device path to locate filesystem from which we were loaded

The file:/ URI syntax may be used to refer to local files on the
filesystem from which the iPXE binary was loaded.  This is currently
implemented by directly using the DeviceHandle recorded in our
EFI_LOADED_IMAGE_PROTOCOL.

This mechanism will fail when a USB-enabled build of iPXE is loaded
from USB storage and subsequently installs its own USB host controller
drivers, since doing so will disconnect and reconnect the existing USB
storage drivers and thereby invalidate the original storage device
handle.

Fix by recording the device path for the loaded image's DeviceHandle
at initialisation time and later using the recorded device path to
locate the appropriate device handle.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: