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

Add basic API for a global system table#1156

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

Merged

Conversation

nicholasbishop
Copy link
Member

This is a much simpler version than#905. Just the bare minimum: add functions to set and get the global system table, set the global system table in theentry macro, and also makeexit_boot_services unsafe.

(I would still like to go in the direction of#905, but I think we should move a little incrementally so that we have a better chance of catching mistakes along the way.)

#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-simple branch from4ae0cd6 to1dce0adCompareMay 2, 2024 20:36
@nicholasbishopnicholasbishopforce-pushed thebishop-global-tables-simple branch from1dce0ad to8b47a44CompareMay 3, 2024 16:51
@nicholasbishopnicholasbishopforce-pushed thebishop-global-tables-simple branch from8b47a44 to153aea5CompareMay 22, 2024 21:48
This is a minimal solution to providing a global system table so that users ofthe API don't have to pass around references to `SystemTable` / `BootServices` /`RuntimeServices` everywhere.
This method was already unsafe in practice, since it's very hard to staticallyensure that no references to boot-services data exist. Change the signature toacknowledge that reality, and update the docstring with details.
@nicholasbishopnicholasbishopforce-pushed thebishop-global-tables-simple branch from153aea5 toc04e423CompareMay 22, 2024 22:07
@phip1611
Copy link
Member

Sorry for not giving the final review sooner.

// SAFETY: the system table is valid per the requirements of `set_system_table`.
unsafe {
if (*st).runtime_services.is_null() {
panic!("runtime services are not active");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

strictly speaking, they are also active, but not exclusively, right?

@phip1611phip1611 added this pull request to themerge queueMay 23, 2024
Merged via the queue intorust-osdev:main with commit887cd56May 23, 2024
@phip1611
Copy link
Member

phip1611 commentedMay 23, 2024
edited
Loading

As this is the begin of a larger refactoring: Would it make sense to make a plan on what is actually needed - or what the vision is? Do we want to track things in a ..milestone, github project board or so?@nicholasbishop

@nicholasbishopnicholasbishop deleted the bishop-global-tables-simple branchMay 28, 2024 03:20
@nicholasbishop
Copy link
MemberAuthor

Writing up more of a plan is a good idea, I will add it to#893

phip1611 reacted with hooray emoji

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

@phip1611phip1611phip1611 approved these changes

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