From 95da0e029b07b913f55a89b531f1eb691bedfcee Mon Sep 17 00:00:00 2001 From: Hans Christian Schmitz Date: Thu, 16 Oct 2025 15:14:55 +0200 Subject: [PATCH] docs(x86_64): add explantory comment to `qemu_exit` --- src/arch/x86_64/kernel/processor.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/arch/x86_64/kernel/processor.rs b/src/arch/x86_64/kernel/processor.rs index b9221121b4..ceea010e9d 100644 --- a/src/arch/x86_64/kernel/processor.rs +++ b/src/arch/x86_64/kernel/processor.rs @@ -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 {