Open
Conversation
it's not guaranteed that all implementations of `reboot()` are
terminating calls.
`reboot_os()`, externally defined at
`src/arch/{x86_64,i686}/apic_asm.asm` both terminate, but this seems to
be an implementation detail of the x86 architecture.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This builds on top of #2363 due to tests.
As requested in #2361 (comment), it's better to handle cyclic faults at the exception handler. This PR fixes this, with some practical compromises.
Ideally, I would have liked to call
os::panic(), but this has some issues: currently,os::paniconly supports being called withconst char *why, with no concept of source location or expressions.Furthermore, it (used to) assume libc was initialized (i.e. calling
printfand friends). I've added a check to prevent this being an issue, irrespective of the problem this PR solves. I thinkos::panicshould have two interfaces: a dumb one that can be used irrespective of initialization state (that is, a simple fallback mechanism that is similar to my implementation of__expect_fail), and a complete one that acceptsstd::format_stringand cooperates correctly with the rest of the system.Unrelated to this, calling
__arch_poweroff()does not feel good. I wanted to callos::shutdown(), but this doesn't actually trigger a shutdown unless the proper message has been sent to vmrunner. I've opened #2364 with more details about this.