-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
improve uefi support #2944
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
improve uefi support #2944
Conversation
3824822
to
1fcadee
Compare
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.
This looks like great work. Are you getting all these structure definitions straight from the specification? Or are you working from another implementation?
Could you link to whatever you're using for source material so that we know what to refer back to in future?
I'm taking the structure definitions directly from the specification. I change types only where the specification is inconsistent (e.g. the same value specified as signed and unsigned in different places) or where Zig offers more appropriate alternatives (e.g. [*]u8 instead of *u8 for strings).
|
d62707d
to
c3525c3
Compare
Most UEFI functions return the same type of error codes (same size, same semantics), see std/os/uefi/status.zig or Appendix D of the specification. I'd like to use |
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.
Excellent work. I'm sorry I didn't merge this earlier
@@ -155,8 +155,7 @@ pub fn abort() noreturn { | |||
system.abort(); | |||
} | |||
if (builtin.os == .uefi) { | |||
// TODO there must be a better thing to do here than loop forever | |||
while (true) {} | |||
exit(0); // TODO choose appropriate exit code |
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.
Can we at least exit with non-zero status?
This PR improves support for uefi. Structure definitions taken from the specification and slightly adapted.
Before continuing work on standard library support for UEFI, I'd like to discuss this in an issue.Related discussion in #2967