-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 Minimal Std implementation for UEFI #105861
Conversation
r? @m-ou-se (rustbot has picked a reviewer for you, use r? to override) |
These commits modify compiler targets. Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! This looks so much easier to review! A few initial comments inline, and I will see whether I can give this a thorough review over the next week.
22f8692
to
3472331
Compare
ce514e8
to
798515a
Compare
This comment has been minimized.
This comment has been minimized.
955ff41
to
84031f3
Compare
84031f3
to
2cf8c6b
Compare
☔ The latest upstream changes (presumably #104658) made this pull request unmergeable. Please resolve the merge conflicts. |
2cf8c6b
to
64a3788
Compare
@dvdhrm ping |
I don't have as much time for reviews as I used to, but do have more context and a shorter review backlog than @m-ou-se, so sure, I don't mind taking it. I probably won't get to it for a week or two though, FYI. r? @thomcc |
64a3788
to
1355e15
Compare
a6ea7c0
to
2b1cdf8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
io::Error
should always use the unpacked representation, because the packed representation assumes that error codes are always 32-bits, which they are not in 64-bit UEFI.
// `RawOsError` must be an alias for `i32`. | ||
const _: fn(RawOsError) -> i32 = |os| os; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bitpacking needs the bit size of the OS error to be smaller than the pointer size to be able to add a tag value (that's why I added this assertion). Hence UEFI must use the unpacked representation for io::Error
.
☔ The latest upstream changes (presumably #115230) made this pull request unmergeable. Please resolve the merge conflicts. |
augh. |
Implemented modules: 1. alloc 2. os_str 3. env 4. math Tracking Issue: rust-lang#100499 API Change Proposal: rust-lang/libs-team#87 This was originally part of rust-lang#100316. Since that PR was becoming too unwieldy and cluttered, and with suggestion from @dvdhrm, I have extracted a minimal std implementation to this PR. Signed-off-by: Ayush Singh <[email protected]>
Signed-off-by: Ayush Singh <[email protected]>
- Make BootServices unavailable if ExitBootServices event is signaled. - Use thread locals for SystemTable and ImageHandle Signed-off-by: Ayush Singh <[email protected]>
Signed-off-by: Ayush Singh <[email protected]>
- Some comment fixes. - Make some functions unsafe. - Make helpers module private. - Rebase on master - Update r-efi to v4.2.0 Signed-off-by: Ayush Singh <[email protected]>
Some changes from this commit will probably be converted to its own PR. Signed-off-by: Ayush Singh <[email protected]>
- Update Example - Add thread_parking to sys::uefi - Fix unsafe in unsafe errors - Improve docs - Improve os/exit - Some asserts - Switch back to atomics Signed-off-by: Ayush Singh <[email protected]>
2b1cdf8
to
5a4e47e
Compare
- Hide Docs - Use repr_unpacked error Signed-off-by: Ayush Singh <[email protected]>
Well, I mistakenly pushed master after the last rebase, which closed the PR due to 0 delta. |
Mmmkay. Took another look. Apologies, again. @bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (c7224e3): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 630.239s -> 629.545s (-0.11%) |
Implemented modules:
Related Links
Tracking Issue: #100499
API Change Proposal: rust-lang/libs-team#87
Additional Information
This was originally part of #100316. Since that PR was becoming too unwieldy and cluttered, and with suggestion from @dvdhrm, I have extracted a minimal std implementation to this PR.
The example in
src/doc/rustc/src/platform-support/unknown-uefi.md
has been tested forx86_64-unknown-uefi
andi686-unknown-uefi
in OVMF. It would be great if someone more familiar with AARCH64 can help with testing for that target.Signed-off-by: Ayush Singh [email protected]