11516 loader.efi: replace HandleProtocol() with OpenProtocol()

Review Request #2209 — Created Aug. 4, 2019 and submitted

tsoome
illumos-gate
11516
2210
427812b...
general
11516 loader.efi: replace HandleProtocol() with OpenProtocol()


yuri.pankov
  1. Is OpenProtocol supposed to be implemented on all firmware implementations where HandleProtocol is present, and if not, would it make sense to have a wrapper falling back to OpenProtocol?

    1. Err, to HandleProtocol, of course.

    2. OpenProtocol is extension to 1.10 and should really be present in all modern versions, and HandleProtocol is deprecated. From UEFI specification (section 7.3):

      he HandleProtocol() function is still available for use by old EFI applications and drivers. However, all new applications and drivers should use EFI_BOOT_SERVICES.OpenProtocol() in place of HandleProtocol().
      
    3. I was just wondering if this will not break some older systems, not sure what "modern" means here.

    4. yep, according to wiki, 1.10 was deprecated 2005, that should be long enough, and OpenProtocol did appear in 1.10.

    5. Can I just say "LOL!"?

  2. 
      
yuri.pankov
  1. Ship It!
  2. 
      
tsoome
tsoome
jlevon
  1. So the change itself looks fine, but I suppose I'm surprised by the comment about static storage, as I'd think that HandleProtocol() would have been basically the same wrapper around
    OpenProtocol() in the UEFI implementation. Curious!

    1. It is not issue by freebsd provided BHYVE_UEFI.fd, but it is with one I got from Josh - presumably something used in smartos.

  2. 
      
yuri.pankov
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...