pub fn shutdown(val: ExitReason) -> ! {
    unsafe {
        // For QEMU with debug-exit,iobase=0xf4,iosize=0x04
        // qemu will call: exit((val << 1) | 1);
        io::outb(QEMU_DEBUG_EXIT_PORT, val as u8);
    }

    // For CI run.py bare-metal execution, parses exit code
    // (Do not change this line without adjusting run.py)
    sprintln!("[shutdown-request] {}", val as u8);

    // TODO(bare-metal): Do some ACPI magic to shutdown things

    // In case this doesn't work we hang.
    loop {
        unsafe { x86::halt() };
    }
}
/// Shutdown the processor.
///
/// Currently we only support the debug exit method from qemu, which conveniently
/// allows us to supply an exit code for testing purposes.
Shutdown the processor.
Currently we only support the debug exit method from qemu, which conveniently
allows us to supply an exit code for testing purposes.
Shutdown the processor . Currently we only support the debug exit method from qemu which conveniently allows us to supply an exit code for testing purposes .
pub fn shutdown(val: ExitReason) -> ! {
    unsafe {
        // For QEMU with debug-exit,iobase=0xf4,iosize=0x04
        // qemu will call: exit((val << 1) | 1);
        io::outb(QEMU_DEBUG_EXIT_PORT, val as u8);
    }
    // For CI run.py bare-metal execution, parses exit code
    // (Do not change this line without adjusting run.py)
    sprintln!("[shutdown-request] {}", val as u8);
    // TODO(bare-metal): Do some ACPI magic to shutdown things
    // In case this doesn't work we hang.
    loop {
        unsafe { x86::halt() };
    }
}
pub fn shutdown ( val : ExitReason ) -> ! { unsafe { // For QEMU with debug-exit,iobase=0xf4,iosize=0x04 // qemu will call: exit((val << 1) | 1); io :: outb ( QEMU_DEBUG_EXIT_PORT , val as u8 ) ; } // For CI run.py bare-metal execution, parses exit code // (Do not change this line without adjusting run.py) sprintln ! ( " " val as u8 ) ; // TODO(bare-metal): Do some ACPI magic to shutdown things // In case this doesn't work we hang. loop { unsafe { x86 :: halt ( ) } ; } }
Shutdown the processor.
Shutdown the processor .
val
ExitReason
val
ExitReason