mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 10:12:25 -05:00
Kernel: Add shutdown commands for other virtualizers
Source: https://wiki.osdev.org/Shutdown
This commit is contained in:
parent
1a0c11cea2
commit
453affb101
Notes:
sideshowbarker
2024-07-19 03:00:28 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/453affb1010 Pull-request: https://github.com/SerenityOS/serenity/pull/3351
1 changed files with 6 additions and 0 deletions
|
@ -63,7 +63,13 @@ int Process::sys$halt()
|
|||
dbg() << "syncing mounted filesystems...";
|
||||
FS::sync();
|
||||
dbg() << "attempting system shutdown...";
|
||||
// QEMU Shutdown
|
||||
IO::out16(0x604, 0x2000);
|
||||
// If we're here, the shutdown failed. Try VirtualBox shutdown.
|
||||
IO::out16(0x4004, 0x3400);
|
||||
// VirtualBox shutdown failed. Try Bochs/Old QEMU shutdown.
|
||||
IO::out16(0xb004, 0x2000);
|
||||
dbg() << "shutdown attempts failed, applications will stop responding.";
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue