Skip to content

uefi: Add safe protocol wrapper for EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL #1594

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

Merged
merged 4 commits into from
Apr 12, 2025

Conversation

seijikun
Copy link
Contributor

@seijikun seijikun commented Mar 27, 2025

Update Latest API discussions


Implemented a safe API wrapper for EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL [52c78312-8edc-4233-98f2-1a1aa5e388a5].
Added an integration-test for it.

+This contains a copy of the AlignedBuffer commit from #1589

This uses the iterator/mutable design I suggested here: #1589 (comment) where the iter method only captures the protocol (NvmePassThru) immutably, but requires you to use the produced element (NvmeNamespace) in a mutable way for meaningful methods like execute_command.

Checklist

  • Sensible git history (for example, squash "typo" or "fix" commits). See the Rewriting History guide for help.
  • Update the changelog (if necessary)

@seijikun seijikun force-pushed the mr-nvmept branch 7 times, most recently from b03f112 to 29bf512 Compare March 31, 2025 11:38
@phip1611 phip1611 mentioned this pull request Apr 6, 2025
13 tasks
@phip1611 phip1611 self-requested a review April 8, 2025 09:52
Copy link
Member

@phip1611 phip1611 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the high-quality contribution! As this is a bigger change and non trivial to review, I'd also like to wait for the feedback of Nicholas. So it may take some time (days-weeks) before we can get this merged.

@seijikun seijikun force-pushed the mr-nvmept branch 3 times, most recently from 9a8c777 to 6ad7495 Compare April 8, 2025 12:05
@seijikun seijikun force-pushed the mr-nvmept branch 3 times, most recently from d312695 to 38ea988 Compare April 10, 2025 16:25
@seijikun
Copy link
Contributor Author

seijikun commented Apr 10, 2025

I just:

  • rebased this PR onto master
  • attempted to split it up into smaller commits as well as I could, in an attempt to ease the review process for you
  • added some more non-docs comments with some reasoning and code explanations

Copy link
Member

@phip1611 phip1611 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for your patience! I'm not very experienced with NVMe but these abstractions look good. A clear value-add to this crate

@phip1611 phip1611 enabled auto-merge April 12, 2025 17:43
@phip1611 phip1611 added this pull request to the merge queue Apr 12, 2025
Merged via the queue into rust-osdev:main with commit 53dd8b3 Apr 12, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants