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
After messaging with Joey I believe the implementation of UEFI protocol dependent Services (including Variable Services) warrants further discussion in one of the weekly Rust meetings. As DXE driver dispatch begins after all components have executed, there is currently no way for a component to take a hard dependency on on Service that won't be made available until the corresponding DXE driver which populates the protocol has been dispatched. Furthermore, there is no current established mechanism by which Components can take a soft dependency on a Protocol where the component will run regardless of whether a Service has been installed, but be provided the Service once it is available.
After discussing with Joey it seems the hard dependency case would require intermingling the execution of DXE drivers and Patina components, which would of course have wider implications.
As for the soft dependency case, I can see a couple of ways of implementing that behavior. One possibility is wrapping all protocol-dependent Services in something like NotifyOnAvailable<S> where components would register callbacks with the service that would return the service once available. Another would adding a callback database to Storage itself. In either case, it seems warranted to discuss which model we want to use going forward as a group or through an RFC.
Activity
kouchekiniad commentedon Aug 14, 2025
After messaging with Joey I believe the implementation of UEFI protocol dependent Services (including Variable Services) warrants further discussion in one of the weekly Rust meetings. As DXE driver dispatch begins after all components have executed, there is currently no way for a component to take a hard dependency on on Service that won't be made available until the corresponding DXE driver which populates the protocol has been dispatched. Furthermore, there is no current established mechanism by which Components can take a soft dependency on a Protocol where the component will run regardless of whether a Service has been installed, but be provided the Service once it is available.
After discussing with Joey it seems the hard dependency case would require intermingling the execution of DXE drivers and Patina components, which would of course have wider implications.
As for the soft dependency case, I can see a couple of ways of implementing that behavior. One possibility is wrapping all protocol-dependent Services in something like
NotifyOnAvailable<S>where components would register callbacks with the service that would return the service once available. Another would adding a callback database to Storage itself. In either case, it seems warranted to discuss which model we want to use going forward as a group or through an RFC.FYI @makubacki @Javagedes
kouchekiniad commentedon Aug 14, 2025
In the meantime, I do have a PR up that adds Variable Policy as a protocol that components can add via standard UEFI interfaces here: #608