-
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
Tracking Issue for uefi-std #100499
Comments
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]>
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]>
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]>
…ngjubilee Add Minimal Std implementation for UEFI # Implemented modules: 1. alloc 2. os_str 3. env 4. math # Related Links Tracking Issue: rust-lang#100499 API Change Proposal: rust-lang/libs-team#87 # Additional Information 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. The example in `src/doc/rustc/src/platform-support/unknown-uefi.md` has been tested for `x86_64-unknown-uefi` and `i686-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]>
Add Minimal Std implementation for UEFI # Implemented modules: 1. alloc 2. os_str 3. env 4. math # Related Links Tracking Issue: rust-lang/rust#100499 API Change Proposal: rust-lang/libs-team#87 # Additional Information This was originally part of rust-lang/rust#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 for `x86_64-unknown-uefi` and `i686-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]>
The allocator seems to be hard-coded to use Of course, this only applies if uefi-std intends to support boot and runtime drivers. |
@medhefgo, The main target for uefi-std, is uefi applications. That being said, I am not opposed to expanding it's scope as long as it is not detrimental to the main target. Do you mean using One thing to note is that some allocations take place between |
It would be nice if boot drivers could be supported as they are not too different from apps. Runtime drivers are probably too niche and probably have too many pitfalls in it. The main question is what the rust entry point machinery expects: For EFI drivers to be any useful they have to return from main with success code without tearing down anything. The code will continue to be called as needed by the firmware. The real exit tear-down would be handled by the exit handler that would be registered on
Yes. |
Using |
…ngjubilee Use ImageDataType for allocation type Suggested at rust-lang#100499 cc `@dvdhrm` cc `@nicholasbishop`
Rollup merge of rust-lang#117177 - Ayush1325:uefi-alloc-type, r=workingjubilee Use ImageDataType for allocation type Suggested at rust-lang#100499 cc `@dvdhrm` cc `@nicholasbishop`
@Ayush1325 I have a question about the feature gate described here, It doesn't look to me like that feature actually exists. It's used in a couple places under It seems that right now, even without that feature, I can build a UEFI // src/main.rs:
fn main() {
let p = std::path::Path::new("/test");
println!("Hello, world! {}", p.display());
}
// Building with `cargo +nightly build --target=x86_64-unknown-uefi` succeeds I'm not sure if that's intended right now, since std on UEFI hasn't been stabilized as far as I know? The UEFI targets are tier 2 though, so maybe it's fine? I'm not actually sure what the intended policy here is :) |
@nicholasbishop As far as I understand it,
On further inspection, I think that link is only for language features. Here is the link for library features: https://rustc-dev-guide.rust-lang.org/stability.html. I think everything required is already present. |
Feature gate:
#![feature(uefi_std)]
This is a tracking issue for Std support for UEFI environment. I have been working on implementing this as a part of my Google Summer of Code 2022 project. Information about the current state of this implementation can be found at
src/doc/rustc/src/platform-support/unknown-uefi.md
. A PR has already been opened hereFor those who are wondering how a target like UEFI can benefit from std support, here are a few examples:
Public API
APIs I propose to add under
std::os::uefi::env
:pub fn get_system_table() -> NonNull<c_void>
pub fn get_system_handle() -> NonNull<c_void>
pub fn boot_services() -> Option<NonNull<c_void>>
APIs I propose to add under
std::os::uefi::ffi
(Just re-exportstd::os::windows::ffi
)OsStrExt
OsStringExt
Implementation History
The text was updated successfully, but these errors were encountered: