Skip to content

Add UEFI HID and USB HID components. - #8

Open
joschock wants to merge 5 commits into
OpenDevicePartnership:mainfrom
joschock:uefi_hid
Open

joschock wants to merge 5 commits into
OpenDevicePartnership:mainfrom
joschock:uefi_hid

Conversation

@joschock

@joschock joschock commented May 5, 2026

Copy link
Copy Markdown

Description

  • Remove the placeholder crate and add the uefi_hid component which
    consumes the HidIo protocol and produces standard UEFI input protocols
    (SimpleTextInput, SimpleTextInputEx, AbsolutePointer) for keyboard and
    pointer HID devices.

  • Add the USB HID component which consumes EFI_USB_IO_PROTOCOL on USB HID
    device controllers and produces the HidIo protocol for each managed device.
    This serves as the HidIo producer consumed by uefi_hid.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

Tested on hardware with these components integrated into patina. Confirmed pointer and keyboard operation.

Integration Instructions

See component readme files for integration instructions.

@github-actions github-actions Bot added impact:testing Affects testing type:documentation Improvements or additions to documentation labels May 5, 2026
@joschock

joschock commented May 5, 2026

Copy link
Copy Markdown
Author

Relies on OpenDevicePartnership/patina#1498

@codecov-commenter

codecov-commenter commented May 5, 2026 •

Copy link
Copy Markdown

@makubacki

Copy link
Copy Markdown
Contributor

@joschock, Is the PR ready for review? Are you planning to keep the commits broken out the way they are now?

@joschock

joschock commented Nov 3, 2026

Copy link
Copy Markdown
Author

@joschock, Is the PR ready for review? Are you planning to keep the commits broken out the way they are now?

Yes. At the moment I'm planning to squash them to single commit on merge as there is not a lot of organizational value to the present set of commits. Both crates are "initial implementations" - so there isn't much prior art that's being modified.

If it would be desirable, I can reorganize the commits - probably just one commit per added crate.

@joschock

joschock commented Nov 3, 2026

Copy link
Copy Markdown
Author

I will likely refactor to ComponentDriver interface in a subsequent PR, since this one is already quite large.

@makubacki

Copy link
Copy Markdown
Contributor

If it would be desirable, I can reorganize the commits - probably just one commit per added crate.

I don't have a strong preference but given the size I think some partitioning like per crate would help identify the major pieces a little more clearly in the git log.

@joschock

joschock commented Nov 4, 2026

Copy link
Copy Markdown
Author

If it would be desirable, I can reorganize the commits - probably just one commit per added crate.

I don't have a strong preference but given the size I think some partitioning like per crate would help identify the major pieces a little more clearly in the git log.

K, I'll refactor the commits to separate the two crates + ancillary changes for CI unrelated to either crate, but I expect the resulting code will be nearly identical to what is in the PR at the moment except for commit organization - so feel free to proceed with the review.

@joschock

joschock commented Nov 4, 2026

Copy link
Copy Markdown
Author

If it would be desirable, I can reorganize the commits - probably just one commit per added crate.

I don't have a strong preference but given the size I think some partitioning like per crate would help identify the major pieces a little more clearly in the git log.

K, I'll refactor the commits to separate the two crates + ancillary changes for CI unrelated to either crate, but I expect the resulting code will be nearly identical to what is in the PR at the moment except for commit organization - so feel free to proceed with the review.

Rebased to cleaner history.

@os-d os-d left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any patina_tests that would be relevant for these components?

I'll be honest, I mostly reviewed the external interfaces and some key areas that I thought might have problems. I will defer to @makubacki on the driver model usage.

I think we should also follow on with a CODEOWNERS file in this repo and begin the process of individual owners for components. @makubacki thoughts?

Comment thread uefi_hid/src/hid_io.rs Resolved
Comment thread uefi_hid/src/keyboard/key_queue.rs Resolved
@os-d

os-d commented Nov 18, 2026

Copy link
Copy Markdown

Are there any patina_tests that would be relevant for these components?

I'll be honest, I mostly reviewed the external interfaces and some key areas that I thought might have problems. I will defer to @makubacki on the driver model usage.

I think we should also follow on with a CODEOWNERS file in this repo and begin the process of individual owners for components. @makubacki thoughts?

With the assumption that @joschock you'll be okay being the codeowner for these two components :). If not, please find a replacement :D

@makubacki

Copy link
Copy Markdown
Contributor

With the assumption that @joschock you'll be okay being the codeowner for these two components :). If not, please find a replacement :D

Yes, please. For the top-level you can use the "patina-maintainers" team and @joschock for these specific components.

@joschock

Copy link
Copy Markdown
Author

Added CODEOWNERS as requested. @os-d - re: patina_test - I'm open to that, but would prefer to avoid adding to the wall of code that is this PR; if acceptable, I'd prefer to do that as a follow-on.

@os-d

os-d commented Nov 18, 2026

Copy link
Copy Markdown

Added CODEOWNERS as requested. @os-d - re: patina_test - I'm open to that, but would prefer to avoid adding to the wall of code that is this PR; if acceptable, I'd prefer to do that as a follow-on.

Totally fine. It's already wall of code enough that I did not review in detail :)

Comment thread usb_hid/src/driver.rs Resolved
Comment thread usb_hid/src/driver.rs Resolved
Comment thread usb_hid/src/interrupt_transfers.rs Resolved
Comment thread usb_hid/src/interrupt_transfers.rs Resolved
Comment thread uefi_hid/src/hid_io.rs Resolved
Comment thread usb_hid/src/interrupt_transfers.rs Resolved
Comment thread uefi_hid/src/keyboard/simple_text_in.rs Resolved
Comment thread uefi_hid/README.md Resolved
Comment thread uefi_hid/README.md Resolved
Comment thread usb_hid/README.md Resolved
@joschock

Copy link
Copy Markdown
Author

@makubacki , @os-d - I've pushed a significant refactor of these drivers to the ControllerDriver model (something I already thought I did in this PR, but apparently not). A re-review would be appreciated. I also fixed the comments on the PR, and if you want to see them broken out into individual fix commits before the squash, you can have a look at the history here: https://github.com/joschock/patina-components/commits/uefi_hid_pre_rebase/

Add the HID consumer component, keyboard and pointer protocols, tests, documentation, and required workspace dependencies.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
joschock and others added 4 commits November 30, 2026 14:17
Add the USB HID producer component, controller lifecycle, USB transfers, tests, and documentation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the initial placeholder crate and its workspace membership now that real components are present.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Allow technical spelling terms, recognize the coverage cfg, and permit the unicode-ident dependency license.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:testing Affects testing type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants