Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
qemu-exit
Exit QEMU with user-defined code.
Quit a running QEMU session with user-defined exit code. Useful for unit or integration tests using QEMU.
AArch64
Pass the -semihosting
argument to QEMU invocation, e.g.:
qemu-system-aarch64 -M raspi3 -serial stdio -semihosting -kernel kernel8.img
Examples
Exit the QEMU session from anywhere in your code:
// QEMU binary executes `exit(0)`.
exit_failure // QEMU binary executes `exit(1)`.
exit // Use a custom code. Argument must implement `Into<u64>`.
exit_success
x86_64
Add the special ISA debug exit device by passing the flags:
-device isa-debug-exit,iobase=0xf4,iosize=0x04
Examples
The iobase is given as a const generic
:
0xf4 }> // Use a custom code. Argument must implement `Into<u32>`.
exit
Note
The QEMU binary will execute exit((arg << 1) | 1)
. The is hardcoded in the
QEMU sources. Therefore, with isa-debug-exit
, it is not possible to let QEMU
invoke exit(0)
.
Literature
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.