Skip to content

[Feature]: Add Variable Policy service #466

Open

Description

@makubacki

Feature Overview

We need a variable policy service. For now, this can abstract the UEFI variable protocol.

Solution Overview

See above.

Alternatives Considered

No response

Urgency

Low

Are you going to implement the feature request?

I will implement the feature

Do you need maintainer feedback?

No maintainer feedback needed

Anything else?

No response

Activity

  1. moved this to Backlog in Patinaon Jul 31, 2025
  2. added this to the Backlog milestone on Jul 31, 2025
  3. kouchekiniad commented on Aug 14, 2025

    @kouchekiniad
    Contributor

    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

  4. kouchekiniad commented on Aug 14, 2025

    @kouchekiniad
    Contributor

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

  • Status
    Backlog

Relationships

None yet

Development

No branches or pull requests

Issue actions