Page MenuHomeFreeBSD

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

Authored by tsoome on Aug 4 2019, 9:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 23 2024, 2:37 PM
Unknown Object (File)
Feb 23 2024, 2:37 PM
Unknown Object (File)
Feb 23 2024, 2:37 PM
Unknown Object (File)
Feb 23 2024, 2:37 PM
Unknown Object (File)
Feb 23 2024, 2:20 PM
Unknown Object (File)
Dec 28 2023, 2:19 PM
Unknown Object (File)
Dec 22 2023, 10:27 PM
Unknown Object (File)
Dec 5 2023, 7:03 PM
Subscribers

Details

Summary

The HandleProtocol() is deprecated interface and we should use OpenProtocol() instead. Moreover, in some firmware implementation(s), the HandleProtocol() does return device path using static storage, so we can not keep the value returned there. With same firmware, the OpenProtocol() does return data we do not need to clone.

Test Plan

Tested by network and disk boot.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 25688
Build 24277: arc lint + arc unit

Event Timeline

love the idea, but think it would be better to create a centralized location where we wrap this.
Call me paranoid, but I fear there may be a EFI bios we need to do this for :(
But also, it will make the code easier to read, so win/win.

stand/efi/boot1/proto.c
64

maybe we should create wrappers for this stuff to make it less verbose everywhere we use it.

This revision is now accepted and ready to land.Aug 5 2019, 1:54 AM
In D21162#459738, @imp wrote:

love the idea, but think it would be better to create a centralized location where we wrap this.
Call me paranoid, but I fear there may be a EFI bios we need to do this for :(
But also, it will make the code easier to read, so win/win.

hm, I got some idea about it, I'll think a bit...

Implement OpenProtocolByHandle()

This revision now requires review to proceed.Aug 5 2019, 10:11 AM
This revision is now accepted and ready to land.Aug 6 2019, 5:29 PM