qemu_shutdown: hlt until the emulator really shuts down.

This commit is contained in:
Alexander Myltsev 2023-01-19 23:07:49 +04:00
parent 199f3a56bb
commit 4c075b8b6f

View File

@ -4,5 +4,8 @@
__attribute__((noreturn)) __attribute__((noreturn))
static inline void qemu_shutdown() { static inline void qemu_shutdown() {
port_word_out(0x604, 0x2000); port_word_out(0x604, 0x2000);
while (1) {
asm("hlt");
}
__builtin_unreachable(); __builtin_unreachable();
} }