Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/arch/x86_64/kernel/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1088,6 +1088,9 @@ fn triple_fault() -> ! {
unreachable!()
}

/// Writes an exit code into the isa-debug-exit port.
///
/// For a value `e` written into the port, QEMU will exit with `(e << 1) | 1`.
fn qemu_exit(success: bool) {
let code = if success { 3 >> 1 } else { 0 };
unsafe {
Expand Down