Skip to content

[Feature]: Provide a simple component that demonstrates common C module functionality #515

Description

@makubacki

Feature Overview

Ideally new Rust code should be written as components. Most code can be but may still need to install global structures like protocols or manipulate global stores like the PCD database. A simple component should demonstrate how to do these actions, so it is available as a reference to new component writers that also need their component to interact with C code.

Solution Overview

Demonstate:

  • Install, locate, uninstall protocol
  • Hook on and produce a status code
  • Get and set a UEFI variable with variable policy
  • Get and set a PCD
  • Register an event notification callback
  • Publish an event notification
  • Consume a HOB

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. added
    state:needs-triage
    type:feature-request
    on Jun 13, 2025
  2. self-assigned this
    on Jun 25, 2025
  3. rogurr commented on Jul 11, 2025

    @rogurr
    Contributor

    Can I request to bump up this task priority?

    In a meeting with an OEM today, it was mentioned they are on a path that requires a driver like this to showcase how to transition existing C code to Rust.

    Once this is finished, they would like to explore on their own if it is feasible to use the new code in both a UEFI build using the Tiano C based core and a build based on the Patina core.

  4. Javagedes commented on Jul 14, 2025

    @Javagedes
    Contributor

    Hi @rogurr I'll write up some different monolithic component examples today to complete this :)

  5. Javagedes commented on Jul 21, 2025

    @Javagedes
    Contributor

    @rogurr I wrote some hob usage examples in #586. Most of this issue is currently blocked while #593 completes, as it is going to create a final user interface for these things.

    I do want to say that all of this is currently possible by using the StandardRuntimeServices and StandardBootServices types in your component interface, which provides an API very similar to the current C implementation. I could theoretically write examples for of this right now. However, I would just re-write it once #593 completes. Here is a short example:

    fn my_component_interface(bs: &StandardBootServices, rt: &StandardRuntimeServices) -> Result<()> {
      // bs.some_boot_services_function(...)?'
      // rt.some_runtime_services_function(...)?;
    }
    Request Status
    Install, locate, uninstall protocol On hold for #593
    Hook on and produce a status code On hold for #468
    Get and set a UEFI variable with variable policy On hold for #593
    Get and set a PCD PCDs not supported. Most PCD types are statically compiled via the EDKII build system on a per-module basis.
    Register an event notification callback On hold for #593
    Publish an event notification On hold for #593
    Consume a HOB Completed in #586
  6. moved this to In Progress in Patinaon Jul 31, 2025
  7. added this to the Open Source milestone on Aug 1, 2025
  8. added theissue type on Aug 1, 2025
  9. added
    urgency:medium
    on Aug 1, 2025
  10. rogurr commented on Aug 1, 2025

    @rogurr
    Contributor

    Copy of comment from #593

    This enhancement is marked with urgency:medium and is blocked by #593 that is marked urgency:low. Can we proceed with this assuming the RFC is valid?

  11. added
    urgency:low
    and removed
    urgency:medium
    on Aug 1, 2025
  12. makubacki commented on Aug 1, 2025

    @makubacki
    CollaboratorAuthor

    The RFC is in progress. Same reply from the other issue applies here.

  13. modified the milestones: Open Source, Backlog on Jun 22, 2026
  14. self-assigned this
    on Aug 13, 2026
  15. removed
    state:needs-triage
    on Aug 13, 2026
  16. makubacki commented on Aug 13, 2026

    @makubacki
    CollaboratorAuthor

    Covered with sample components in #1743.

  17. moved this from In Progress to Done in Patinaon Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

type:feature-requesturgency:low

Type

Projects

  • Status
    Done

Relationships

None yet

Development

No branches or pull requests

Issue actions