Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork175
WIP: Use global system table pointer#905
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
d532979
to182bec4
Compare182bec4
toadf3c90
Compareadf3c90
to1de3d6a
Compareb30c0b8
toe9c03c1
Comparea4b4e22
toc4fc968
CompareI'm wondering what's the right way forward here.
|
uefi/src/system.rs Outdated
/// TODO | ||
pub unsafe fn set_system_table(system_table: *mut uefi_raw::table::system::SystemTable) { | ||
SYSTEM_TABLE.store(system_table, Ordering::Release); |
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.
nit: This should use aOnce
-like type in the background. It should not be possible to set this multiple times.
I think something likeAtomicOnce<uefi_raw::table::system::SystemTable>
would be cool. Same for image handle.
uefi/src/system.rs Outdated
/// Return the firmware vendor string | ||
#[must_use] | ||
pub fn firmware_vendor() -> &'static CStr16 { | ||
unsafe { CStr16::from_ptr(system_table().as_mut().firmware_vendor.cast()) } |
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.
Why did you decide to use functions here and not a new type having associated functions/methods?
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.
I left some notes here:#893 (comment)
Since there's no longer any struct or lifetime involved, I think these functions are similar tohttps://doc.rust-lang.org/std/env/#functions; no point attaching them to an empty struct.
Once I find a spare bit of time I'll re-familiarize myself with the content of this PR, make some updates, and remove the draft marker. |
515a508
to19db510
CompareI realized I was probably trying to do too much in one PR, so I've opened a simpler one to start things off:#1156 |
19db510
to4589fd0
Compare4589fd0
to5006182
CompareThis will allow some code to be shared with the upcoming `uefi::boot` module.
The initial version here just provides functions for getting and setting thesystem time. Later commits will add functions to get/set variables, handleupdate capsules, etc.Also added some tests for the new code in the test runner (note that there wereno existing tests for the time-related functions of `RuntimeServices`).
5006182
to0f33a5c
Compare0f33a5c
to6b67b86
CompareIs there any reason to keep this MR open,@nicholasbishop ? |
Nope, at this point it has served its purpose. |
Uh oh!
There was an error while loading.Please reload this page.
For#893
Checklist