You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we have to call the raw UEFI code to create device handles and install protocols. Create a model that's more ergonomic and safe. For example we could have a type called Handle with methods like InstallProtocol() and UninstallProtocol(). These methods would take any type that implements a trait called Protocol. The trait will have a static field called guid() which the Handle can internally to register the protocol with UEFI.
The Handle will take ownership of all protocol instances passed to it and keep maybe dyn references to them in a vector. A Protocol implementation will be needed per protocol and will have methods on it specific to the protocol. The Handle will support querying for a protocol using the GUID. It will also uninstall all protocols it's currently holding in its Drop.
To make things more strongly typed we could find a way to have multiple different Handle types such as DeviceHandle, ImageHandle etc. In that case maybe Handle will be a trait rather than struct.
The text was updated successfully, but these errors were encountered:
Currently we have to call the raw UEFI code to create device handles and install protocols. Create a model that's more ergonomic and safe. For example we could have a type called
Handle
with methods likeInstallProtocol()
andUninstallProtocol()
. These methods would take any type that implements a trait calledProtocol
. The trait will have a static field calledguid()
which theHandle
can internally to register the protocol with UEFI.The
Handle
will take ownership of all protocol instances passed to it and keep maybedyn
references to them in a vector. AProtocol
implementation will be needed per protocol and will have methods on it specific to the protocol. TheHandle
will support querying for a protocol using the GUID. It will also uninstall all protocols it's currently holding in itsDrop
.To make things more strongly typed we could find a way to have multiple different
Handle
types such asDeviceHandle
,ImageHandle
etc. In that case maybeHandle
will be a trait rather than struct.The text was updated successfully, but these errors were encountered: