Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Conversation

nicholasbishop
Copy link
Member

@nicholasbishopnicholasbishop commentedJul 29, 2023
edited
Loading

For#893

Checklist

  • Sensible git history (for example, squash "typo" or "fix" commits). See theRewriting History guide for help.
  • Update the changelog (if necessary)

@nicholasbishopnicholasbishopforce-pushed thebishop-global-tables-2 branch 2 times, most recently fromd532979 to182bec4CompareJuly 29, 2023 18:31
@nicholasbishopnicholasbishopforce-pushed thebishop-global-tables-2 branch 6 times, most recently fromb30c0b8 toe9c03c1CompareApril 20, 2024 16:35
@nicholasbishopnicholasbishopforce-pushed thebishop-global-tables-2 branch 2 times, most recently froma4b4e22 toc4fc968CompareApril 23, 2024 02:51
@phip1611
Copy link
Member

I'm wondering what's the right way forward here.

  1. CloseExploration on implementation ofRFC #893. #980
  2. Undraft this?


/// TODO
pub unsafe fn set_system_table(system_table: *mut uefi_raw::table::system::SystemTable) {
SYSTEM_TABLE.store(system_table, Ordering::Release);
Copy link
Member

@phip1611phip1611Apr 23, 2024
edited
Loading

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.

/// Return the firmware vendor string
#[must_use]
pub fn firmware_vendor() -> &'static CStr16 {
unsafe { CStr16::from_ptr(system_table().as_mut().firmware_vendor.cast()) }
Copy link
Member

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?

Copy link
MemberAuthor

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.

phip1611 reacted with thumbs up emoji
@nicholasbishop
Copy link
MemberAuthor

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.

@nicholasbishopnicholasbishopforce-pushed thebishop-global-tables-2 branch 2 times, most recently from515a508 to19db510CompareMay 2, 2024 03:49
@nicholasbishop
Copy link
MemberAuthor

I realized I was probably trying to do too much in one PR, so I've opened a simpler one to start things off:#1156

This 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`).
@nicholasbishopnicholasbishop changed the titleExtremely WIP, just for discussion: Add global system table pointerWIP: Use global system table pointerJul 19, 2024
@phip1611
Copy link
Member

Is there any reason to keep this MR open,@nicholasbishop ?

@nicholasbishop
Copy link
MemberAuthor

Nope, at this point it has served its purpose.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@phip1611phip1611phip1611 left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@nicholasbishop@phip1611

[8]ページ先頭

©2009-2025 Movatter.jp