Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HidIo protocol, USB HidIo implementation, and UefiHidDxe Rust input driver [Rebase & FF] #324

Conversation

joschock
Copy link
Contributor

@joschock joschock commented Oct 3, 2023

Description

Adds support for Rust-based input stack.

  • Adds a new protocol interface that defines a general abstraction for HID devices: Protocols/HidIo.
  • Adds Rust protocol definition of HidIo.
  • Adds Rust protocol definition for AbsolutePointer
  • Adds UsbHidDxe driver - written in C, provides an implementation of HidIo over USB.
  • Adds UefiHidDxe driver - written in Rust, provides input report handling for HidIo pointer devices.

Note: does not yet support HID keyboards. This is planned future work.

  • Impacts functionality?
    Adds new input support functionality.
     
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?
    • includes standard RustDocs.

How This Was Tested

Pointer verified in preboot console (UEFI setup menu and Bitlocker Recovery).

Integration Instructions

Assuming a project is setup to build rust modules generally, integration of the new stack is accomplished by:

  • Remove UsbMouseAbsolutePointerDxe
  • Add UsbHidDxe and UefiHidDxe to the build

@github-actions github-actions bot added the type:documentation Improvements or additions to documentation label Oct 3, 2023
@makubacki makubacki self-requested a review October 5, 2023 23:03
@makubacki
Copy link
Member

Planning to review by Friday morning.

Cargo.toml Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
@makubacki makubacki requested a review from kuqin12 October 6, 2023 17:26
@joschock joschock force-pushed the personal/joschock/add_hid_parsing branch 2 times, most recently from 0dfaead to cdb08eb Compare October 10, 2023 16:37
@TaylorBeebe TaylorBeebe enabled auto-merge (rebase) October 13, 2023 19:37
- Adds a new protocol interface that defines a general abstraction for HID devices: Protocols/HidIo.
Note: does not yet support HID keyboards. This is planned future work.

- [x] Impacts functionality?
Adds new input support functionality.
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [x] Includes documentation?
  - includes standard RustDocs.

Pointer verified in preboot console (UEFI setup menu and Bitlocker Recovery).

N/A
- [x] Impacts functionality?
Adds new input support functionality.
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [x] Includes documentation?
  - includes standard RustDocs.

Pointer verified in preboot console (UEFI setup menu and Bitlocker Recovery).

N/A
- [x] Impacts functionality?
Adds new input support functionality.
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [x] Includes documentation?
  - includes standard RustDocs.

Pointer verified in preboot console (UEFI setup menu and Bitlocker Recovery).

N/A
…idIo over USB.

Note: does not yet support HID keyboards. This is planned future work.

- [x] Impacts functionality?
Adds new input support functionality.
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [x] Includes documentation?
  - includes standard RustDocs.

Pointer verified in preboot console (UEFI setup menu and Bitlocker Recovery).

N/A
Add UsbHidDxe driver that produces HidIo instance on USB HID devices.
…ing for HidIo pointer devices.

Note: does not yet support HID keyboards. This is planned future work.

- [x] Impacts functionality?
Adds new input support functionality.
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [x] Includes documentation?
  - includes standard RustDocs.

Pointer verified in preboot console (UEFI setup menu and Bitlocker Recovery).

Assuming a project is setup to build rust modules generally, integration of the new stack is accomplished by:
- Remove UsbMouseAbsolutePointerDxe
- Add UsbHidDxe and UefiHidDxe to the build
@joschock joschock force-pushed the personal/joschock/add_hid_parsing branch from bce15a4 to 016e209 Compare October 13, 2023 19:46
@TaylorBeebe TaylorBeebe enabled auto-merge (rebase) October 13, 2023 19:50
@TaylorBeebe TaylorBeebe merged commit 82177d1 into microsoft:release/202302 Oct 13, 2023
31 checks passed
makubacki added a commit to makubacki/mu_tiano_platforms that referenced this pull request Oct 17, 2023
Per integration instructions in microsoft/mu_plus#324,
`UsbMouseAbsolutePointerDxe` is removed and `UsbHidDxe` and `UefiHidDxe` are
added to the build.

The absolute pointer protocol will now be installed by the `AbsolutePointer`
crate in `HidPkg` linked against the `UefiHidDxe` module.

Signed-off-by: Michael Kubacki <[email protected]>
makubacki added a commit to makubacki/mu_tiano_platforms that referenced this pull request Oct 17, 2023
Per integration instructions in microsoft/mu_plus#324,
`UsbMouseAbsolutePointerDxe` is removed and `UsbHidDxe` and `UefiHidDxe` are
added to the build.

The absolute pointer protocol will now be installed by the `AbsolutePointer`
crate in `HidPkg` linked against the `UefiHidDxe` module.

Signed-off-by: Michael Kubacki <[email protected]>
makubacki added a commit to makubacki/mu_tiano_platforms that referenced this pull request Oct 18, 2023
Per integration instructions in microsoft/mu_plus#324,
`UsbMouseAbsolutePointerDxe` is removed and `UsbHidDxe` and `UefiHidDxe` are
added to the build.

The absolute pointer protocol will now be installed by the `AbsolutePointer`
crate in `HidPkg` linked against the `UefiHidDxe` module.

r-efi is updated to v4.3.0 to pick up the absolute pointer protocol definition
added in that release.

Signed-off-by: Michael Kubacki <[email protected]>
makubacki added a commit to microsoft/mu_tiano_platforms that referenced this pull request Oct 19, 2023
## Description

Per integration instructions in
microsoft/mu_plus#324,
`UsbMouseAbsolutePointerDxe` is removed and `UsbHidDxe` and `UefiHidDxe`
are
added to the build.

The absolute pointer protocol will now be installed by the
`AbsolutePointer`
crate in `HidPkg` linked against the `UefiHidDxe` module.

- [x] Impacts functionality?
- **Functionality** - Does the change ultimately impact how firmware
functions?
- Examples: Add a new library, publish a new PPI, update an algorithm,
...
- [ ] Impacts security?
- **Security** - Does the change have a direct security impact on an
application,
    flow, or firmware?
  - Examples: Crypto algorithm change, buffer overflow fix, parameter
    validation improvement, ...
- [ ] Breaking change?
- **Breaking change** - Will anyone consuming this change experience a
break
    in build or boot behavior?
- Examples: Add a new library class, move a module to a different repo,
call
    a function in a new library class in a pre-existing module, ...
- [ ] Includes tests?
  - **Tests** - Does the change include any explicit test code?
  - Examples: Unit tests, integration tests, robot tests, ...
- [ ] Includes documentation?
- **Documentation** - Does the change contain explicit documentation
additions
    outside direct code modifications (and comments)?
- Examples: Update readme file, add feature readme file, link to
documentation
    on an a separate Web page, ...

## How This Was Tested

- Verified QemuQ35Pkg and QemuSbsaPkg build and boot to EFI shell

## Integration Instructions

N/A

Signed-off-by: Michael Kubacki <[email protected]>
joschock pushed a commit to joschock/mu_tiano_platforms that referenced this pull request Oct 20, 2023
Per integration instructions in microsoft/mu_plus#324,
`UsbMouseAbsolutePointerDxe` is removed and `UsbHidDxe` and `UefiHidDxe` are
added to the build.

The absolute pointer protocol will now be installed by the `AbsolutePointer`
crate in `HidPkg` linked against the `UefiHidDxe` module.

Signed-off-by: Michael Kubacki <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants