Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork175
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
Add basic API for a global system table#1156
Uh oh!
There was an error while loading.Please reload this page.
Conversation
4ae0cd6
to1dce0ad
CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
1dce0ad
to8b47a44
Compare8b47a44
to153aea5
CompareThis 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.
153aea5
toc04e423
CompareSorry 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"); |
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.
strictly speaking, they are also active, but not exclusively, right?
phip1611 commentedMay 23, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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 |
Writing up more of a plan is a good idea, I will add it to#893 |
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 the
entry
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