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

Initial fs implementation for UEFI #129700

Closed
wants to merge 1 commit into from

Conversation

Ayush1325
Copy link
Contributor

@Ayush1325 Ayush1325 commented Aug 28, 2024

  • Only implementing basic file stuff for now.
  • Not implementing path::absolute right now since absolute UEFI paths
    will not be recognized as absolute path anyway.
  • Supports both UEFI shell mapping and device path text representation.
  • Follows closely UEFI shell file implementations.

Avoiding directory stuff for now. Also only works for absolute paths.
r? @joboet

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 28, 2024
@bors
Copy link
Collaborator

bors commented Sep 23, 2024

☔ The latest upstream changes (presumably #130755) made this pull request unmergeable. Please resolve the merge conflicts.

@joboet
Copy link
Member

joboet commented Oct 28, 2024

As this is still a draft, I'm assuming you still want to work on it a bit (I'm cleaning up my review queue)?
@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 28, 2024
@Ayush1325 Ayush1325 force-pushed the uefi-file branch 2 times, most recently from 4f422c1 to ebbe0e4 Compare October 29, 2024 05:47
@Ayush1325 Ayush1325 marked this pull request as ready for review October 29, 2024 05:48
@Ayush1325
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 29, 2024
@Ayush1325 Ayush1325 force-pushed the uefi-file branch 2 times, most recently from c60d97e to 6c07b0d Compare November 27, 2024 19:59
@Ayush1325
Copy link
Contributor Author

cc @joboet

@Ayush1325 Ayush1325 force-pushed the uefi-file branch 2 times, most recently from 370da2a to 1ddb30e Compare January 6, 2025 12:28
- Only implementing basic file stuff for now.
- Not implementing path::absolute right now since absolute UEFI paths
  will not be recognized as absolute path anyway.
- Supports both UEFI shell mapping and device path text representation.
- Follows closely UEFI shell file implementations.

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
@joboet
Copy link
Member

joboet commented Jan 10, 2025

I'm truly sorry to keep you waiting for so long – yes, as Nicholas pointed out, this PR is way to large, but I should have informed you of that instead of waiting for the perfect moment to review this PR – which never came. I've been (and am) in your position and know how incredibly frustrating these long delays can be, so I swore to avoid them when I got review permissions. And yet, here we are, so sorry again and I'll promise not to make this mistake again.

I'll happily review smaller patches (within a reasonable time frame, of course), or you could try other reviewers (if I remember correctly, Jubilee has also got a bit of UEFI experience, but I could be wrong).

@Ayush1325
Copy link
Contributor Author

I'm truly sorry to keep you waiting for so long – yes, as Nicholas pointed out, this PR is way to large, but I should have informed you of that instead of waiting for the perfect moment to review this PR – which never came. I've been (and am) in your position and know how incredibly frustrating these long delays can be, so I swore to avoid them when I got review permissions. And yet, here we are, so sorry again and I'll promise not to make this mistake again.

I'll happily review smaller patches (within a reasonable time frame, of course), or you could try other reviewers (if I remember correctly, Jubilee has also got a bit of UEFI experience, but I could be wrong).

No worries. As a fellow open source contributor and maintainer, I understand these things happen, especially when it's just hobby work.

Thanks for approving the other PR btw. I will try to upstream things in smaller chunks to help with easier upstreaming. This PR is mostly for historical reason now, will close this now in favor of smaller PRs.

@Ayush1325 Ayush1325 closed this Jan 10, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Jan 11, 2025
…oboet

Initial fs module for uefi

- Just a copy of unsupported fs right now to reduce the noise from future PRs to allow for easier review.
- For the full working version of fs on uefi, see [0]
- This is an effort to break the original PR (rust-lang#129700) into much smaller chunks for faster upstreaming.

[0]: https://github.com/Ayush1325/rust/tree/uefi-file-full
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 11, 2025
Rollup merge of rust-lang#135324 - Ayush1325:uefi-fs-unsupported, r=joboet

Initial fs module for uefi

- Just a copy of unsupported fs right now to reduce the noise from future PRs to allow for easier review.
- For the full working version of fs on uefi, see [0]
- This is an effort to break the original PR (rust-lang#129700) into much smaller chunks for faster upstreaming.

[0]: https://github.com/Ayush1325/rust/tree/uefi-file-full
github-actions bot pushed a commit to tautschnig/verify-rust-std that referenced this pull request Mar 11, 2025
…oboet

Initial fs module for uefi

- Just a copy of unsupported fs right now to reduce the noise from future PRs to allow for easier review.
- For the full working version of fs on uefi, see [0]
- This is an effort to break the original PR (rust-lang#129700) into much smaller chunks for faster upstreaming.

[0]: https://github.com/Ayush1325/rust/tree/uefi-file-full
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 18, 2025
…lasbishop

uefi: fs: Implement exists

Also adds the initial file abstractions.

The file opening algorithm is inspired from UEFI shell. It starts by classifying if the Path is Shell mapping, text representation of device path protocol, or a relative path and converts into an absolute text representation of device path protocol.

After that, it queries all handles supporting
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL and opens the volume that matches the device path protocol prefix (similar to Windows drive). After that, it opens the file in the volume using the remaining pat.

It also introduces OwnedDevicePath and BorrowedDevicePath abstractions to allow working with the base UEFI and Shell device paths efficiently.

DevicePath in UEFI behaves like an a group of nodes laied out in the memory contiguously and thus can be modeled using iterators.

This is an effort to break the original PR (rust-lang#129700) into much smaller chunks for faster upstreaming.
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Mar 20, 2025
uefi: fs: Implement exists

Also adds the initial file abstractions.

The file opening algorithm is inspired from UEFI shell. It starts by classifying if the Path is Shell mapping, text representation of device path protocol, or a relative path and converts into an absolute text representation of device path protocol.

After that, it queries all handles supporting
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL and opens the volume that matches the device path protocol prefix (similar to Windows drive). After that, it opens the file in the volume using the remaining pat.

It also introduces OwnedDevicePath and BorrowedDevicePath abstractions to allow working with the base UEFI and Shell device paths efficiently.

DevicePath in UEFI behaves like an a group of nodes laied out in the memory contiguously and thus can be modeled using iterators.

This is an effort to break the original PR (rust-lang/rust#129700) into much smaller chunks for faster upstreaming.
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Mar 20, 2025
uefi: fs: Implement exists

Also adds the initial file abstractions.

The file opening algorithm is inspired from UEFI shell. It starts by classifying if the Path is Shell mapping, text representation of device path protocol, or a relative path and converts into an absolute text representation of device path protocol.

After that, it queries all handles supporting
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL and opens the volume that matches the device path protocol prefix (similar to Windows drive). After that, it opens the file in the volume using the remaining pat.

It also introduces OwnedDevicePath and BorrowedDevicePath abstractions to allow working with the base UEFI and Shell device paths efficiently.

DevicePath in UEFI behaves like an a group of nodes laied out in the memory contiguously and thus can be modeled using iterators.

This is an effort to break the original PR (rust-lang/rust#129700) into much smaller chunks for faster upstreaming.
lnicola pushed a commit to lnicola/rust-analyzer that referenced this pull request Mar 24, 2025
uefi: fs: Implement exists

Also adds the initial file abstractions.

The file opening algorithm is inspired from UEFI shell. It starts by classifying if the Path is Shell mapping, text representation of device path protocol, or a relative path and converts into an absolute text representation of device path protocol.

After that, it queries all handles supporting
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL and opens the volume that matches the device path protocol prefix (similar to Windows drive). After that, it opens the file in the volume using the remaining pat.

It also introduces OwnedDevicePath and BorrowedDevicePath abstractions to allow working with the base UEFI and Shell device paths efficiently.

DevicePath in UEFI behaves like an a group of nodes laied out in the memory contiguously and thus can be modeled using iterators.

This is an effort to break the original PR (rust-lang/rust#129700) into much smaller chunks for faster upstreaming.
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Apr 2, 2025
…lasbishop

uefi: fs: Implement exists

Also adds the initial file abstractions.

The file opening algorithm is inspired from UEFI shell. It starts by classifying if the Path is Shell mapping, text representation of device path protocol, or a relative path and converts into an absolute text representation of device path protocol.

After that, it queries all handles supporting
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL and opens the volume that matches the device path protocol prefix (similar to Windows drive). After that, it opens the file in the volume using the remaining pat.

It also introduces OwnedDevicePath and BorrowedDevicePath abstractions to allow working with the base UEFI and Shell device paths efficiently.

DevicePath in UEFI behaves like an a group of nodes laied out in the memory contiguously and thus can be modeled using iterators.

This is an effort to break the original PR (rust-lang#129700) into much smaller chunks for faster upstreaming.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants