-
Notifications
You must be signed in to change notification settings - Fork 13k
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
uefi: Implement path #135475
Merged
Merged
uefi: Implement path #135475
+158
−5
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Jan 14, 2025
Ayush1325
force-pushed
the
uefi-absolute-path
branch
2 times, most recently
from
January 15, 2025 05:50
4549114
to
aeeb1fd
Compare
nicholasbishop
approved these changes
Jan 16, 2025
UEFI paths can be of 4 types: 1. Absolute Shell Path: Uses shell mappings 2. Absolute Device Path: this is what we want 3: Relative root: path relative to the current root. 4: Relative Absolute shell path can be identified with `:` and Absolute Device path can be identified with `/`. Relative root path will start with `\`. The algorithm is mostly taken from edk2 UEFI shell implementation and is somewhat simple. Check for the path type in order. For Absolute Shell path, use `EFI_SHELL->GetDevicePathFromMap` to get a BorrowedDevicePath for the volume. For Relative paths, we use the current working directory to construct the new path. BorrowedDevicePath abstraction is needed to interact with `EFI_SHELL->GetDevicePathFromMap` which returns a Device Path Protocol with the lifetime of UEFI shell. Absolute Shell paths cannot exist if UEFI shell is missing. Signed-off-by: Ayush Singh <[email protected]>
Ayush1325
force-pushed
the
uefi-absolute-path
branch
from
January 16, 2025 04:49
aeeb1fd
to
c1790b1
Compare
cc @tgross35 |
r? @jhpratt |
As a target maintainer has already given this the okay, this LGTM. @bors r+ |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Jan 29, 2025
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 30, 2025
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#135026 (Cast global variables to default address space) - rust-lang#135475 (uefi: Implement path) - rust-lang#135852 (Add `AsyncFn*` to `core` prelude) - rust-lang#136004 (tests: Skip const OOM tests on aarch64-unknown-linux-gnu) - rust-lang#136157 (override build profile for bootstrap tests) - rust-lang#136180 (Introduce a wrapper for "typed valtrees" and properly check the type before extracting the value) - rust-lang#136256 (Add release notes for 1.84.1) - rust-lang#136271 (Remove minor future footgun in `impl Debug for MaybeUninit`) - rust-lang#136288 (Improve documentation for file locking) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 31, 2025
Rollup merge of rust-lang#135475 - Ayush1325:uefi-absolute-path, r=jhpratt uefi: Implement path This PR is split off from rust-lang#135368 to reduce noise. UEFI paths can be of 4 types: 1. Absolute Shell Path: Uses shell mappings 2. Absolute Device Path: this is what we want 3. Relative root: path relative to the current root. 4. Relative Absolute shell path can be identified with `:` and Absolute Device path can be identified with `/`. Relative root path will start with `\`. The algorithm is mostly taken from edk2 UEFI shell implementation and is somewhat simple. Check for the path type in order. For Absolute Shell path, use `EFI_SHELL->GetDevicePathFromMap` to get a BorrowedDevicePath for the volume. For Relative paths, we use the current working directory to construct the new path. BorrowedDevicePath abstraction is needed to interact with `EFI_SHELL->GetDevicePathFromMap` which returns a Device Path Protocol with the lifetime of UEFI shell. Absolute Shell paths cannot exist if UEFI shell is missing. cc `@nicholasbishop`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is split off from #135368 to reduce noise.
UEFI paths can be of 4 types:
Absolute shell path can be identified with
:
and Absolute Device path can be identified with/
. Relative root path will start with\
.The algorithm is mostly taken from edk2 UEFI shell implementation and is somewhat simple. Check for the path type in order.
For Absolute Shell path, use
EFI_SHELL->GetDevicePathFromMap
to get a BorrowedDevicePath for the volume.For Relative paths, we use the current working directory to construct the new path.
BorrowedDevicePath abstraction is needed to interact with
EFI_SHELL->GetDevicePathFromMap
which returns a Device Path Protocol with the lifetime of UEFI shell.Absolute Shell paths cannot exist if UEFI shell is missing.
cc @nicholasbishop