loader.efi try to fallback on first device
ClosedPublic

Authored by manu on Jun 9 2016, 12:24 AM.

Details

Summary

Try to fallback on the first device if we can't find the device from which the image is loaded.

Test Plan

Tested on beaglebone black with u-boot efi implementation.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
manu retitled this revision from to loader.efi try to fallback on first device.Jun 9 2016, 12:24 AM
manu updated this object.
manu edited the test plan for this revision. (Show Details)
manu set the repository for this revision to rS FreeBSD src repository.
manu added a project: ARM.
cem added a subscriber: cem.Jun 9 2016, 12:30 AM
manu added a reviewer: andrew.Jun 9 2016, 12:30 AM
manu removed a project: ARM.
allanjude accepted this revision.Jun 14 2016, 1:19 AM
allanjude added a reviewer: allanjude.
allanjude added a subscriber: allanjude.

goatforit

This revision is now accepted and ready to land.Jun 14 2016, 1:19 AM
smh added a comment.Jun 14 2016, 2:50 AM

I'd like to know why finding the current device would ever fail?

manu added a comment.Jun 15 2016, 2:46 AM
In D6780#143556, @smh wrote:

I'd like to know why finding the current device would ever fail?

I see at least two valid reason :

  1. In case of a bad/incomplete EFI implementation (like U-Boot currently)
  2. In embedded world you could have uboot + loader.efi in a SPI flash for example and this device would not be exposed as an EFI disk.
jhb added a comment.Jun 15 2016, 5:04 PM

I would rather put this logic in find_currdev() itself.

Should we go with @jhb's suggestion then?

imp accepted this revision.Oct 20 2016, 9:49 PM

I'm good either way, though jhb's method is cleaner.

manu added a comment.Oct 21 2016, 9:38 AM

Totally forgot about this review, I'll update it this weekend with @jhb suggestion.

manu updated this revision to Diff 21739.Oct 27 2016, 5:05 PM

Update with @jhb suggestion.

This revision now requires review to proceed.Oct 27 2016, 5:05 PM
jhb accepted this revision.Oct 27 2016, 9:23 PM

Thanks

This revision is now accepted and ready to land.Oct 27 2016, 9:23 PM
This revision was automatically updated to reflect the committed changes.